rust-cross / cargo-zigbuild

Compile Cargo project with zig as linker
MIT License
1.35k stars 50 forks source link

Linking is not working correctly #254

Open hanusek opened 1 month ago

hanusek commented 1 month ago

I try to build my example:

$ cargo zigbuild --target armv7-unknown-linux-gnueabihf.2.33  --release

If I check it:

$ readelf -s ./target/armv7-unknown-linux-gnueabihf/release/example  | grep GLIBC_2.34
    11: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    15: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    47: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    49: 00000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.34 (3)
    50: 00000000     0 FUNC    WEAK   DEFAULT  UND _[...]@GLIBC_2.34 (3)
    61: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    70: 00000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34 (3)
    83: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    84: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
    92: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
   103: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
   111: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
   114: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
   132: 00000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (3)
 43271: 00000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34

I have GLIBC_2.34 instead of GLIBC_2.33.