Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 761298 - dev-lang/spidermonkey-78.6.0[cpu_flags_arm_neon]: fails to build with "the `thumbv7neon-unknown-linux-gnueabihf` target may not be installed" on arm
Summary: dev-lang/spidermonkey-78.6.0[cpu_flags_arm_neon]: fails to build with "the `t...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-23 00:39 UTC by Sam James
Modified: 2022-03-25 16:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_761298.txt,20.81 KB, text/plain)
2020-12-23 00:39 UTC, Sam James
Details
build.log (working for comparison) (file_761298.txt,60.76 KB, text/plain)
2020-12-23 00:40 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-23 00:39:47 UTC
Created attachment 679269 [details]
build.log

checking for rust target triplet...
DEBUG: Creating `/var/tmp/portage/dev-lang/spidermonkey-78.6.0/temp/conftestjg7filst.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.6.0/temp/conftestfvp_xjz2.rlib /var/tmp/portage/dev-lang/spidermonkey-78.6.0/temp/conftestjg7filst.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
The target may be unsupported, or you may not have
a rust std library for that target installed. Try:

  rustup target add thumbv7neon-unknown-linux-gnueabihf
----

The interesting thing here is that it's not the same as the weird musl tuple misidentification which I thought I keep hitting.
Interestingly, this completely builds fine with tests?

----
Portage 3.0.9 (python 3.7.9-final-0, default/linux/arm/17.0/armv7a, gcc-9.3.0, glibc-2.32-r3, 5.4.84 armv8l)
=================================================================
System uname: Linux-5.4.84-armv8l-ARMv8_Processor_rev_1_-v8l-with-gentoo-2.7
KiB Mem:   131636532 total,  73006500 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 22 Dec 2020 23:40:42 +0000
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.6.12-r1::gentoo, 3.7.9-r1::gentoo, 3.8.6-r1::gentoo, 3.9.0-r1::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="@FREE"
CBUILD="armv7a-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -frecord-gcc-switches"
CHOST="armv7a-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -frecord-gcc-switches"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --complete-graph --usepkg=y --with-bdeps=y --deep"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -frecord-gcc-switches"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl arm berkdb bzip2 cli crypt dbus dri elogind fortran gdbm iconv ipv6 libglvnd ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python2_7 python3_8 python3_6 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-23 00:40:47 UTC
Created attachment 679272 [details]
build.log (working for comparison)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-23 00:41:58 UTC Comment hidden (obsolete)
Comment 3 tt_1 2020-12-23 09:43:20 UTC
Do you have the additional thumbv7neon-unknown-linux-gnueabihf rustlib installed with your version dev-lang/rust? I never had enough trust into my little 1gb arm device to compile dev-lang/rust with these options in /etc/portage/env/dev-lang/rust file: 

I_KNOW_WHAT_I_AM_DOING_CROSS=yes
RUST_CROSS_TARGETS=(
	"ARM:thumbv7neon-unknown-linux-gnueabihf:armv7a-unknown-linux-gnueabihf"
)


per https://github.com/gentoo/gentoo/blob/master/dev-lang/rust/rust-1.46.0.ebuild#L335


This is triggered only when passing the "--with-thumb=yes --with-thumb-interwork=no" part of the ebuild: 

https://github.com/gentoo/gentoo/blob/master/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild#L294

since clang doesn't understand the thumb stuff. 

To clarify: is this about thumbv7neon rustlib not detected by spidermonkey?
Comment 4 Nuno 2021-01-31 16:10:13 UTC
(In reply to tt_1 from comment #3)
> I never had enough trust into my
> little 1gb arm device to compile dev-lang/rust

I'm experiencing this issue on an armv7a-unknown-linux-gnueabihf chroot running on an amd64 host using qemu-arm. May make it easier to reproduce.


I had the same error and was able to compile dev-lang/spidermonkey-78.6.0 after disabling neon, i.e. changing:

    CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 v4 v5 v6 v7 thumb2

to

    CPU_FLAGS_ARM: edsp thumb vfp vfpv3 vfpv4 vfp-d32 v4 v5 v6 v7 thumb2


I have dev-lang/rust-bin-1.46.0 installed.