-
Notifications
You must be signed in to change notification settings - Fork 2
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
Firefox does not build with "gentoo" or mixed "gentoo"/"unknown" rust targets #16
Comments
The reason is that the previous patchset was not acceptable to upstream. Historically, the So to avoid patching the generic |
Would it be helpful to ship the official static rust targets in addition to the default dynamic ones? I would guess that the static targets would work fine for firefox, since it's only compiling libraries anyway. |
I've been using this patch for some time now, and a similar one for armv7:
In the longterm I should file a bug at mozilla and try to rework the detection. Since the patch is small and not a burden to maintain, I don't see any need to press this one. About your question, I'm actually not sure how your rust stages behave, if they link statically or dynamically, but it gives a working firefox binary :) |
I'm having serious trouble to get things going on cross compiling with rust-std. librustc_target/spec/mod.rs says:
the missmatch between the chost syntax is making my head spin, so can you provide support for I'm going to try the following approach, do you think it may work?
P.S: anything related to cargo build --target armv7a-unknown-linux-musleabihf is working, but firefox (and librsvg in the future) are more complicated. |
@stefson The target names there come straight from the gentoo profiles. You can change them to whatever you want if that works better (your patch looks fine). Is the issue because firefox doesn't recognize "armv7a" as your architecture? I mentioned before that I want to ship the official targets alongside the distro targets, and I think that will fix your issues. Sorry, I haven't gotten a chance to implement that yet. |
The problem is the rust.configure script shipped by firefox. During detection of rust and cargo, it can't deal with the missmatch of armv7a-unknown-linux-musleabihf and x86_64-gentoo-linux-musl. aarch64 for instance should be much easier to deal with: aarch64-gentoo-linux-musl vs x86_64-gentoo-linux-musl The script can be easily patched to accept gentoo instead of unknown, my silly little patch from above does that and it works in this regard. (alpine does this too with their x86_64-alpine-linux-musl rusthost) |
Please let me know if my latest changes help any (and if the thumb code works). |
I can compile test the new thumbv7neon target, but can you explain to me how to runtime test it? It's not going to work with firefox out of the box for sure :) and also I don't really see that the missmatch in the rust chost has been dealed with? |
If I understand the problem correctly, the change should solve the mismatch because the |
ok, I'll give it a shot, but it's going to take a while. In the meantime, do you know how to tell if the neon and thumb stuff are working? A simple hello world type of thing? Also: which gcc are you using to build the stage0's? There's a llvm codegen bug in upstream's rust-1.38.0 stage0's, affecting armv7 only. |
This comment has been minimized.
This comment has been minimized.
I'm sorry, but it still doesn't work with the new patches:
it really seems that you will have to harmonize the rust host's: either x86_64-gentoo-linux-musl and armv7a-gentoo-linux-musl, or to stick to unknown instead. And well, not sure yet how to deal with the thumbv7neon target -.- |
Looks like I'll have to set up a Firefox cross-build environment to figure this out. I don't have one at the moment. It'll be at least a couple of weeks before I have a chance to look at this again, sorry. |
If you want to I can send you a copy of my /usr/armv7a-unknown-linux-musleabihf/ rootfs, tared up it's some 250mb. In any case, the problem here is the ambiguity of the rust chost names. All of the targets can be easily renamed, but I'm unaware of the consequences. |
two things I forgot: you'll need a binary pkg of dev-libs/nss compiled on real harddware (gentoo #699696) - if you don't have that, I can send you one. And I've got a little overlay for my personal stuff, my firefox ebuild works in terms of cross compiling. Those from tree propably not so much. |
This is moot with current firefox builds, since 72.0 the detection has been properly handled in firefox. This is only an issue in esr and mozilla project has no plans to backport fixes for detection, the next esr will handle it properly. |
I doubt it's fixed for armv7+neon, but will give it a try nonetheless. |
not working with neon instructions, as of today, since it's looking for the gnueabihf thumbv7neon bindings
|
Open a proper bug for arm breakage, this is not broken on ppc32 ppc64 arm64 or amd64 using smaeul's overlay. 0:11.11 checking for rustc... /usr/bin/rustc |
This isn't your overlay, and neither is this your bug. So I'm not sure why you even bother to comment. But if you need to know: there's #684896 for adding additional thumbv7neon target |
@stefson It looks like you added this target spec change in 1.49.0. Does that resolve the issue for you? |
I tested spidermonkey, which ships the same patchset as firefox, with rust-1.49 it works fine for rust_host need more time to solve this |
x86_64-unknown-linux-musl
becamex86_64_gentoo_linux_musl
armv7a-unknown-linux-musleabihf
becamearmv7a_gentoo_linux_musleabihf
Now, it is introduced by this patch: 0022-Add-gentoo-target-specs.patch
There isn't much of a description in that patch header, why this was introduced and so on. Is this related to the use of system_llvm? Can I override it with the old rusthost?
The reason for asking is, that the firefox config scripts know how to detect the old rusthost. With the new rusthost the scripts fail to detect rust and hang.
The text was updated successfully, but these errors were encountered: