Hello, I'm trying to compile a very simple test.rs file from the tutorial fn main() { println!("hello?"); } with rustc test.rs and I get these errors: error: linking with `cc` failed: exit code: 1 note: cc arguments: '-m64' '-L/usr/local/lib/rustlib/x86_64-unknown-freebsd/lib' '-o' 'test' 'test.o' '-lmorestack' '-nodefaultlibs' '/usr/local/lib/rustlib/x86_64-unknown-freebsd/lib/libnative-72349f30-0.10.rlib' '/usr/local/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-8b97b62e-0.10.rlib' '-L/usr/home/tramb/devel/rust/.rust' '-L/usr/home/tramb/devel/rust' '-lexecinfo' '-lpthread' '-lm' '-lgcc_s' '-L/usr/local/lib' '-L/usr/local/lib/gcc46' '-L/usr/local/lib/gcc44' '-Wl,-rpath,/usr/local/lib/gcc46' '-Wl,-rpath,/usr/local/lib/gcc44' '-Wl,-z,origin' '-Wl,-rpath,$ORIGIN/../../../../local/lib/rustlib/x86_64-unknown-freebsd/lib' '-Wl,-rpath,/usr/local/lib/rustlib/x86_64-unknown-freebsd/lib' '-lcompiler-rt' note: test.o: In function `main::hc710cccadd7cba59eaa::v0.0': test.rs:(.text+0x20): undefined reference to `__morestack' test.o: In function `main': test.rs:(.text+0xb0): undefined reference to `__morestack' test.o: In function `fmt::Arguments$LT$$x27a$GT$::new::h1c4e875dc8287f179aa::v0.0': test.rs:(.text+0x110): undefined reference to `__morestack' test.o: In function `cast::transmute::he083e941a8234f90Bba::v0.0': test.rs:(.text+0x1a0): undefined reference to `__morestack' /usr/local/lib/rustlib/x86_64-unknown-freebsd/lib/libnative-72349f30-0.10.rlib(native.o): In function `io::addrinfo::GetAddrInfoRequest::run::hce03eca6bb2325f70aa::v0.10': native.rs:(.text+0x28): undefined reference to `__morestack' /usr/local/lib/rustlib/x86_64-unknown-freebsd/lib/libnative-72349f30-0.10.rlib(native.o):native.rs:(.text+0x960): more undefined references to `__morestack' follow cc: error: linker command failed with exit code 1 (use -v to see invocation) This is with a up-to-date lang/rust (0.10 on 05 April 2014) from pkg. I didn't try to build the port myself. No mention in ports/UDATING of course :) And I don't have any funny environment (I think). Cheers, Bertrand
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Maintainer of lang/rust, Please note that PR ports/189357 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/189357 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
I built the port with the patch and it works perfectly. Thanks a lot!
I got the exact same thing on a FreeBSD 9.2-RELEASE-p6 amd64 box. The patch fixed the problem.
I tried the patch against rust 0.11.0 on 9.3-REL amd64, did not build: llvm[2]: Compiling APFloat.cpp for Release+Asserts build In file included from /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/lib/Support/APFloat.cpp:15: In file included from /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/include/llvm/ADT/APFloat.h:20: In file included from /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/include/llvm/ADT/APInt.h:19: In file included from /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/include/llvm/ADT/ArrayRef.h:14: In file included from /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/include/llvm/ADT/SmallVector.h:17: /usr/home/pi/myp/lang/rust/work/rust-0.11.0/src/llvm/include/llvm/ADT/iterator_range.h:22:10: fatal error: 'utility' file not found #include <utility> ^ 1 error generated.
(In reply to Kurt Jaeger from comment #5) > I tried the patch against rust 0.11.0 on 9.3-REL amd64, did not build: How did you even get it to build? it is maked for FreeBSD 9 and lower.
Author: marino Date: Mon Jul 28 22:58:33 2014 New Revision: 363270 URL: http://svnweb.freebsd.org/changeset/ports/363270 QAT: https://qat.redports.org/buildarchive/r363270/ Log: lang/rust: Fix link issue and build failure [1] Linking fails with missing reference to __morestack symbol [2] gpy fails with error about missing sem implementation PR: 189357 [1] PR: 191927 [2] Submitted by: bertrand.augereau (gmail) [1] Submitted by: maintainer: mitsuruike (gmail) [2] Added: head/lang/rust/files/patch-src__libuv__gyp_uv.py (contents, props changed) Modified: head/lang/rust/Makefile