Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.3.1] #576

Open
mrzigha opened this issue Nov 22, 2024 · 7 comments
Open

[v1.3.1] #576

mrzigha opened this issue Nov 22, 2024 · 7 comments

Comments

@mrzigha
Copy link

mrzigha commented Nov 22, 2024

DESCRIPTION

I'm looking to statically compile the Axelard binary in version v1.1.0 for PebbleDB on Alpine 3.19 docker image.
Everything seems to work on Tendermint binaries compatible with Alpine 3.18 but not from 3.19 (related to issue #495).

COMMANDS EXECUTED

apk add --no-cache git build-base linux-headers
go mod edit -replace github.com/cometbft/cometbft-db=github.com/notional-labs/cometbft-db@pebble
go mod tidy
go mod edit -replace github.com/tendermint/tm-db=github.com/notional-labs/[email protected]
go mod tidy
go mod edit -replace github.com/cosmos/cosmos-db=github.com/notional-labs/cosmos-db@pebble
go mod tidy
CGO_ENABLED=1 go build -buildvcs=false -mod=readonly -o /go/bin/axelard -tags 'muslc pebbledb' -ldflags "-X github.com/cosmos/cosmos-sdk/version.Name=axelar -X github.com/cosmos/cosmos-sdk/version.AppName=axelard -X github.com/cosmos/cosmos-sdk/version.Version=1.1.0 -X github.com/cosmos/cosmos-sdk/version.Commit=4e223aacf74fbaebe7f6ff74b0d4f84bffdf4f33 -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -X 'github.com/cosmos/cosmos-sdk/version.BuildTags=muslc,pebbledb' -linkmode=external -extldflags '-Wl,-z,muldefs -static'" ./cmd/axelard

ERROR

 > [tendermint-builder 14/16] RUN CGO_ENABLED=1 go build -buildvcs=false -mod=readonly -o /go/bin/axelard -tags 'muslc pebbledb' -ldflags "-X github.com/cosmos/cosmos-sdk/version.Name=axelar -X github.com/cosmos/cosmos-sdk/version.AppName=axelard -X github.com/cosmos/cosmos-sdk/version.Version=1.1.0 -X github.com/cosmos/cosmos-sdk/version.Commit=4e223aacf74fbaebe7f6ff74b0d4f84bffdf4f33 -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -X 'github.com/cosmos/cosmos-sdk/version.BuildTags=muslc,pebbledb' -linkmode=external -extldflags '-Wl,-z,muldefs -static'" ./cmd/axelard:
48.83 # github.com/axelarnetwork/axelar-core/cmd/axelard
48.83 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
48.83 /usr/bin/gcc -m64 -o $WORK/b001/exe/a.out -Wl,--export-dynamic-symbol=_cgo_panic -Wl,--export-dynamic-symbol=_cgo_topofstack -Wl,--export-dynamic-symbol=cCanonicalAddress -Wl,--export-dynamic-symbol=cDelete -Wl,--export-dynamic-symbol=cGet -Wl,--export-dynamic-symbol=cHumanAddress -Wl,--export-dynamic-symbol=cNext -Wl,--export-dynamic-symbol=cQueryExternal -Wl,--export-dynamic-symbol=cScan -Wl,--export-dynamic-symbol=cSet -Wl,--export-dynamic-symbol=crosscall2 -Wl,--export-dynamic-symbol=secp256k1GoPanicError -Wl,--export-dynamic-symbol=secp256k1GoPanicIllegal -Wl,--compress-debug-sections=zlib /tmp/go-link-3449687730/go.o /tmp/go-link-3449687730/000000.o /tmp/go-link-3449687730/000001.o /tmp/go-link-3449687730/000002.o /tmp/go-link-3449687730/000003.o /tmp/go-link-3449687730/000004.o /tmp/go-link-3449687730/000005.o /tmp/go-link-3449687730/000006.o /tmp/go-link-3449687730/000007.o /tmp/go-link-3449687730/000008.o /tmp/go-link-3449687730/000009.o /tmp/go-link-3449687730/000010.o /tmp/go-link-3449687730/000011.o /tmp/go-link-3449687730/000012.o /tmp/go-link-3449687730/000013.o /tmp/go-link-3449687730/000014.o /tmp/go-link-3449687730/000015.o /tmp/go-link-3449687730/000016.o /tmp/go-link-3449687730/000017.o /tmp/go-link-3449687730/000018.o /tmp/go-link-3449687730/000019.o /tmp/go-link-3449687730/000020.o /tmp/go-link-3449687730/000021.o /tmp/go-link-3449687730/000022.o /tmp/go-link-3449687730/000023.o /tmp/go-link-3449687730/000024.o /tmp/go-link-3449687730/000025.o /tmp/go-link-3449687730/000026.o /tmp/go-link-3449687730/000027.o /tmp/go-link-3449687730/000028.o /tmp/go-link-3449687730/000029.o /tmp/go-link-3449687730/000030.o /tmp/go-link-3449687730/000031.o /tmp/go-link-3449687730/000032.o /tmp/go-link-3449687730/000033.o /tmp/go-link-3449687730/000034.o /tmp/go-link-3449687730/000035.o /tmp/go-link-3449687730/000036.o /tmp/go-link-3449687730/000037.o /tmp/go-link-3449687730/000038.o /tmp/go-link-3449687730/000039.o /tmp/go-link-3449687730/000040.o /tmp/go-link-3449687730/000041.o /tmp/go-link-3449687730/000042.o /tmp/go-link-3449687730/000043.o /tmp/go-link-3449687730/000044.o /tmp/go-link-3449687730/000045.o /tmp/go-link-3449687730/000046.o /tmp/go-link-3449687730/000047.o /tmp/go-link-3449687730/000048.o /tmp/go-link-3449687730/000049.o /tmp/go-link-3449687730/000050.o /tmp/go-link-3449687730/000051.o /tmp/go-link-3449687730/000052.o /tmp/go-link-3449687730/000053.o /tmp/go-link-3449687730/000054.o /tmp/go-link-3449687730/000055.o /tmp/go-link-3449687730/000056.o /tmp/go-link-3449687730/000057.o /tmp/go-link-3449687730/000058.o /tmp/go-link-3449687730/000059.o /tmp/go-link-3449687730/000060.o /tmp/go-link-3449687730/000061.o /tmp/go-link-3449687730/000062.o /tmp/go-link-3449687730/000063.o /tmp/go-link-3449687730/000064.o /tmp/go-link-3449687730/000065.o /tmp/go-link-3449687730/000066.o /tmp/go-link-3449687730/000067.o /tmp/go-link-3449687730/000068.o /tmp/go-link-3449687730/000069.o /tmp/go-link-3449687730/000070.o /tmp/go-link-3449687730/000071.o /tmp/go-link-3449687730/000072.o /tmp/go-link-3449687730/000073.o /tmp/go-link-3449687730/000074.o /tmp/go-link-3449687730/000075.o /tmp/go-link-3449687730/000076.o /tmp/go-link-3449687730/000077.o /tmp/go-link-3449687730/000078.o /tmp/go-link-3449687730/000079.o /tmp/go-link-3449687730/000080.o /tmp/go-link-3449687730/000081.o /tmp/go-link-3449687730/000082.o /tmp/go-link-3449687730/000083.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -O2 -g -O2 -g -Wl,-rpath,/go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api -L/go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api -lwasmvm_muslc -O2 -g -O2 -g -O2 -g -no-pie -Wl,-z,muldefs -static
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std2fs4read5inner17h762f68688638bf9eE+0x132): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std2fs14read_to_string5inner17hc5dab040969feccdE+0x132): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::truncate::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1111:(.text._ZN3std2fs4File7set_len17h76192ef110fd9c0dE+0x1e): undefined reference to `ftruncate64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::truncate':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ptr/mut_ptr.rs:(.text._ZN3std2fs4File7set_len17h76192ef110fd9c0dE+0x80): undefined reference to `ftruncate64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std2fs4File8metadata17h148b3c2fe4f4b804E+0x46): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN47_$LT$std..fs..File$u20$as$u20$std..io..Read$GT$11read_to_end17h98bfa16a34dc129aE+0x4e): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::seek':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN47_$LT$std..fs..File$u20$as$u20$std..io..Read$GT$11read_to_end17h98bfa16a34dc129aE+0x71): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN47_$LT$std..fs..File$u20$as$u20$std..io..Read$GT$14read_to_string17hafa2601d45b100c5E+0x4e): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::seek':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN47_$LT$std..fs..File$u20$as$u20$std..io..Read$GT$14read_to_string17hafa2601d45b100c5E+0x71): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN47_$LT$std..fs..File$u20$as$u20$std..io..Seek$GT$4seek17hf748f9afcade592aE+0x1c): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN51_$LT$$RF$std..fs..File$u20$as$u20$std..io..Read$GT$11read_to_end17he3a9e46deec05677E+0x54): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::seek':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN51_$LT$$RF$std..fs..File$u20$as$u20$std..io..Read$GT$11read_to_end17he3a9e46deec05677E+0x77): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN51_$LT$$RF$std..fs..File$u20$as$u20$std..io..Read$GT$14read_to_string17h3d39a297c25d3c83E+0x5b): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::seek':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN51_$LT$$RF$std..fs..File$u20$as$u20$std..io..Read$GT$14read_to_string17h3d39a297c25d3c83E+0x7e): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1172:(.text._ZN51_$LT$$RF$std..fs..File$u20$as$u20$std..io..Seek$GT$4seek17h98db8eff5416183dE+0x1c): undefined reference to `lseek64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::DirEntry::metadata':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:808:(.text._ZN3std2fs8DirEntry8metadata17h363cab523e33eafeE+0x65): undefined reference to `fstatat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:808:(.text._ZN3std2fs8DirEntry9file_type17h480d96905e552562E+0x7c): undefined reference to `fstatat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::stat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1538:(.text._ZN3std2fs8metadata17h75d66752975bc0c2E+0xba): undefined reference to `stat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fd::FileDesc::read_at':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fd.rs:130:(.text._ZN60_$LT$std..fs..File$u20$as$u20$std..os..unix..fs..FileExt$GT$7read_at17hc7fc9368b5325ca0E+0x22): undefined reference to `pread64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fd::FileDesc::write_at':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fd.rs:285:(.text._ZN60_$LT$std..fs..File$u20$as$u20$std..os..unix..fs..FileExt$GT$8write_at17he856fb8577123d97E+0x22): undefined reference to `pwrite64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::lstat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1557:(.text._ZN3std4path4Path10is_symlink17hf411b980db60d1c9E+0xba): undefined reference to `lstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1557:(.text.unlikely._ZN3std3sys6common14small_c_string24run_with_cstr_allocating17h26c190905be806ebE+0xa5): undefined reference to `lstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::stat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1538:(.text.unlikely._ZN3std3sys6common14small_c_string24run_with_cstr_allocating17h6d12994ba0f383aaE+0xa5): undefined reference to `stat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fd::FileDesc::read_at':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fd.rs:130:(.text._ZN3std3sys4unix2fd8FileDesc7read_at17hc887f957e0ce3c74E+0x22): undefined reference to `pread64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fd::FileDesc::write_at':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fd.rs:285:(.text._ZN3std3sys4unix2fd8FileDesc8write_at17h6a64716a486d127bE+0x22): undefined reference to `pwrite64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `<std::sys::unix::fs::ReadDir as core::iter::traits::iterator::Iterator>::next':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:643:(.text._ZN86_$LT$std..sys..unix..fs..ReadDir$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9cf51ae03faa88dcE+0x33): undefined reference to `readdir64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:643:(.text._ZN86_$LT$std..sys..unix..fs..ReadDir$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9cf51ae03faa88dcE+0x6e): undefined reference to `readdir64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::open_c::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1036:(.text._ZN3std3sys4unix2fs4File6open_c17hb672b205537ccf90E+0xe3): undefined reference to `open64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::cvt':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/mod.rs:(.text._ZN3std3sys4unix2fs4File6open_c17hb672b205537ccf90E+0xfa): undefined reference to `open64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::stat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1538:(.text._ZN3std3sys4unix2fs4stat17h2cca805549db71cdE+0xb3): undefined reference to `stat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::lstat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1557:(.text._ZN3std3sys4unix2fs5lstat17hf27254180f2d45efE+0xb3): undefined reference to `lstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std3sys4unix2fs4copy17he7619afc7b6a0f3dE+0x130): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std3sys4unix2fs4copy17he7619afc7b6a0f3dE+0x29a): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::lstat::{{closure}}':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1557:(.text._ZN3std3sys4unix2fs15remove_dir_impl14remove_dir_all17h7a6795688930364fE+0xd3): undefined reference to `lstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../lib/libwasmvm_muslc.a(std-7f310e4c1ed052dc.std.4a812f2d-cgu.0.rcgu.o): in function `std::sys::unix::fs::File::file_attr':
48.83 /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN71_$LT$std..fs..File$u20$as$u20$std..sys..unix..kernel_copy..CopyRead$GT$10properties17hb2ab5339ad6b63dbE+0x59): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN75_$LT$$RF$std..fs..File$u20$as$u20$std..sys..unix..kernel_copy..CopyRead$GT$10properties17h9bd537d8c2dac0a0E+0x5d): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN83_$LT$std..io..stdio..StdinLock$u20$as$u20$std..sys..unix..kernel_copy..CopyRead$GT$10properties17hb72a22b25db33fc6E+0x46): undefined reference to `fstat64'
48.83 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/fs.rs:1055:(.text._ZN3std12backtrace_rs9symbolize5gimli4mmap17h33bb8d7a92bfd0c5E+0x171): undefined reference to `fstat64'
48.83 collect2: error: ld returned 1 exit status
48.83 
@chipshort
Copy link
Collaborator

I haven't seen these errors outside of the issue you linked to, but maybe it has something to do with this paragraph from the musl 1.2.4 changelog:

On the API level, the legacy "LFS64" ("large file support") interfaces, which were provided by macros remapping them to their standard names (#define stat64 stat and similar) have been deprecated and are no longer provided under the _GNU_SOURCE feature profile, only under explicit _LARGEFILE64_SOURCE. The latter will also be removed in a future version. Builds broken by this change can be fixed short-term by adding -D_LARGEFILE64_SOURCE to CFLAGS, but should be fixed to use the standard interfaces.

Apparently there were also fixes regarding this in Rust: rust-lang/rust#111285
Where do you get the static build of libwasmvm_muslc from? Is that the official one we provide here? Because in that case it was built using Rust 1.69.0, which does not contain that fix yet.
You could try to build the static libwasmvm_muslc yourself using a newer builder or use an older libmuslc.

@webmaster128
Copy link
Member

My first though was that this is related to #523 because there also an Alpine 3.19+ build system caused issues for a while. But that's a different problem and causes crashes instead of link issues.

For #495 I don't know what the solution was other than downgrading the Alpine build image.

@mrzigha
Copy link
Author

mrzigha commented Nov 22, 2024

I haven't seen these errors outside of the issue you linked to, but maybe it has something to do with this paragraph from the musl 1.2.4 changelog:

On the API level, the legacy "LFS64" ("large file support") interfaces, which were provided by macros remapping them to their standard names (#define stat64 stat and similar) have been deprecated and are no longer provided under the _GNU_SOURCE feature profile, only under explicit _LARGEFILE64_SOURCE. The latter will also be removed in a future version. Builds broken by this change can be fixed short-term by adding -D_LARGEFILE64_SOURCE to CFLAGS, but should be fixed to use the standard interfaces.

Apparently there were also fixes regarding this in Rust: rust-lang/rust#111285

Where do you get the static build of libwasmvm_muslc from? Is that the official one we provide here? Because in that case it was built using Rust 1.69.0, which does not contain that fix yet.

You could try to build the static libwasmvm_muslc yourself using a newer builder or use an older libmuslc.

I build libwasmvm with dockerfile provided on repository (for Alpine)...

@mrzigha
Copy link
Author

mrzigha commented Nov 22, 2024

My first though was that this is related to #523 because there also an Alpine 3.19+ build system caused issues for a while. But that's a different problem and causes crashes instead of link issues.

For #495 I don't know what the solution was other than downgrading the Alpine build image.

Yes but somes Tendermint requires Go 1.23 but Alpine 1.18 for Go 1.23 Docker image doesn't exist...

@webmaster128
Copy link
Member

I see. However, assuming you can fix the issue above, you will still run into #523 at runtime. I.e. you need to upgrade to wasmvm 2.1+ in order to use a Alpine 3.19+ build image.

@mrzigha
Copy link
Author

mrzigha commented Nov 22, 2024

I see. However, assuming you can fix the issue above, you will still run into #523 at runtime. I.e. you need to upgrade to wasmvm 2.1+ in order to use a Alpine 3.19+ build image.

Yes but some Tendermint need 2.1+ wasmvm some depends on older version... I really need a build system for all version.

My final binary run on rootless and distroless Docker image. I want them to be fully static.

@webmaster128
Copy link
Member

Did Tendermint bump the min Go version in a patch release? This is not very nice IMO.

I think another option is to create a custom build image with Alpine 3.18 where you install Go 1.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants