When cross compiling for `x86_64-pc-linux-musl` net-misc/rsync-3.2.3-r5 it fails due to missing ifunc on musl and asks to disable simd. The simd was always disabled in musl overlay for rsync however the commit https://github.com/gentoo/musl/commit/f75ebda71b2844cbb82dfe5b0ea7b2a7c83195a3 removed everything related to rsync without porting fix to gentoo's rsync ebuild (look for `--disable-simd`). Reproducible: Always Steps to Reproduce: Build rsync. Actual Results: It doesn't build. Expected Results: It builds. Portage 3.0.30 (python 3.8.12-final-0, default/linux/amd64/17.0/musl, gcc-11.2.1, musl-1.2.2-r7, 5.16.11-gentoo-dist x86_64) ================================================================= System uname: Linux-5.16.11-gentoo-dist-x86_64-Intel-R-_Core-TM-_i9-9900K_CPU_@_3.60GHz-with-glibc2.33 KiB Mem: 65699628 total, 51532748 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Fri, 11 Mar 2022 20:05:03 +0000 sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-lang/python: 3.9.9-r1::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/gcc: 11.2.1_p20220115::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/musl: 1.2.2-r7::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-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-musl" CONFIG_PROTECT="/etc /usr/share/config /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="-O2 -pipe -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" 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" 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 network-sandbox news nodoc noinfo noman 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://distfiles.gentoo.org" INSTALL_MASK="charset.alias /usr/share/locale/locale.alias" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j16" PKGDIR="/usr/x86_64-pc-linux-musl/packages/" PORTAGE_CONFIGROOT="/usr/x86_64-pc-linux-musl/" 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="/usr/x86_64-pc-linux-musl/tmp/" SHELL="/bin/zsh" USE="acl amd64 bzip2 cli crypt dri fortran git iconv ipv6 libglvnd libtirpc ncurses networkmanager nls nptl openmp pam pcre readline seatd seccomp split-usr ssl unicode xattr zlib {ARCH}" ABI_X86="64" ADA_TARGET="gnat_2020" 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_X86="sse2" ELIBC="musl" 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" 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-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 766806 [details] Compilation failure log
FWIW, the fact that this is cross-compilation is quite relevant I think, given that we've had a loooot of bugs related to that w/ rsync + SIMD, even outside of musl.
what confuses me: khnum% emerge --info | head -n1 Portage 3.0.30 (python 3.9.9-final-0, default/linux/ppc64/17.0/musl, gcc-11.2.0, musl-1.2.2-r7, 5.15.23-gentoo ppc64) khnum% qlist -IvR rsync net-misc/rsync-3.2.3-r5::gentoo sokaris% emerge --info | head -n1 Portage 3.0.30 (python 3.9.9-final-0, default/linux/arm64/17.0/musl, gcc-11.2.0, musl-1.2.2-r7, 5.15.23-gentoo aarch64) sokaris% qlist -IvR rsync net-misc/rsync-3.2.3-r5::gentoo None of these are cross, but can you show your configure output? For it looks like it wrongly determines it can use the simd instructions while it shouldn't. I don't have x64 platform using musl, so that may be a reason too.
Created attachment 766848 [details] Configure output
My host has all simd stuff, my target won't have it though. The only simd stuff it'll have is sse2.
I was able to build rsync from ::gentoo without any issue in chroot. So it looks like cross issue indeed.
hmmm, the cross patch is supposed to address, exactly this. I wonder what happen without that patch applied. It replaces build with host, but I wonder if it shouldn't use target instead.
(In reply to Fabian Groffen from comment #7) > It replaces build with host, but I wonder if it shouldn't use target instead. Unlikely; we are not building a cross compiler here.