Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Spidermonkey fails to install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Jarodiv
n00b
n00b


Joined: 17 Jan 2020
Posts: 36

PostPosted: Mon May 03, 2021 9:12 pm    Post subject: Spidermonkey fails to install Reply with quote

I'm trying to install a 62bit Gentoo with KDE in my PI4. Sadly I am stuck at a very early stage. Once setting the profile to "default/linux/arm/17.0/armv7a/desktop/plasma", emerge tries to install Spidermonkey (as a dependency of Network Manager with the "policykit" flag enabled by the profile).

So far so good, but Spidermonkey fails to install with the following error, I have been unable to find a solution for:

Code:
DEBUG: Creating `/var/tmp/portage/dev-lang/spidermonkey-78.10.0/temp/conftestjv7i1c3u.rs` with content:
DEBUG: | pub extern fn hello() { println!("Hello world"); }
DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=thumbv7neon-unknown-linux-gnueabihf -o /var/tmp/portage/dev-lang/spidermonkey-78.10.0/temp/conftestz0g43tid.rlib /var/tmp/portage/dev-lang/spidermonkey-78.10.0/temp/conftestjv7i1c3u.rs`
DEBUG: The command returned non-zero exit status 1.
DEBUG: Its error output was:
DEBUG: | error[E0463]: can't find crate for `std`
DEBUG: |   |
DEBUG: |   = note: the `thumbv7neon-unknown-linux-gnueabihf` target may not be installed
DEBUG: |
DEBUG: | error: aborting due to previous error
DEBUG: |
DEBUG: | For more information about this error, try `rustc --explain E0463`.
ERROR: Cannot compile for armv7a-unknown-linux-gnueabihf with /usr/bin/rustc


I've tried using "dev-lang/rust" and "dev-lang/rust-bin" as suggested in this thread:
-> https://forums.gentoo.org/viewtopic-p-8593854.html?sid=e8fe3934b4b7bc92156b099c14fec62c

The compiler settings I am using in my make.conf
Code:
COMMON_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"


Did anyone manage to get KDE installed on a PI4? Is it even possible?

EDIT: Noticed that the posted make.conf lines were taken from a different installation. Replaced them with the ones from the correct host.


Last edited by Jarodiv on Thu May 06, 2021 9:24 pm; edited 2 times in total
Back to top
View user's profile Send private message
redfish
n00b
n00b


Joined: 27 Apr 2021
Posts: 19

PostPosted: Mon May 03, 2021 9:44 pm    Post subject: Reply with quote

Quote:
default/linux/arm/17.0/armv7a


That doesn't look like the right profile selection. RPI4 is an aarch64 (ARMv8) platform.

Try the .../arm64 profile instead.
Back to top
View user's profile Send private message
Jarodiv
n00b
n00b


Joined: 17 Jan 2020
Posts: 36

PostPosted: Tue May 04, 2021 8:07 am    Post subject: Reply with quote

But I want it to be 32bit (in order to have Widevine support). My 64bit Gentoo already is working fine. I therefore followed the Pi3 guide in the Wiki (-> https://wiki.gentoo.org/wiki/Raspberry_Pi) plus several forum posts (e.g. for the CFLAGS).
Back to top
View user's profile Send private message
redfish
n00b
n00b


Joined: 27 Apr 2021
Posts: 19

PostPosted: Tue May 04, 2021 2:10 pm    Post subject: Reply with quote

Probably the thumbv7neon-unknown-linux-gnueabihf is not included in the build of rustc compiler and libs that you're using, for one reason or another.

Basic info about the missing target:
https://rust-lang.github.io/rustup-components-history/thumbv7neon-unknown-linux-gnueabihf.html

Not surprizingly, the std crate for this target is not present on an x86_64 installation of rustc either:
Code:

cat foo.rs
pub extern fn hello() { println!("Hello world");
rustc --crate-type staticlib -o foo.a --target=thumbv7neon-unknown-linux-gnueabihf foo.rs
error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7neon-unknown-linux-gnueabihf` target may not be installed

rustc --explain E0463
...
## Common causes for missing `std` or `core`

- You are cross-compiling for a target which doesn't have `std` prepackaged.
  Consider one of the following:
  + Adding a pre-compiled version of std with `rustup target add`
  + Building std from source with `cargo build -Z build-std`
  + Using `#![no_std]` at the crate root, so you won't need `std` in the first
    place.
- You are developing the compiler itself and haven't built libstd from source.
  You can usually build it with `x.py build library/std`. More information
  about x.py is available in the [rustc-dev-guide].
...


So, you need to get the std crate for this target built somehow; rust-bin is unlikely to help, because this target probably is not shipped in upstream builds. Presumably you need to re-build sys-devel/rust-std on your new armv7 (32-bit) Gentoo on the RPI (or via qemu), and hope that the ebuild will end up including this target based on the host that you are building on. If it does not, then I'd try to poke in the rust-std ebuild and figure out how it selects which targets to include. Also, there are probably two "modes" in which this rust-std could be emerged and used: cross and native; presumably your case is native, since you're building spidermoneky on the armv7 system directly.
Back to top
View user's profile Send private message
Jarodiv
n00b
n00b


Joined: 17 Jan 2020
Posts: 36

PostPosted: Thu May 06, 2021 9:12 pm    Post subject: Reply with quote

Tried building sys-devel/rust-std but it failed with
Code:
 * ERROR: sys-devel/rust-std-1.51.0::gentoo failed (pretend phase):
 *   rust-std should only be used for cross
 *
 * Call stack:
 *                ebuild.sh, line 125:  Called pkg_pretend
 *   rust-std-1.51.0.ebuild, line  60:  Called die
 * The specific snippet of code:
 *      is_cross || die "${PN} should only be used for cross"

No clue how to build it native, haven't found any corresponding use flags.

Btw, not sure if it changes something but I had the wrong make.conf lines in my initial post. Fixed that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum