Attempting to build a pair of cross-toolchains, one AMD64, the other for legacy targets (I use i486 since that's the lowest CPU that will presently run Linux). AMD64 toolchain command: crossdev -t x86_64-pc-linux-musl -s4 -S --env 'USE="-fortran -go"' i486 toolchain command: crossdev -t i486-pc-linux-musl -s4 -S --env 'USE="-cet -fortran -go"' crossdev and musl overlays present: crossdev overlay at 90fdf132345ab998d10bdb6a69a0b983233b3403 musl overlay at 900360e8b41b144abb20c4767c8bb23e5edaa838 Variations: with and without -S, different values for --l, --g tried. Reproducible: Always Steps to Reproduce: 1. layman -a musl && layman -a crossdev 2. crossdev -t x86_64-pc-linux-musl -s4 -S --env 'USE="-fortran -go"' Actual Results: Gets as far as gcc-stage2, which then dies with: checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. Full logs to come. Expected Results: Working toolchain for musl for 32-bit and 64-bit x86. The plan is to bootstrap some seed stages for musl stage builds.
Created attachment 872668 [details] i486-pc-linux-musl crossdev build info
Created attachment 872669 [details] i486-pc-linux-musl gcc stage2 build log
Created attachment 872670 [details] i486-pc-linux-musl gcc detailed build logs
Created attachment 872671 [details] x86_64-pc-linux-musl crossdev build info
Created attachment 872672 [details] x86_64-pc-linux-musl gcc stage2 build log
Created attachment 872673 [details] x86_64-pc-linux-musl gcc detailed build logs
configure:4253: /var/tmp/portage/cross-x86_64-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/ -B/usr/x86_64-pc-linux-musl/bin/ -B/usr/x86_64-pc-linux-musl/lib/ -isystem /usr/x86_64-pc-linux-musl/include -isystem /usr/x86_64-pc-linux-musl/sys-include -o conftest -g -O2 conftest.c >&5 /usr/libexec/gcc/x86_64-pc-linux-musl/ld: cannot find -lssp_nonshared: No such file or directory collect2: error: ld returned 1 exit status this induces the gcc_no_link inhibition that causes the error
From libatomic's config.log: configure:3758: checking whether the C compiler works configure:3780: /var/tmp/portage/cross-i486-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/xgcc -B/var/tmp/portage/cross-i486-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/ -B/usr/i486-pc-linux-musl/bin/ -B/usr/i486-pc-linux-musl/lib/ -isystem /usr/i486-pc-linux-musl/include -isystem /usr/i486-pc-linux-musl/sys-include -g -O2 conftest.c >&5 /usr/libexec/gcc/i486-pc-linux-musl/ld: cannot find -lssp_nonshared: No such file or directory collect2: error: ld returned 1 exit status configure:3784: $? = 1 I thought we'd fixed this finally?
try setting lt_cv_shlibpath_overrides_runpath=no
I'm guessing I didn't put `lt_cv_shlibpath_overrides_runpath` in the right place? checking whether the /var/tmp/portage/cross-x86_64-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/ -B/usr/x86_64-pc-linux-musl/bin/ -B/usr/x86_64-pc-linux-musl/lib/ -isystem /usr/x86_64-pc-linux-musl/include -isystem /usr/x86_64-pc-linux-musl/sys-include linker (/var/tmp/portage/cross-x86_64-pc-linux-musl/gcc-13.2.1_p20230826/work/build/./gcc/collect-ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [Makefile:12223: configure-target-libstdc++-v3] Error 1
Created attachment 872739 [details] x86_64-pc-linux-musl crossdev build info -- attempt 2
Created attachment 872740 [details] x86_64-pc-linux-musl gcc stage2 build log -- attempt 2
Created attachment 872741 [details] x86_64-pc-linux-musl gcc detailed build logs -- attempt 2
Created attachment 872742 [details] i486-pc-linux-musl crossdev build info -- attempt 2
Created attachment 872743 [details] i486-pc-linux-musl gcc stage2 build log -- attempt 2
Created attachment 872744 [details] i486-pc-linux-musl gcc detailed build logs -- attempt 2
I am trying the following, might be an environment variable that needs to be "exported" rather than just tacked onto the end of the top-level configure. crossdev -t x86_64-pc-linux-musl -s4 --env 'lt_cv_shlibpath_overrides_runpath=no USE="-fortran -go"' --l 1.2.4 crossdev -t i486-pc-linux-musl -s4 -S --env 'lt_cv_shlibpath_overrides_runpath=no USE="-cet -fortran -go"' --l 1.2.4 Builds have been running a little while now (which is par for the course, as the build host is about 13½ years old).
Nope… checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
(In reply to Stuart Longland from comment #18) > Nope… > > checking for shl_load... configure: error: Link tests are not allowed after > GCC_NO_EXECUTABLES. heh, well, you set it in the right place (the env was an option, as that variable is a cache variable). now it fails later in the configure script. I suppose we'll need to solve the original libssp-related link error. however, I could not reproduce it locally. I'll try crossdev -t i486-pc-linux-musl -s4 -S --env 'USE="-cet -fortran -go"' again now
Is there perhaps differences in the `libtool`/`autoconf`/`automake` parts of the GNU toolchain? I just tried the very latest (`git` upstream) release of `crossdev` and today's Portage tree, and got the same results.
I don't have a handle on this, but FWIW, the x86_64 crossdev command worked just fine for me.
I'll try with a different machine. I just bought a new laptop recently… and have a fresh shiny new Gentoo install going on it. Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/23.0/hardened, gcc-13, glibc-2.37-r7, 6.5.7-vk4msl-sb-57160-gc476bbdaa3d7 x86_64) ================================================================= System uname: Linux-6.5.7-vk4msl-sb-57160-gc476bbdaa3d7-x86_64-AMD_Ryzen_7_5800U_with_Radeon_Graphics-with-glibc2.37 KiB Mem: 65232676 total, 51142868 free KiB Swap: 83887100 total, 83887100 free Timestamp of repository gentoo: Thu, 19 Oct 2023 06:45:01 +0000 Head commit of repository gentoo: 34653ebd5f4fea3ca9808c1c45d28c7dfaba62ef sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.10.13::gentoo, 3.11.5::gentoo dev-lang/rust-bin: 1.71.1::gentoo dev-util/cmake: 3.26.5-r2::gentoo dev-util/meson: 1.2.1-r1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 16.0.6::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.au.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes local location: /home/portage/overlays/local masters: gentoo priority: 0 volatile: True ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE ipw3945 MPEG-4 MSttfEULA freedist fairuse szip linux-firmware bonnie bh-luxi sun-bcla-jai OSGi-Specification-2.0 android unRAR CMake" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-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/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe" DISTDIR="/home/portage/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" 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 multilib-strict network-sandbox news parallel-fetch 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" GENTOO_MIRRORS=" http://mirror.internode.on.net/pub/gentoo http://ftp.swin.edu.au/gentoo http://mirror.aarnet.edu.au/pub/gentoo" LANG="en_AU.UTF-8" LC_ALL="en_AU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en_AU en_GB en" PKGDIR="/home/portage/packages/vk4msl-sb" PORTAGE_BINHOST="ssh://portage-binhost@beast.local/home/portage/packages/beast/" 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="3d X a52 aac aalib acl acpi ads alsa amd64 amr ap apache2 apng aptx aspell attrib aufs autoipd avahi bash-completion bcg729 berkdb blas blaster bluetooth bluray branding btrfs bzip2 cairo caps cdda cddb cdr cephfs cet cgi charts cli client concurrent connection-sharing consolekit cracklib crypt cups curl cvs cxx datavis dbus declarative designer device-mapper devil dhclient dia dirac djvu dlz docbook dot dri dts dvb dvd dvdr eap-sim egl elogind emacs embedded emboss emf enchant encode examples exif extras faac fam farstream fax fcd fdt ffmpeg fftw filter firefox flac flash fontconfig fortran freetds ftdi fuse games gcrypt gd gdbm geolocation gif gimp gles gles2 gnumeric gnuplot gnutls go gpm gps grc gstreamer gtk gtk2-perl gtk3 gts gui h323 hackrf hamlib hardened hdf5 health html httpd hwaccel iconv icu ilbc introspection iptables ipv6 irda iscsi ithreads jack jingle jit jpeg jpeg2k kate kde kipi kontact kvm lapack lasi latex lcms ldap legacy-systray libkms libnotify libsamplerate libssh libtirpc libv4l2 live location lock lua luatex lvm lxc lzma mad maemo6 matplotlib matroska mdnsresponder-compat minizip mixemu mmap mng modemmanager modules mongodb mono mp3 mp4 mpeg mssql mtp mudflap multilib multimedia musepack musicbrainz mysql mysqli nat nbconvert ncurses netbeans netpbm network networkmanager nfs nls nokia notebook npm nptl nsplugin objc objc++ objc-gc ocr odbc ogg opengl openmp opus otr ozone p2p pam pango parted pcap pcre pcre32 pdf pdo perl phyp pie pkcs11 plasma plotutils pnat png policykit portaudio positioning postgres postscript ppds printsupport pulseaudio python qemu qml qt3support qt5 quick rbd rcs rdesktop readline realtime replaygain resolvconf rtf rtlsdr samba sasl scanner screencast script scripttools scxml sdl seccomp secure-delete security-key segger semantic-desktop sensors serial serialport session sipim sndfile snmp sound sound-server speex spell spice sql sqlite sqlite3 ssh sshdump ssl ssp startup-notification streaming stroke subversion svc svg syslog system-sqlite taglib tcl tcpd test-programs test-rust text theora threads tiff tinfo tk toolkit-scroll-bars tools touchpad truetype twolame udev udisks uml unicode upower usb usbredir utils uuid v4l v4l2 vaapi vala vde versaloon video vim-syntax virt-network virtfs vnc vorbis vpx wavelet wayland webchannel webdav-serf webengine webkit webp websockets webstart wide-int widgets wifi wimax winpopup wireshark-plugins wma-fixed wps wxwidgets x11extras x264 xattr xcb xcomposite xetex xft xine xinerama xkb xml xmlpatterns xmlrpc xmp xnest xpm xscreensaver xtpax xv xvfb xvid zeroconf zlib zstd zvbi" ABI_X86="64 32" ADA_TARGET="gnat_2021" APACHE2_MODULES="access_compat actions alias asis auth_basic auth_digest authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk cache_socache cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir dumpio env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat log_config log_forensic logio macro mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_html proxy_http proxy_scgi proxy_wstunnel ratelimit remoteip reqtimeout rewrite setenvif slotmem_shm socache_shmcb speling status substitute unique_id unixd userdir usertrack version vhost_alias xml2enc" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3" 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" GRUB_PLATFORMS="efi-64 efi-32 pc" INPUT_DEVICES="libinput evdev wacom synaptics" KERNEL="linux" L10N="en-AU en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript wiki-publisher" LLVM_TARGETS="*" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_9 python3_10 python3_11 python2_7" QEMU_SOFTMMU_TARGETS="*" QEMU_USER_TARGETS="*" RUBY_TARGETS="ruby31" VIDEO_CARDS="fbdev intel radeonhd radeon amdgpu nouveau radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat 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, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Oookay then… indeed, some gremlin lurking on the old desktop. I guess I need to audit the packages there and see what crusty old ring-in is causing the problem. !!! Repository 'x-local' is missing masters attribute in '/home/portage/overlays/local/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility !!! Repository 'x-local' is missing masters attribute in '/home/portage/overlays/local/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility !!! Repository 'x-local' is missing masters attribute in '/home/portage/overlays/local/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * crossdev version: 20230616 * Host Portage ARCH: amd64 * Host Portage System: x86_64-pc-linux-gnu (i686-pc-linux-gnu x86_64-pc-linux-gnu) * Target Portage ARCH: amd64 * Target System: x86_64-pc-linux-musl * Stage: 4 (C/C++ compiler) * USE=multilib: no * Target ABIs: default * binutils: binutils-[stable] * gcc: gcc-[stable] * headers: linux-headers-[stable] * libc: musl-[stable] * CROSSDEV_OVERLAY: /home/portage/overlays/local * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: / * Portage flags: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - * Log: /var/log/portage/cross-x86_64-pc-linux-musl-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-x86_64-pc-linux-musl-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-x86_64-pc-linux-musl-linux-headers.log * Emerging cross-linux-headers ... [ ok ] * Log: /var/log/portage/cross-x86_64-pc-linux-musl-musl.log * Emerging cross-musl ... [ ok ] * Log: /var/log/portage/cross-x86_64-pc-linux-musl-gcc-stage2.log * Emerging cross-gcc-stage2 ... [ ok ] vk4msl-sb /home/stuartl # echo $? 0 vk4msl-sb /home/stuartl # ls /var/db/pkg/cross-x86_64-pc-linux-musl/ binutils-2.40-r5 gcc-13.2.1_p20230826 linux-headers-6.1 musl-1.2.3-r7 vk4msl-sb /home/stuartl # ls /usr/portage/sys-libs/musl files Manifest metadata.xml musl-1.2.3.ebuild musl-1.2.3-r7.ebuild musl-1.2.3-r8.ebuild musl-1.2.4.ebuild musl-9999.ebuild