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

NetBSD Hello World fails to build on 1.25.0 #49627

Closed
mattico opened this issue Apr 3, 2018 · 0 comments · Fixed by #54402
Closed

NetBSD Hello World fails to build on 1.25.0 #49627

mattico opened this issue Apr 3, 2018 · 0 comments · Fixed by #54402
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-netbsd Operating system: NetBSD

Comments

@mattico
Copy link
Contributor

mattico commented Apr 3, 2018

I'm not a NetBSD user so I can't help too much, but here's what travis says: https://travis-ci.org/mattico/test-netbsd/jobs/361710278

I suppose this could also be a bug in cross but this error started with 1.25, so I don't think so...

error: linking with `x86_64-unknown-netbsd-gcc` failed: exit code: 1
  |
  = note: "x86_64-unknown-netbsd-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e.1y16o1qfye96o7m0.rcgu.o" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e.3rngp6bm2u2q5z0y.rcgu.o" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e.4xq48u46a1pwiqn7.rcgu.o" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e.zkj6zrh601ni23e.rcgu.o" "-o" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e" "/target/x86_64-unknown-netbsd/debug/deps/test_netbsd-9b57e314db02ac7e.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/target/x86_64-unknown-netbsd/debug/deps" "-L" "/target/debug/deps" "-L" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib" "-Wl,-Bstatic" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libstd-075ab6f2359a82f1.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libpanic_unwind-428f111496747802.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libunwind-fbadb5623ab8cc25.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/liballoc_system-c7afd75849f41e4c.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/liblibc-42a81d0277a7a698.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/liballoc-20751df81794b150.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libstd_unicode-34dbdc699982f60d.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libcore-8e8a91684c5e06e5.rlib" "/rust/lib/rustlib/x86_64-unknown-netbsd/lib/libcompiler_builtins-4e85b1507e729192.rlib" "-Wl,-Bdynamic" "-l" "pthread" "-l" "gcc_s" "-l" "m" "-l" "util"
  = note: /usr/local/lib/gcc/x86_64-unknown-netbsd/5.3.0/../../../../x86_64-unknown-netbsd/bin/ld: /rust/lib/rustlib/x86_64-unknown-netbsd/lib/libstd-075ab6f2359a82f1.rlib(std-075ab6f2359a82f1.std0.rcgu.o): undefined reference to symbol 'execvp'
          /usr/local/x86_64-unknown-netbsd/lib/libc.so.12: error adding symbols: DSO missing from command line
          collect2: error: ld returned 1 exit status

Possibly related to #45084

@kennytm kennytm added A-linkage Area: linking into static, shared libraries and binaries O-netbsd Operating system: NetBSD C-bug Category: This is a bug. labels Apr 3, 2018
kennytm added a commit to kennytm/rust that referenced this issue Sep 21, 2018
Use no_default_libraries for all NetBSD flavors

The no_default_libraries was introduced in rust-lang#28578 because the
NetBSD-based rumprun needed to disable the link flag.
This moves the definition to be used by all NetBSD linker flavors to
close rust-lang#49627.

A different solution would be adding -lc but as there is no platform
with explicit -lc, this approach is used.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Sep 22, 2018
Use no_default_libraries for all NetBSD flavors

The no_default_libraries was introduced in rust-lang#28578 because the
NetBSD-based rumprun needed to disable the link flag.
This moves the definition to be used by all NetBSD linker flavors to
close rust-lang#49627.

A different solution would be adding -lc but as there is no platform
with explicit -lc, this approach is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-netbsd Operating system: NetBSD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants