!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

464 Members
Rust111 Servers

Load older messages


SenderMessageTime
13 Sep 2024
@paparodeo:matrix.orgreno i'm trying to build a rust program but getting a link error note: /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: /nix/store/n06b8gzyhwn9acggacnzl4yypccn77wp-gcc-13.3.0-lib/lib/libgcc_s.so.1: undefined reference to _dl_find_object@GLIBC_2.35' _dl_find_objectis defined in-lcwhich is in the link flags. build works fine on aarch64 darwin and x64 linux but fails on aarch64 linux. Tried to add-lcinNIX_LDFLAGSandNIX_CFLAGS_COMPILEbut am still getting same error. i assume it might have something to do with-lgcc_scoming before-lc` on the command line but not sure how re-order flags to try. 15:06:32
@paparodeo:matrix.orgreno * i'm trying to build a rust program but getting a link error note: /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: /nix/store/n06b8gzyhwn9acggacnzl4yypccn77wp-gcc-13.3.0-lib/lib/libgcc_s.so.1: undefined reference to _dl_find_object@GLIBC_2.35' _dl_find_objectis defined in-lc which is in the link flags. build works fine on aarch64 darwin and x64 linux but fails on aarch64 linux. Tried to add-lcinNIX_LDFLAGSandNIX_CFLAGS_COMPILEbut am still getting same error. i assume it might have something to do with-lgcc_scoming before-lc` on the command line but not sure how re-order flags to try. 15:07:02
@paparodeo:matrix.orgreno * i'm trying to build a rust program but getting a link error note: /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: /nix/store/n06b8gzyhwn9acggacnzl4yypccn77wp-gcc-13.3.0-lib/lib/libgcc_s.so.1: undefined reference to \_dl\_find\_object@GLIBC\_2.3 \_dl\_find\_object is defined in-lc which is in the link flags. build works fine on aarch64 darwin and x64 linux but fails on aarch64 linux. Tried to add-lcinNIX\_LDFLAGSandNIX\_CFLAGS\_COMPILEbut am still getting same error. i assume it might have something to do with-lgcc\_scoming before-lc\ on the command line but not sure how re-order flags to try. 15:07:46
@paparodeo:matrix.orgreno * i'm trying to build a rust program but getting a link error note: /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: /nix/store/n06b8gzyhwn9acggacnzl4yypccn77wp-gcc-13.3.0-lib/lib/libgcc_s.so.1: undefined reference to _dl_find_object@GLIBC_2.3 _dl_find_object is defined in -lc which is in the link flags. build works fine on aarch64 darwin and x64 linux but fails on aarch64 linux. Tried to add -lc in NIX_LDFLAGS and NIX_CFLAGS_COMPILE but am still getting same error. i assume it might have something to do with -lgcc_s coming before -lc on the command line but not sure how re-order flags to try. 15:09:24
@paparodeo:matrix.orgreno

can reproduce on aarch64 linux by:

nix-shell -p cargo libudev-zero
cargo new linkerror
cd linkerror
cargo add serialport
cargo build
15:12:46
@qyliss:fairydust.spaceAlyssa RossCan you open a Nixpkgs bug report and @ me (@alyssais)?15:13:58
@paparodeo:matrix.orgreno
In reply to @qyliss:fairydust.space
Can you open a Nixpkgs bug report and @ me (@alyssais)?
thx -- thought maybe i was just doing something obviously wrong, am a rust noob. created: https://github.com/NixOS/nixpkgs/issues/341604
15:25:23
@qyliss:fairydust.spaceAlyssa Rossthanks, I'll try to look at it next time I'm on aarch15:38:44
@qyliss:fairydust.spaceAlyssa Rossfollowed the repro on x86_64 just to quickly check — I've done a little edit to the issue to mention it also needs pkg-config15:40:33
@qyliss:fairydust.spaceAlyssa Ross

(the --pure flag for nix-shell is helpful to make sure you've got all the dependencies like that)

15:41:01
@paparodeo:matrix.orgreno
In reply to @qyliss:fairydust.space

(the --pure flag for nix-shell is helpful to make sure you've got all the dependencies like that)

thx! -- adding pkg-config solves link issue for me on aarch64 linux
15:48:25
@qyliss:fairydust.spaceAlyssa Rossoh15:52:19
@qyliss:fairydust.spaceAlyssa Rossokay, wasn't expecting that to actually be the problem!15:52:27
14 Sep 2024
@bonofiglio:matrix.orgbonofiglio joined the room.23:42:04
15 Sep 2024
@svrana:matrix.orgsvranaI'm attempting to package up a small rust program that relies on pw-cli from the pipewire library at runtime. Is there a way to specify this in buildRustPackage?16:09:25
@k900:0upti.meK900 Use makeWrapper 16:12:16
@k900:0upti.meK900Or patch the source16:12:18
@k900:0upti.meK900But also why would you ever16:12:21
@k900:0upti.meK900You can just call libpipewire16:12:32
@el125:matrix.orgeelsa joined the room.18:54:28
@el125:matrix.orgeelsaHi all! I'm trying to package a rust package, but keep running into this problem18:55:00
@el125:matrix.orgeelsaimage.png
Download image.png
18:55:03
@el125:matrix.orgeelsaCurious as to whether ya'll might know what to do, or what steps I can take - thanks a ton! :D18:55:13
@k900:0upti.meK900Why are you trying to use a Cargo.lock from your Downloads directory18:57:30
@el125:matrix.orgeelsaI don't know, that's just what's happening when I try to build it18:58:06
@emilazy:matrix.orgemily you need to track Cargo.lock in Git 18:58:41
@el125:matrix.orgeelsaimage.png
Download image.png
18:58:42
@emilazy:matrix.orgemilybecause flakes only look at tracked files18:58:47
@el125:matrix.orgeelsaah that's really helpful! Can i ask if you have an example of that? I'm relatively new to Nix.18:59:23
@k900:0upti.meK900Are you in a git repo?19:00:47

Show newer messages


Back to Room ListRoom Version: 6