Skip to content

Commit 41738e1

Browse files
authored
fix: add rustlib path (#27241)
1 parent c5f60e3 commit 41738e1

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ orbs:
88
parameters:
99
cross-container-tag:
1010
type: string
11-
default: go1.24.9-latest
11+
default: go1.24.13-latest
1212

1313
workflow:
1414
type: string

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/influxdata/influxdb/v2
22

33
go 1.24.0
44

5-
toolchain go1.24.9
5+
toolchain go1.24.13
66

77
require (
88
github.com/BurntSushi/toml v1.2.1

scripts/ci/build-tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ set -exo pipefail
33

44
function build_linux () {
55
local tags=osusergo,netgo,sqlite_foreign_keys,sqlite_json,static_build
6+
local extld="-fno-PIC -static -Wl,-z,stack-size=8388608 "
67
local cc
78
case $(go env GOARCH) in
89
amd64)
9-
cc=$(xcc linux x86_64)
10+
cc="$(xcc linux x86_64)"
11+
extld+="-L$(find_rustlib_path x86_64-unknown-linux-musl) -Wl,-lunwind "
1012
;;
1113
arm64)
12-
cc=$(xcc linux aarch64)
14+
cc="$(xcc linux aarch64)"
1315
tags="$tags,noasm"
16+
extld+="-L$(find_rustlib_path aarch64-unknown-linux-musl) -Wl,-lunwind "
1417
;;
1518
*)
1619
>&2 echo Error: Unknown arch $(go env GOARCH)
1720
exit 1
1821
;;
1922
esac
2023

21-
local -r extld="-fno-PIC -static -Wl,-z,stack-size=8388608"
2224
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) CC="${cc}" go-test-compile \
2325
-x -tags "$tags" -o "${1}/" -ldflags "-extldflags '$extld'" ./...
2426
}

scripts/ci/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function main () {
2424
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) go build \
2525
-tags assets,sqlite_foreign_keys,sqlite_json,static_build,noasm \
2626
-buildmode=pie \
27-
-ldflags "-s -w -X main.version=${version} -X main.commit=${commit} -X main.date=${build_date} -linkmode=external -extld=${CC} -extldflags '${LINUX_EXTLD}'" \
27+
-ldflags "-s -w -X main.version=${version} -X main.commit=${commit} -X main.date=${build_date} -linkmode=external -extld=${CC} -extldflags '${LINUX_EXTLD} -L$(find_rustlib_path x86_64-unknown-linux-musl) -Wl,-lunwind'" \
2828
-o "$out_dir/" \
2929
"$pkg"
3030
;;
@@ -33,7 +33,7 @@ function main () {
3333
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) go build \
3434
-tags assets,sqlite_foreign_keys,sqlite_json,static_build,noasm \
3535
-buildmode=pie \
36-
-ldflags "-s -w -X main.version=${version} -X main.commit=${commit} -X main.date=${build_date} -linkmode=external -extld=${CC} -extldflags '${LINUX_EXTLD}'" \
36+
-ldflags "-s -w -X main.version=${version} -X main.commit=${commit} -X main.date=${build_date} -linkmode=external -extld=${CC} -extldflags '${LINUX_EXTLD} -L$(find_rustlib_path aarch64-unknown-linux-musl) -Wl,-lunwind'" \
3737
-o "$out_dir/" \
3838
"$pkg"
3939
;;

0 commit comments

Comments
 (0)