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

Build fails with musl #27290

Closed
globin opened this issue Jul 25, 2015 · 8 comments
Closed

Build fails with musl #27290

globin opened this issue Jul 25, 2015 · 8 comments

Comments

@globin
Copy link
Contributor

globin commented Jul 25, 2015

In make install I get:

prepare: tmp/dist/rustc-1.1.0-x86_64-unknown-linux-gnu-image/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-*.so
ls: cannot access x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-*.so: No such file or directory
install: missing destination file operand after ‘tmp/dist/rustc-1.1.0-x86_64-unknown-linux-gnu-image/lib/rustlib/x86_64-unknown-linux-musl/lib/’
ls tmp/dist/rustc-1.1.0-x86_64-unknown-linux-gnu-image/lib/rustlib/x86_64-unknown-linux-musl/lib 
liblibc-7d23ff90.rlib
ls tmp/dist/rustc-1.1.0-x86_64-unknown-linux-gnu-image/lib/rustlib/x86_64-unknown-linux-gnu/lib
liballoc-7d23ff90.rlib        liblog-7d23ff90.so                    librustc_trans-7d23ff90.so
libarena-7d23ff90.rlib        libmorestack.a                        librustc_typeck-7d23ff90.so
libarena-7d23ff90.so          librand-7d23ff90.rlib                 librustc_unicode-7d23ff90.rlib
libcollections-7d23ff90.rlib  librbml-7d23ff90.rlib                 librustdoc-7d23ff90.so
libcompiler-rt.a              librbml-7d23ff90.so                   libserialize-7d23ff90.rlib
libcore-7d23ff90.rlib         librustc-7d23ff90.so                  libserialize-7d23ff90.so
libflate-7d23ff90.rlib        librustc_back-7d23ff90.so             libstd-7d23ff90.rlib
libflate-7d23ff90.so          librustc_bitflags-7d23ff90.rlib       libstd-7d23ff90.so
libfmt_macros-7d23ff90.so     librustc_borrowck-7d23ff90.so         libsyntax-7d23ff90.so
libgetopts-7d23ff90.rlib      librustc_data_structures-7d23ff90.so  libterm-7d23ff90.rlib
libgetopts-7d23ff90.so        librustc_driver-7d23ff90.so           libterm-7d23ff90.so
libgraphviz-7d23ff90.rlib     librustc_lint-7d23ff90.so             libtest-7d23ff90.rlib
libgraphviz-7d23ff90.so       librustc_llvm-7d23ff90.so             libtest-7d23ff90.so
liblibc-7d23ff90.rlib         librustc_privacy-7d23ff90.so
liblog-7d23ff90.rlib          librustc_resolve-7d23ff90.so

/cc @alexcrichton

@alexcrichton
Copy link
Member

How did you configure the build? Also can you gist a full output?

@asaaki
Copy link

asaaki commented Aug 4, 2015

I guess I have a similar problem. At least I get the same error message.

I tried to follow your instructions at #24777, but stumbled upon an issue:

Clone and build LLVM's libcxxabi library. Only the libunwind.a artifact is needed. I have tried using upstream libunwind's source repo but I have not gotten unwinding to work with it unfortunately. Move libunwind.a adjacent to MUSL's libc.a

I followed the instruction of libcxxabi, but got no libunwind.a at all (tried with trunk and the 3.6.2 release tag from svn).
So I went for the libunwind by pathscale and got the artifact.
But building rust with this in place results in the error mentioned above.

You can find my build steps at https://gist.github.com/asaaki/e15fb009ba4b40611d78

Would be awesome if you could provide more detailed instructions on how to reproduce a successful build.

@tailhook
Copy link

tailhook commented Aug 4, 2015

@asaaki, there are also new instructions at:
https://github.com/rust-lang/rust/blob/master/src/doc/trpl/advanced-linking.md

I've successfully build rust-must using them.

@asaaki
Copy link

asaaki commented Aug 4, 2015

Okay, will try this. Thanks for the pointer.

@asaaki
Copy link

asaaki commented Aug 4, 2015

Status update so far:
It seems it is possible to build against the current master branch only right now.
And if I interpret the version string correctly, then this will be later the 1.3.0 release.

Thank you again for the hint, @tailhook!

@tailhook
Copy link

tailhook commented Aug 4, 2015

@asaaki, well, let me know if you manage to build something using cargo which has "libc" as dependency (many packages depend on libc somewhere in the chain). That's where I currently am :)

@aidanhs
Copy link
Member

aidanhs commented Aug 18, 2015

(the above is possible with libc crate >= 0.1.10 per rust-lang/libc#15)

@alexcrichton
Copy link
Member

Ah yeah I believe that this was fixed some time ago on master, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants