Repository navigation
Fails to compile on NixOS: linking with cc failed #17
Copy link
Copy link
Open
Labels
invalidThis doesn't seem rightThis doesn't seem rightwontfixThis will not be worked onThis will not be worked on
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Create a project on NixOS (I used replit)
- Add window
0.5.0to project - Try to compile
Expected behavior
The project should compile successfully
Screenshots
(None)
Desktop (please complete the following information):
results from nix-info -m:
- system:
"x86_64-linux" - host os:
Linux 5.15.0-1030-gcp, Ubuntu, 20.04.2 LTS (Focal Fossa) - multi-user?:
no - sandbox:
no - version:
nix-env (Nix) 2.3.16 - channels(runner):
"nixpkgs, nixpkgs-stable-21_11-21.11.tar.gz, nixpkgs-stable-22_05-22.05.tar.gz, nixpkgs-stable-22_11-22.11.tar.gz, nixpkgs-unstable" - nixpkgs:
/home/runner/.nix-defexpr/channels/nixpkgs
extra info:
- release:
0.5.0
Additional context
Full error:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustcNuHhLf/symbols.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.10kx4m2yf084nnd0.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.1mm17obwcqp1s329.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.2994ndwyti44y8cm.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.2pzlzbh48028bqef.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.2yvkpfg3p7eoaj2r.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.30oozu8n2sfj2871.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.315mpkq0uc8cjofp.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.3sh4p22ote1yeanu.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.3ufigo3t7a4pw6zx.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.3xouloak918au8wo.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.4cxxx8tywpotndts.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.4d2ldk2hk9nzm4so.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.4lszubulf6m5g14i.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.4xnozc8n7hz3zv43.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.54l6p7klm0i54gk.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.z1kpfbq7imk5ywt.rcgu.o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41.6ni0tnbok71p89c.rcgu.o" "-Wl,--as-needed" "-L" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps" "-L" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/libwindow-63c8730bf5f5e615.rlib" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/libdl_api-508ac119186c125e.rlib" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/libhuman-42da4cce4431082a.rlib" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/libstick-9f052457a00fc962.rlib" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/libsmelling_salts-aa8561785ac986d5.rlib" "-Wl,--start-group" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a1d7041fd4d8cd08.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-c6cde278c3900349.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-c18c026d6091fc89.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-a8ddd6b8c1eb2748.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-cf1b57e40f40be5c.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-368f6644efe84ca0.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-13002ff225607ac4.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-8da037be375289f6.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-3c60e3e298e394f0.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-1618bc6bcb92b801.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-01fef1eee7f1e815.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-eeb0cc5769aa350c.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-bd5033465630abc3.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-a394b9259e716bfe.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aebef0fea7bc5e36.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-7d227ca8ab6bae23.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-ba3ef81589bc7d14.rlib" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-6dc5fecf9cefb5b6.rlib" "-Wl,--end-group" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-5ab3067c677ad214.rlib" "-Wl,-Bdynamic" "-lEGL" "-lGLESv2" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/nix/store/yxahn76zdfg07rims69zpwajch937kxh-rustc-1.64.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/runner/Genetic-Algorithm-Demo/target/debug/deps/genetic_algorithm-9b1c476191d7fd41" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
= note: /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: cannot find -lEGL: No such file or directory
/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: cannot find -lGLESv2: No such file or directory
collect2: error: ld returned 1 exit status
I'm assuming this is more of a bug to do with what is actually installed on Nix, but the second note from the error suggests a bug with how the ld command is used. (tag being used as the path)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem rightwontfixThis will not be worked onThis will not be worked on
Activity
AldaronLau commentedon Mar 14, 2023
It looks like you just need to install the
libEGL-develandlibGLESv2-develpackages (or whatever they're called on nix, I'm not familiar). That is a normal message forld(doesn't indicate a usage bug).