View previous topic :: View next topic |
Author |
Message |
vimja n00b
Joined: 26 Mar 2022 Posts: 23 Location: Bern, Switzerland
|
Posted: Mon Mar 11, 2024 12:06 am Post subject: Unable to build box86 on Ampere CPU |
|
|
Hi
I am unable to build box86 from the guru repository. box64 works just fine.
Code: | emerge --info app-emulation/box86 |
Code: |
Portage 3.0.63 (python 3.11.8-final-0, default/linux/arm64/17.0/hardened, gcc-13, glibc-2.39-r2, 5.10.0-23-arm64 aarch64)
=================================================================
System Settings
=================================================================
System uname: Linux-5.10.0-23-arm64-aarch64-with-glibc2.39
KiB Mem: 15969104 total, 145792 free
KiB Swap: 16777212 total, 15935740 free
Timestamp of repository gentoo: Sat, 09 Mar 2024 14:30:00 +0000
Head commit of repository gentoo: f5dc18753653a87e79cba24e379e84450bb0463a
Timestamp of repository guru: Sun, 10 Mar 2024 23:03:23 +0000
Head commit of repository guru: c8e5d928649963f8ae8c9e00b7e70ee73bee2397
Head commit of repository mnt-reform2: 5bf64f4facb916f88f26d22c4ce1557c27c1915c
Timestamp of repository wayland-desktop: Fri, 08 Mar 2024 06:20:43 +0000
Head commit of repository wayland-desktop: 8255e0a59f95f1d5e835bface72c8f80a31353d2
sh bash 5.2_p26
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p26::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.28.3::gentoo
dev-build/libtool: 2.4.7-r2::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.3.2::gentoo
dev-lang/perl: 5.38.2-r2::gentoo
dev-lang/python: 3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust: 1.75.0-r1::gentoo
sys-apps/baselayout: 2.14-r2::gentoo
sys-apps/openrc: 0.53::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/binutils: 2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.0::gentoo
sys-devel/gcc: 13.2.1_p20240210::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/lld: 16.0.6::gentoo, 17.0.6::gentoo, 18.1.0::gentoo
sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.0::gentoo
sys-kernel/linux-headers: 6.7::gentoo (virtual/os-headers)
sys-libs/glibc: 2.39-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-extra-opts:
sync-rsync-verify-max-age: 24
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-jobs: 1
guru
location: /var/db/repos/guru
sync-type: git
sync-uri: https://github.com/gentoo-mirror/guru.git
masters: gentoo
volatile: False
local
location: /var/db/repos/local
masters: gentoo
volatile: True
mnt-reform2
location: /var/db/repos/mnt-reform2
sync-type: git
sync-uri: https://git.chaostreffbern.ch/vimja/mnt-reform2-overlay.git
masters: gentoo
volatile: True
wayland-desktop
location: /var/db/repos/wayland-desktop
sync-type: git
sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
masters: gentoo
volatile: False
ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE GPLv3"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc+crypto -mtune=cortex-a53 -O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=armv8-a+crc+crypto -mtune=cortex-a53 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--backtrack=200 --with-bdeps=y --keep-going=y --ask-enter-invalid"
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"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict 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 xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="https://mirror.init7.net/gentoo/ https://mirror.netcologne.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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="aes alsa arm64 bzip2 cli crc32 crypt crypto cups dbus dri dvb edsp elogind ffmpeg flatpak fortran gdbm gif gimp gnome-keyring gstreamer gzip hardened hddtemp iconv ipv6 jit jpeg libtirpc lm_sensors lua lzma matroska mmap modules mplayer ncurses neon nls opengl openmp pam pcre pic pie png policykit posix pulseaudio readline seccomp sha1 sha2 smp split-usr sqlite sqlite3 ssl ssp syslog test-rust theora thumb thumb2 unicode usb v4 v5 v6 v7 v8 vaapi vfp vfp-d32 vfpv3 vfpv4 vim-syntax wayland wifi xattr xtpax zlib" ADA_TARGET="gnat_2021" 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="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v8" ELIBC="glibc" 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="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="vivante" 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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, 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
|
Here is the complete build log:
Code: |
* Package: app-emulation/box86-0.3.0:0
* Repository: guru
* Maintainer: rrogalski@tutanota.com
* USE: arm64 elibc_glibc kernel_linux
* FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking box86-0.3.0.tar.gz to /var/tmp/portage/app-emulation/box86-0.3.0/work
>>> Source unpacked in /var/tmp/portage/app-emulation/box86-0.3.0/work
>>> Preparing source in /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0 ...
* Source directory (CMAKE_USE_DIR): "/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0"
* Build directory (BUILD_DIR): "/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build"
* Hardcoded definition(s) removed in CMakeLists.txt:
* set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0 ...
* Source directory (CMAKE_USE_DIR): "/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0"
* Build directory (BUILD_DIR): "/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build"
cmake -C /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DNOGIT=1 -DARM_DYNAREC=no -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/gentoo_toolchain.cmake /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0
loading initial cache file /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/gentoo_common_config.cmake
-- Found Python3: /usr/bin/python3.12 (found version "3.12.2") found components: Interpreter
-- The C compiler identification is GNU 13.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/aarch64-unknown-linux-gnu-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/aarch64-unknown-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-unknown-linux-gnu-gcc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/usr/bin/aarch64-unknown-linux-gnu-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/CMakeFiles/CMakeScratch/TryCompile-m2oPhy'
Run Build Command(s): /usr/bin/ninja -v cmTC_9eae6
[1/2] /usr/bin/aarch64-unknown-linux-gnu-gcc -march=armv8-a+crc+crypto -mtune=cortex-a53 -O2 -pipe -m32 -o CMakeFiles/cmTC_9eae6.dir/testCCompiler.c.o -c /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/CMakeFiles/CMakeScratch/TryCompile-m2oPhy/testCCompiler.c
FAILED: CMakeFiles/cmTC_9eae6.dir/testCCompiler.c.o
/usr/bin/aarch64-unknown-linux-gnu-gcc -march=armv8-a+crc+crypto -mtune=cortex-a53 -O2 -pipe -m32 -o CMakeFiles/cmTC_9eae6.dir/testCCompiler.c.o -c /var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build/CMakeFiles/CMakeScratch/TryCompile-m2oPhy/testCCompiler.c
aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m32’
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:77 (project)
-- Configuring incomplete, errors occurred!
* ERROR: app-emulation/box86-0.3.0::guru failed (configure phase):
* cmake failed
*
* Call stack:
* ebuild.sh, line 136: Called src_configure
* environment, line 2179: Called cmake_src_configure
* environment, line 1032: Called die
* The specific snippet of code:
* "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
*
* If you need support, post the output of `emerge --info '=app-emulation/box86-0.3.0::guru'`,
* the complete build log and the output of `emerge -pqv '=app-emulation/box86-0.3.0::guru'`.
* The complete build log is located at '/var/tmp/portage/app-emulation/box86-0.3.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/box86-0.3.0/temp/environment'.
* Working directory: '/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0_build'
* S: '/var/tmp/portage/app-emulation/box86-0.3.0/work/box86-0.3.0' |
[/code] |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54638 Location: 56N 3W
|
Posted: Mon Mar 11, 2024 12:33 am Post subject: |
|
|
vimja,
Code: | aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m32’ |
On a multilib system, -m32 tells gcc to emit 32 bit code.
There is no multilib in the aarch64 world, so building for 32 bit is not supported.
Its possible to run a 32 bit userland on top of a 64 bit arm kernel, but there is no mixing 32 and 64 bit code.
The arm 32 bit instruction set is optional in aarch64 silicon. Not all aarch64 CPUs can run 32 bit code. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54638 Location: 56N 3W
|
Posted: Mon Mar 11, 2024 12:35 am Post subject: |
|
|
Moved from Portage & Programming to Gentoo on ARM.
Ampere is an arm system _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vimja n00b
Joined: 26 Mar 2022 Posts: 23 Location: Bern, Switzerland
|
Posted: Mon Mar 11, 2024 12:40 am Post subject: |
|
|
NeddySeagoon wrote: | vimja,
Code: | aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m32’ |
On a multilib system, -m32 tells gcc to emit 32 bit code.
There is no multilib in the aarch64 world, so building for 32 bit is not supported.
Its possible to run a 32 bit userland on top of a 64 bit arm kernel, but there is no mixing 32 and 64 bit code.
The arm 32 bit instruction set is optional in aarch64 silicon. Not all aarch64 CPUs can run 32 bit code. |
That makes total sense. Somehow I just expected box86 to make x86 work on 64bit ARM. But now that I've read the the box86 documentation, they make it very clear this is not the case.
My bad, sorry about that. |
|
Back to top |
|
|
Aslantis n00b
Joined: 11 Aug 2021 Posts: 16 Location: America
|
Posted: Tue Aug 06, 2024 2:12 am Post subject: |
|
|
Hello vimja!! I'm the box* ebuild maintainer in guru.
Yes, box86 requires a compiler capable of emitting 32 bit code, and also relies on having a valid libc in `/lib`. Negril recently brought to my attention that multilib profiles aren't much of a thing for non x86 architectures, but for the devoted there's a few solutions.
The most 'correct' way I am aware of (and someone here can correct me if I'm wrong) is to make a custom profile and use it. It probably isn't *that* hard and I've been meaning to give it a shot, but haven't yet.
The way I do it personally (easy way) is to install the 32 bit version of your architecture in crossdev ( see crossdev's page on our wiki ) and then follow sam's instructions (here)[https://gist.github.com/thesamesam/f43490fa3e290701c09073b0befbe21f]. Then, `cp -r /usr/$(CHOST)/lib /lib && ln -s /usr/$(CHOST)/lib /lib`, then set the CC and CXX to the crossdev installed toolchains in package.env. This is a pretty suboptimal way, and ___DO NOT REMOVE/UNINSTALL THE CROSSDEV INSTANCE WITHOUT UNSETTING THE SYMLINK___. For box86, you don't actually need to set any symlinks as its only dependency is libc, but if you plan to be running 32bit code on your system it'd be nice to have an easy way to install 32bit libs on your system.
I'm going to be submitting some commits to improve the 64bit support in box86's ebuild, with a more helpful error message.
Also: bugzilla reports are nice because I'm automatically emailed, I will not be aware of any forum posts unless you reach out to me. Please ping me on IRC (rrogalski on libera and oftc) or send me an email (current one found in metadata.xml) for any forum posts regarding box or any other packages I maintain
P.S: yes I know the box* versions are slightly old, last time I tried revbumping I ran into a test regression on ppcle, when the fix is in a tagged release I'll update it[/url]
vimja wrote: | NeddySeagoon wrote: | vimja,
Code: | aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m32’ |
On a multilib system, -m32 tells gcc to emit 32 bit code.
There is no multilib in the aarch64 world, so building for 32 bit is not supported.
Its possible to run a 32 bit userland on top of a 64 bit arm kernel, but there is no mixing 32 and 64 bit code.
The arm 32 bit instruction set is optional in aarch64 silicon. Not all aarch64 CPUs can run 32 bit code. |
That makes total sense. Somehow I just expected box86 to make x86 work on 64bit ARM. But now that I've read the the box86 documentation, they make it very clear this is not the case.
My bad, sorry about that. |
_________________ Thank you for keeping Gentoo awesome, if you're a developer or just answering questions, you guys are what make this the best distribution. |
|
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
|
|