View previous topic :: View next topic |
Author |
Message |
M95D Tux's lil' helper
Joined: 03 Jan 2020 Posts: 94
|
Posted: Thu Jul 11, 2024 10:11 am Post subject: "Exec format error" on ARM MUSL |
|
|
Asus TinkerBoard S (ARM 32bit, Cortex A17, VFPv3, NEON, 2GB RAM)
Gentoo MUSL (profile: default/linux/arm/23.0/split-usr/armv7a_hf/musl)
Using kernel 6.10.0-rc6 from github.com/torvalds/linux, self-built, no modules, all drivers built-in, no initramfs
I get this error when emerge-ing dev-lang/rust-1.79.0:
Code: |
>>> Source configured.
>>> Compiling source in /var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src ...
Building bootstrap
running: /var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/src/bootstrap/Cargo.toml --verbose --verbose --verbose --locked --frozen
Traceback (most recent call last):
File "/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/./x.py", line 50, in <module>
bootstrap.main()
~~~~~~~~~~~~~~^^
File "/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/src/bootstrap/bootstrap.py", line 1165, in main
bootstrap(args)
~~~~~~~~~^^^^^^
File "/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/src/bootstrap/bootstrap.py", line 1132, in bootstrap
build.build_bootstrap()
~~~~~~~~~~~~~~~~~~~~~^^
File "/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/src/bootstrap/bootstrap.py", line 888, in build_bootstrap
run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rustc-1.79.0-src/src/bootstrap/bootstrap.py", line 182, in run
ret = subprocess.Popen(args, **kwargs)
File "/usr/lib/python3.13/subprocess.py", line 1036, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
...<5 lines>...
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 1966, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rust-stage0/bin/cargo'
|
I suspect it has something to do with my kernel. What should I check?
Thank you. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22619
|
Posted: Thu Jul 11, 2024 2:17 pm Post subject: |
|
|
The prebuilt cargo binary from upstream is not compatible with your current configuration. This could be a problem with your configuration, or it could be an ebuild problem that it fetched an inappropriate prebuilt cargo binary. What is the output of emerge --info; file '/var/tmp2/portage/portage/dev-lang/rust-1.79.0/work/rust-stage0/bin/cargo' after this fails? |
|
Back to top |
|
|
M95D Tux's lil' helper
Joined: 03 Jan 2020 Posts: 94
|
Posted: Thu Jul 11, 2024 9:01 pm Post subject: |
|
|
ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.101, with debug_info, not stripped
Code: |
Portage 3.0.65 (python 3.12.4-final-0, default/linux/arm/23.0/split-usr/armv7a_hf/musl, gcc-13, musl-1.2.4-r2, 6.10.0-rc6-M95D-00067-g8a9c6c40432e-dirty armv7l)
=================================================================
System uname: Linux-6.10.0-rc6-M95D-00067-g8a9c6c40432e-dirty-armv7l-ARMv7_Processor_rev_1_-v7l-with-libc
KiB Mem: 2059396 total, 64172 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Tue, 02 Jul 2024 01:45:00 +0000
Head commit of repository gentoo: a403fe6c61d1aaeecd58d521f3def2f6d3513449
Timestamp of repository khoverlay: Sat, 29 Jun 2024 08:48:57 +0000
Head commit of repository khoverlay: 9a1039ae55deae3fbc7654d299fb6224cac449bc
Head commit of repository stefan_overlay: 8aafe567f495aed524a903e8e6da4dfa3207f9fb
sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.10.1 [disabled]
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p26-r6::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.29.3::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.4.1::gentoo
dev-lang/perl: 5.40.0::gentoo
dev-lang/python: 3.11.9-r1::gentoo, 3.12.4_p1::gentoo, 3.13.0_beta3::gentoo
dev-util/ccache: 4.10.1::gentoo
sys-apps/baselayout: 2.15::gentoo
sys-apps/openrc: 0.54.2::gentoo
sys-apps/sandbox: 2.39::gentoo
sys-devel/binutils: 2.40-r5::gentoo, 2.41-r2::gentoo, 2.42-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 17.0.6::gentoo
sys-devel/gcc: 13.2.1_p20231014::gentoo, 14.1.1_p20240622::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/llvm: 17.0.6::gentoo, 18.1.8::gentoo
sys-kernel/linux-headers: 6.9::gentoo (virtual/os-headers)
sys-libs/musl: 1.2.4-r2::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-max-age: 3
sync-rsync-verify-metamanifest: no
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
khoverlay
location: /var/db/repos/khoverlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/khoverlay.git
masters: gentoo
volatile: False
stefan_overlay
location: /var/db/repos/stefan_overlay
sync-type: git
sync-uri: https://github.com/stefan11111/stefan_overlay.git
masters: gentoo
volatile: False
m95d
location: /mnt/Work/Files/portage.git
masters: gentoo
priority: 1
volatile: True
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: http://ftp.romnet.org/gentoo/releases/arm/binpackages/23.0/armv7a_hf
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE fairuse GOG-EULA"
CBUILD="armv7a-unknown-linux-musleabihf"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard"
CHOST="armv7a-unknown-linux-musleabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync merge-wait network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -fomit-frame-pointer -march=armv7ve+neon-vfpv3 -mcpu=cortex-a17 -mfpu=neon-vfpv3 -mfloat-abi=hard"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en"
MAKEOPTS="-j4"
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"
SHELL="/bin/bash"
USE="aio alsa arm boost crypt eudev fbcon gpm graphite iconv ipv6 mad metric minimal ncurses nls openmp pcre readline seccomp smp split-usr ssl test-rust threads unicode" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="cpu cpufreq cpusleep memory hugepages swap irq sensors thermal battery md disk df uptime load entropy users ethstat wireless interface protocols tcpconns dns hddtemp" CPU_FLAGS_ARM="v7 vfpv3 vfp-d32 neon edsp thumb thumb2 v4 v5 v6 vfp" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="ARM" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31" SANE_BACKENDS="net epson epson2 epsonds" VIDEO_CARDS="fbdev panfrost" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
|
Code: |
TkB ~ # lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A17
Model: 1
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Stepping: r0p1
CPU(s) scaling MHz: 23%
CPU max MHz: 1800.0000
CPU min MHz: 126.0000
BogoMIPS: 39.16
Flags: half fastmult vfp edsp neon vfpv3 tls vfpv4 idiva vfpd32 lpae evtstrm
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Vulnerable
Srbds: Not affected
Tsx async abort: Not affected
|
LE:
I tried an older version - same problem.
Here's a readelf output:
Code: |
TkB / # readelf -h /var/tmp/portage/dev-lang/rust-1.77.1/work/rust-stage0/bin/cargo
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Position-Independent Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x114c6d
Start of program headers: 52 (bytes into file)
Start of section headers: 35890700 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 10
Size of section headers: 40 (bytes)
Number of section headers: 40
Section header string table index: 39
|
|
|
Back to top |
|
|
|
|
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
|
|