Bug 1435585 - FTBFS with Rust enabled for all arches
Summary: FTBFS with Rust enabled for all arches
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker PPCTracker
TreeView+ depends on / blocked
 
Reported: 2017-03-24 10:03 UTC by Dan Horák
Modified: 2017-05-29 10:19 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-05-29 10:19:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 152887 0 None None None 2019-05-19 20:49:15 UTC
Mozilla Foundation 1368458 0 None None None 2019-05-19 20:49:15 UTC

Description Dan Horák 2017-03-24 10:03:51 UTC
I've tried to build FF with Rust enabled on all arches as Rust will become a mandatory BR in later FF version, with this change in the spec file

diff --git a/firefox.spec b/firefox.spec
index 2ae80f6..fbe8f09 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -54,9 +54,9 @@
 %define build_with_rust   0
 
 %if 0%{?fedora} > 23
-%ifarch x86_64
+#%ifarch x86_64
 %define build_with_rust   1
-%endif
+#%endif
 %endif
 
 # Build as a debug package?

And started scratch builds in Rawhide
https://koji.fedoraproject.org/koji/taskinfo?taskID=18564726
https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2531796

Unfortunately they all failed with a similar error
...
checking the host C++ compiler works... yes
checking for 64-bit OS... yes
checking for rustc... /usr/bin/rustc
checking for cargo... /usr/bin/cargo
checking rustc version... 1.16.0
checking cargo support for --frozen... yes
ERROR: Don't know how to translate powerpc64le-unknown-linux-gnu for rustc
*** Fix above errors and then restart with\
               "make -f client.mk build"
make[2]: *** [/builddir/build/BUILD/firefox-52.0/firefox-52.0/client.mk:379: configure] Error 1

Is it some magic missing the FF configure script or is it a Rust issue? The Rust maintainer is in CC.

Version-Release number of selected component (if applicable):
firefox-52.0-6.fc27

Comment 1 Michel Normand 2017-03-24 10:15:19 UTC
FYI, I made few days ago two rust related patches for ppc64 and ppc64le to allow to build firefox (on openSUSE)(1)   I assume this should apply to fedora.

I do not know how to reconcile the two as only one patch, because do not understand enough the internals of firefox.

(1) https://michelmno.fedorapeople.org/MozillaFirefox_openSUSE/

Comment 2 Josh Stone 2017-03-24 16:34:14 UTC
At least x86_64 looks like it got through... :)

> DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=i586-unknown-linux-gnu -o /tmp/conftestKgxLjk.rlib /tmp/conftest0If1n3.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 `i586-unknown-linux-gnu` target may not be installed
> DEBUG: | 
> DEBUG: | error: aborting due to previous error
> DEBUG: | 
> ERROR: Cannot compile for i686-pc-linux-gnu with /usr/bin/rustc

This should be targeting i686-unknown-linux-gnu, not i586.

> ERROR: Don't know how to translate armv7l-unknown-linux-gnueabihf for rustc

armv7-unknown-linux-gnueabihf

> ERROR: Don't know how to translate s390x-ibm-linux-gnu for rustc

s390x-unknown-linux-gnu

> ERROR: Don't know how to translate aarch64-unknown-linux-gnu for rustc
> ERROR: Don't know how to translate powerpc64-unknown-linux-gnu for rustc
> ERROR: Don't know how to translate powerpc64le-unknown-linux-gnu for rustc

These triples look fine as-is.

Comment 3 Josh Stone 2017-03-24 16:40:12 UTC
If it helps, you could just fall back to rustc's own triple from:

$ /usr/bin/rustc -Vv
rustc 1.16.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.16.0
LLVM version: 3.9

That's what it will use if you don't specify --target=... at all.

Comment 4 Martin Stransky 2017-05-24 20:33:47 UTC
(In reply to Michel Normand from comment #1)
> FYI, I made few days ago two rust related patches for ppc64 and ppc64le to
> allow to build firefox (on openSUSE)(1)   I assume this should apply to
> fedora.
> 
> I do not know how to reconcile the two as only one patch, because do not
> understand enough the internals of firefox.
> 
> (1) https://michelmno.fedorapeople.org/MozillaFirefox_openSUSE/

Thanks. Is the bug reported upstream or shall we report that?

Comment 5 Michel Normand 2017-05-29 08:00:06 UTC
(In reply to Martin Stransky from comment #4)
> (In reply to Michel Normand from comment #1)
> > FYI, I made few days ago two rust related patches for ppc64 and ppc64le to
> > allow to build firefox (on openSUSE)(1)   I assume this should apply to
> > fedora.
> > 
> > I do not know how to reconcile the two as only one patch, because do not
> > understand enough the internals of firefox.
> > 
> > (1) https://michelmno.fedorapeople.org/MozillaFirefox_openSUSE/
> 
> Thanks. Is the bug reported upstream or shall we report that?

I did not reported it upstream.

Comment 6 Martin Stransky 2017-05-29 10:19:25 UTC
Okay, reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1368458


Note You need to log in before you can comment on or make changes to this bug.