[32m * [39;49;00mPackage: sys-libs/zlib-1.3.1-r1:0/1 [32m * [39;49;00mRepository: gentoo [32m * [39;49;00mMaintainer: base-system@gentoo.org [32m * [39;49;00mUSE: elibc_musl kernel_linux m68k [32m * [39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox [32m*[0m Applying zlib-1.2.11-minizip-drop-crypt-header.patch ... [A[72C [34;01m[ [32;01mok[34;01m ][0m [32m*[0m Applying zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch ... [A[72C [34;01m[ [32;01mok[34;01m ][0m [32m*[0m Applying zlib-1.3.1-use-LDFLAGS-in-configure.patch ... [A[72C [34;01m[ [32;01mok[34;01m ][0m [32m*[0m Applying zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch ... [A[72C [34;01m[ [32;01mok[34;01m ][0m [32m*[0m .m68k: running multilib-minimal_abi_src_configure [32m*[0m /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/configure --shared --prefix=/usr --libdir=/usr/lib --uname=linux Using ar Checking for m68k-unknown-linux-musl-gcc... Checking for shared library support... Building shared library libz.so.1.3.1 with cc. Checking for size_t... Yes. Checking for off64_t... Yes. Checking for fseeko... Yes. Checking for strerror... Yes. Checking for unistd.h... Yes. Checking for stdarg.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf(). Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. [32m*[0m .m68k: running multilib-minimal_abi_src_compile cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -I/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/ -c -o example.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/test/example.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o adler32.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/adler32.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o crc32.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/crc32.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o deflate.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/deflate.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o infback.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/infback.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o inffast.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inffast.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o inflate.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inflate.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o inftrees.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inftrees.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o trees.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/trees.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o zutil.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/zutil.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o compress.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/compress.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o uncompr.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/uncompr.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o gzclose.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzclose.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o gzlib.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzlib.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o gzread.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzread.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -c -o gzwrite.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzwrite.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -I/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/ -c -o minigzip.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/test/minigzip.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/adler32.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/adler32.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/crc32.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/crc32.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/deflate.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/deflate.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/infback.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/infback.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/inffast.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inffast.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/inflate.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inflate.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/inftrees.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/inftrees.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/trees.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/trees.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/compress.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/compress.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/gzclose.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzclose.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/uncompr.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/uncompr.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/gzread.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzread.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/zutil.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/zutil.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/gzlib.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzlib.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -include zconf.h -DPIC -c -o objs/gzwrite.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/gzwrite.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -I/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/ -D_FILE_OFFSET_BITS=64 -c -o example64.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/test/example.c cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -I. -I/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/ -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/test/minigzip.c ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -Wl,-O1 -Wl,--as-needed -Wl,--undefined-version -o example example.o -L. libz.a cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -Wl,-O1 -Wl,--as-needed -Wl,--undefined-version -o minigzip minigzip.o -L. libz.a cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -Wl,-O1 -Wl,--as-needed -Wl,--undefined-version -o example64 example64.o -L. libz.a cc -pipe -O2 -D_LARGEFILE64_SOURCE=1 -Wl,-O1 -Wl,--as-needed -Wl,--undefined-version -o minigzip64 minigzip64.o -L. libz.a cc -shared -pipe -O2 -D_LARGEFILE64_SOURCE=1 -o libz.so.1.3.1 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc -Wl,-O1 -Wl,--as-needed -Wl,--undefined-version /usr/lib/gcc/m68k-gentoo-linux-musl/13/../../../../m68k-gentoo-linux-musl/bin/ld: read-only segment has dynamic relocations collect2: error: ld returned 1 exit status make: *** [Makefile:278: libz.so.1.3.1] Error 1 [31;01m*[0m ERROR: sys-libs/zlib-1.3.1-r1::gentoo failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m [31;01m*[0m If you need support, post the output of `emerge --info '=sys-libs/zlib-1.3.1-r1::gentoo'`, [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-libs/zlib-1.3.1-r1::gentoo'`. [31;01m*[0m The complete build log is located at '/var/log/portage/sys-libs:zlib-1.3.1-r1:20240217-130925.log'. [31;01m*[0m For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-libs/zlib-1.3.1-r1/temp/build.log'. [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-libs/zlib-1.3.1-r1/temp/environment'. [31;01m*[0m Working directory: '/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1-.m68k' [31;01m*[0m S: '/var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1' * Messages for package sys-apps/portage-3.0.61-r1:
Please don't wait for me on this one. I have little time to handle musl issues in general, let alone musl on m68k. immolo?
what I find suspicious is that it uses cc instead of gcc and therefore doesn't check for attribute visibility support (which would add -DHAVE_HIDDEN). E.g. on x86_64 * /var/tmp/portage/sys-libs/zlib-1.3.1-r1/work/zlib-1.3.1/configure --shared --prefix=/usr --libdir=/usr/lib --uname=linux Using x86_64-gentoo-linux-musl-ar Using x86_64-gentoo-linux-musl-ranlib Using x86_64-gentoo-linux-musl-nm Checking for x86_64-gentoo-linux-musl-gcc... Checking for shared library support... Building shared library libz.so.1.3.1 with x86_64-gentoo-linux-musl-gcc. Checking for size_t... Yes. Checking for off64_t... Yes. Checking for fseeko... Yes. Checking for strerror... Yes. Checking for unistd.h... Yes. Checking for stdarg.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf(). Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for attribute(visibility) support... Yes. is CC exported on this system?
Created attachment 885229 [details] Different system same seed build log I've just tested dilfridge's and my own m68k 23.0 musl test env and can't hit this bug. As per grobian's idea I also checked if CC was set and it was not so I don't think this is the issue. # echo $CC root@DaddyPig / # Please let me know in IRC if there is anything I can run to test while I have env running.
No, the idea is it SHOULD be exported within the ebuild.
I see, this was more a it doesn't seem to set for me either so I don't think it's the cause in this issue to get more ideas rather than being right or wrong, just to be clear on why I included it.
right, does the CHOST match? is there a m68k-unknown-linux-musl-gcc available?
Looks all good to me (I'll just provide an emerge --info so you have everything): root@DaddyPig / # whereis m68k-unknown-linux-musl-gcc m68k-unknown-linux-musl-gcc: /usr/bin/m68k-unknown-linux-musl-gcc root@DaddyPig / # emerge --info Portage 3.0.58 (python 3.11.7-final-0, default/linux/m68k/23.0/musl, gcc-13, musl-1.2.4-r1, 6.1.11-gentoo-dist m68k) ================================================================= System uname: Linux-6.1.11-gentoo-dist-m68k-with-libc KiB Mem: 65768616 total, 37845640 free KiB Swap: 8392700 total, 8392700 free Timestamp of repository gentoo: Sat, 17 Feb 2024 16:30:01 +0000 Head commit of repository gentoo: 95a7249bf6cbad67c02f4ee3de3faa8d08d2927f sh bash 5.2_p21-r1 ld GNU ld (Gentoo 2.41 p4) 2.41.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p21-r1::gentoo dev-build/autoconf: 2.71-r7::gentoo dev-build/automake: 1.16.5-r1::gentoo dev-build/cmake: 3.28.1::gentoo dev-build/libtool: 2.4.7-r1::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.3.0-r2::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 3.11.7::gentoo, 3.12.1::gentoo sys-apps/baselayout: 2.14-r1::gentoo sys-apps/openrc: 0.52.1::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/binutils: 2.41-r3::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.2.1_p20231014::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers) sys-libs/musl: 1.2.4-r1::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-jobs: 1 sync-rsync-verify-max-age: 3 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes Binary Repositories: gentoobinhost priority: 1 sync-uri: https://gentoo.osuosl.org/releases/m68k/binpackages/23.0/m68k_musl ACCEPT_KEYWORDS="m68k ~m68k" ACCEPT_LICENSE="@FREE" CBUILD="m68k-unknown-linux-musl" CFLAGS=" -pipe -O2" CHOST="m68k-unknown-linux-musl" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d" CXXFLAGS=" -pipe -O2" 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=" -pipe -O2" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync news parallel-fetch 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=" -pipe -O2" 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" MAKEOPTS="-j17 -l27" 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="acl big-endian bzip2 crypt iconv ipv6 lzma m68k ncurses nls pam pcre pic readline ssl unicode xattr zlib zstd" 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" 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="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="dummy fbdev" 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, 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