I updated media-gfx/exiv2 back in late October to version 0.28.0, and then the subsequent rebuild of geeqie version 2.0.1-r4 failed with various exiv2 related errors. That's when I tried to update geeqie to version 2.1 and got the reported error. Reproducible: Always Portage 3.0.59 (python 3.11.7-final-0, default/linux/amd64/17.0/musl/hardened/selinux, gcc-13, musl-1.2.3-r8, 6.1.67-gentoo x86_64) ================================================================= System uname: Linux-6.1.67-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-libc KiB Mem: 65755656 total, 1431852 free KiB Swap: 3145724 total, 3141332 free Timestamp of repository gentoo: Sat, 30 Dec 2023 16:30:01 +0000 Head commit of repository gentoo: ac67e19de4af65d63873132d484c0f50e534a85d Head commit of repository libressl: b5b8fc4c5e1f9b2dd25987d1f1b833a44dfcf9fb Head commit of repository musl: 900360e8b41b144abb20c4767c8bb23e5edaa838 Head commit of repository mv: 61e8c7022262cfd6bae991bb2b3c703e8b2c0098 Head commit of repository science: ec8bf3e565658f16ac5d6f62f65099529c80601b Head commit of repository zx2c4: ac2514ea1757196324cf950665c516a5e5026dd5 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.41 p2) 2.41.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 3.11.7::local dev-lang/rust: 1.71.1::local dev-util/cmake: 3.27.7::gentoo dev-util/meson: 1.2.3::gentoo sec-policy/selinux-base: 2.20231002-r2::gentoo sys-apps/baselayout: 2.14-r1::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.41-r2::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 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: 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/libselinux: 3.5-r1::gentoo sys-libs/musl: 1.2.3-r8::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: 24 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 libressl location: /var/db/repos/libressl sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/proj/libressl.git masters: gentoo priority: 50 volatile: False musl location: /var/db/repos/musl sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/musl.git masters: gentoo priority: 50 volatile: False mv location: /var/db/repos/mv sync-type: git sync-uri: https://anongit.gentoo.org/git/user/mv.git masters: gentoo priority: 50 volatile: False science location: /var/db/repos/science sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/sci.git masters: gentoo priority: 50 volatile: False zx2c4 location: /var/db/repos/zx2c4 sync-type: git sync-uri: https://git.zx2c4.com/portage masters: gentoo priority: 50 volatile: False local location: /var/db/repos/local masters: gentoo priority: 1000 volatile: False Installed sets: @initrd ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-gentoo-linux-musl" CFLAGS="-march=znver1 -O2 -pipe" CHOST="x86_64-gentoo-linux-musl" CONFIG_PROTECT="/etc /usr/bin/startx /usr/lib/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/bind /var/lib/i2pd/certificates" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=znver1 -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y" 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="-march=znver1 -O2 -pipe" 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 network-sandbox news parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=znver1 -O2 -pipe" GENTOO_MIRRORS="https://distfiles.gentoo.org/" INSTALL_MASK="charset.alias /usr/share/locale/locale.alias /etc/dbus-1 /etc/pam.d /etc/systemd /lib/systemd /usr/lib/modules-load.d /usr/lib/systemd /usr/lib64/systemd /usr/share/dbus-1 /usr/share/polkit-1" LANG="C.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j15 -l13.5" 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="X aalib acl acpi amd64 audiofile audit blas bzip2 cairo caps clamav clang cli crypt cups curl djvu dri dv emacs emboss exif expat fbcon ffmpeg fftw flac fltk fontconfig fortran gdbm geoip gif git gnuplot gpm gsl hardened hddtemp hdf5 heif iconv imagemagick imlib inotify ipv6 jack jbig jemalloc jpeg jpeg2k json ladspa lapack lash latex lcms ldap libcaca libressl libsamplerate libtirpc llvm lm-sensors lmdb lz4 lzma lzo mad man memcached milter mime mng mp3 ncurses netcdf nis nntp nptl offensive ofx ogg openal openexr opengl openmp opus oss pdf php pic pie plotutils png posix postgres postscript raw readline rss sasl savedconfig sctp seccomp selinux slp smartcard smp sndfile snmp sockets socks5 speex split-usr sqlite ssl ssp svg syslog szip tcl test-rust theora threads tiff tk truetype unicode usb v4l vaapi valgrind vdpau verify-sig vhosts vnc vorbis vulkan wavpack webp wmf xattr xcb xface xft xinetd xmp xmpp xpm xtpax xv zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="ptp2" COLLECTD_PLUGINS="apcups bind capabilities cgroups check_uptime connectivity conntrack cpu cpufreq cpusleep csv df disk dns entropy ethstat exec fhcount filecount fscache hddtemp hugepages interface ipc iptables irq load logfile logparser match_empty_counter match_hashed match_regex match_timediff match_value mbmon memcached memory mqtt network nginx notify_email ntpd numa nut openldap openvpn pcie_errors ping postgresql processes procevent rrdcached rrdtool sensors serial smart swap sysevent syslog tail tcpconns ted thermal threshold uptime users uuid vmem write_http write_log write_syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="libressl" ELIBC="musl" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" NGINX_MODULES_HTTP="access addition auth_basic auth_request autoindex browser cache_purge charset dav dav_ext echo empty_gif fancyindex fastcgi geo gzip limit_conn limit_req map memc memcached metrics proxy realip referer rewrite scgi secure_link security split_clients ssi stub_status upload_progress upstream_check upstream_ip_hash userid uwsgi vhost_traffic_status xslt" NGINX_MODULES_MAIL="imap pop3 smtp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="aarch64 i386 mips64 mips64el ppc64 riscv64 sparc64 x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby31" SANE_BACKENDS="epson epson2 epsonds hp5400" VIDEO_CARDS="amdgpu radeonsi" 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, 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
Created attachment 881260 [details] build.log
Do you only get the error with geeqie? Checking the code, my theory is that glibc includes locale.h by default (or at least sets LC_ALL), while musl would require explicit include Can you try adding "#include <locale.h>" to the top of src/misc.cc? Other users of LC_ALL constant in code have the include except this file
The proposed patch solves the issue, the package now merges successfully. Thanks for the suggestion.
Thanks for confirmation, it turns out upstream master also had similar fix: https://github.com/BestImageViewer/geeqie/commit/01d8762d45a2f3871cfd09176edbccdbe73a6767 Adding it to current ebuild
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=252054c821aa8caf844a1c61b79fc42deff53afc commit 252054c821aa8caf844a1c61b79fc42deff53afc Author: Bernard Cafarelli <voyageur@gentoo.org> AuthorDate: 2024-01-23 21:18:06 +0000 Commit: Bernard Cafarelli <voyageur@gentoo.org> CommitDate: 2024-01-23 21:18:44 +0000 media-gfx/geeqie: fix compilation with musl Missing locale.h include, already fixed usptream in master Closes: https://bugs.gentoo.org/921193 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org> media-gfx/geeqie/files/geeqie-2.1-locale.patch | 22 ++++++++++++++++++++++ media-gfx/geeqie/geeqie-2.1-r1.ebuild | 1 + 2 files changed, 23 insertions(+)