smaeul / portage-overlay

Extra ebuilds for Gentoo systems, mostly packages fixed to work with musl
18 stars 2 forks source link

firefox-55.0 with rust enabled failes during src_configure #3

Closed stefson closed 7 years ago

stefson commented 7 years ago
checking for libffi > 3.0.9... yes
checking MOZ_FFI_CFLAGS... -I/usr/lib/libffi-3.2.1/include
checking MOZ_FFI_LIBS... -L/usr/lib/../lib64 -lffi
checking for rustc... /usr/bin/rustc
checking for cargo... /usr/bin/cargo
checking rustc version... 1.19.0
checking cargo version... 0.20.0
DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=x86_64-unknown-linux-gnu -o /var/tmp/portage/www-client/firefox-55.0/temp/conftestqcCUms.rlib /var/tmp/portage/www-client/firefox-55.0/temp/conftests3GLTh.rs`
DEBUG: The command returned non-zero exit status 101.
DEBUG: Its error output was:
DEBUG: | error[E0463]: can't find crate for `std`
DEBUG: |   |
DEBUG: |   = note: the `x86_64-unknown-linux-gnu` target may not be installed
DEBUG: | 
DEBUG: | error: aborting due to previous error(s)
DEBUG: | 
ERROR: Cannot compile for x86_64-gentoo-linux-musl with /usr/bin/rustc
The target may be unsupported, or you may not have
a rust std library for that target installed. Try:

  rustup target add x86_64-unknown-linux-gnu

*** Fix above errors and then restart with\
               "make -f client.mk build"
make: *** [client.mk:383: configure] Error 1

build log: build.log.zip

I managed to build rust and cargo from your overlay, with useflags as following

Calculating dependencies... done! [ebuild R ~] dev-lang/rust-1.19.0:stable/1.19::smaeul USE="-system-llvm -debug -doc -jemalloc" 0 KiB

Rustc is able to compile rust code, I tested a simple hello world with success.

smaeul commented 7 years ago

The target given to rustc is --target=x86_64-unknown-linux-gnu when it should be --target=x86_64-unknown-linux-musl. Looks like an issue with firefox's build system.

stefson commented 7 years ago

It is very likely build/moz.configure/rust.configure which is responsible for this. I'll keep you posted on this.

stefson commented 7 years ago

Indeed, at the moment the build system does only support tests to find a glibc based rust. I'll open a bug on the gentoo bugzilla and talk with the devs over there how to fix this. Basically it is a trivial one liner patch, but while this enables musl it would break glibc based builds.

Can you please try to get your efforts regarding rust to be merged into the gentoo tree?

stefson commented 7 years ago

Forgot to close this, the gentoo bug is here if someone wants to know more: https://bugs.gentoo.org/show_bug.cgi?id=627676