Summary: | dev-lang/php USE=iconv with sys-libs/musl - configure: error: Please reinstall the iconv library. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | James Taylor <james> |
Component: | [OLD] Development | Assignee: | PHP Bugs <php-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugs.php.net/bug.php?id=68685 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
configure configure.in config.log php-5.5.20.ebuild.patch |
Description
James Taylor
2014-12-27 08:47:59 UTC
1) Please attach the entire build log to this bug report. 2) Please post your `emerge --info' output in a comment. Created attachment 392622 [details]
build.log
Here's the build.log for the failed build. I forgot to add it to the bug report when I originally submitted it :)
This is from a successful build. Portage 2.2.14 (python 2.7.9-final-0, hardened/linux/musl/amd64, gcc-4.8.3, musl-1.1.5-r1, 3.17.4-hardened-r1-nimbus x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.17.4-hardened-r1-nimbus-x86_64-Intel-R-_Xeon-R-_CPU_E5-2680_v2_@_2.80GHz-with-gentoo-2.2 KiB Mem: 1013292 total, 132264 free KiB Swap: 2097148 total, 1962396 free Timestamp of tree: Sun, 28 Dec 2014 12:15:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p53 dev-lang/perl: 5.18.2-r2 dev-lang/python: 2.7.9-r1, 3.3.5-r1, 3.4.1 dev-util/ccache: 3.1.9-r4 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4-r99::hardened-dev sys-apps/sandbox: 2.6-r999::hardened-dev sys-devel/autoconf: 2.69 sys-devel/automake: 1.13.4 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.8.3-r99::hardened-dev sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers) Repositories: gentoo x-portage hardened-dev nginx-overlay mva jamestr kveer powerdns-overlay ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-gentoo-linux-musl" CFLAGS="-march=native -O2 -fstack-protector-all -fomit-frame-pointer" CHOST="x86_64-gentoo-linux-musl" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -fstack-protector-all -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-a" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo/" INSTALL_MASK="charset.alias" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j1" 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" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/hardened-development /var/lib/layman/nginx-overlay /var/lib/layman/mva /var/lib/layman/jamestr /var/lib/layman/kveer /var/lib/layman/powerdns-overlay" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="amd64 bash-completion cli cracklib crypt cxx dlz dri fortran hardened iconv ipv6 mmx modules ncurses nls nptl offensive openmp pax_kernel pcre pic readline session sse sse2 ssl ssse3 tcpd unicode vim-syntax xattr zlib zsh-completion" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= dev-lang/php-5.5.20 was built with the following: USE="cli crypt ctype curl fileinfo filter fpm gd hash ipv6 json mysql mysqli nls opcache pdo phar posix postgres readline session simplexml sockets sqlite ssl tokenizer unicode xml zlib -apache2 -bcmath -berkdb -bzip2 -calendar -cdb -cgi -cjk -debug -embed -enchant -exif (-firebird) -flatfile (-frontbase) -ftp -gdbm -gmp -iconv -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit -libmysqlclient -mhash -mssql (-oci8-instant-client) -odbc -pcntl -qdbm -recode (-selinux) -sharedmem -snmp -soap -spell (-sybase-ct) (-systemd) -sysvipc -threads -tidy -truetype -vpx -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip" It DEPENDs on virtual/libiconv properly already. So what is configure missing? Please attach this file: configure: error: Please reinstall the iconv library. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/dev-lang/php-5.5.20/work/sapis-build/cli/config.log Created attachment 392624 [details]
configure
Created attachment 392626 [details]
configure.in
Created attachment 392628 [details]
config.log
Woops, attached the wrong file >.>
sys-libs/musl provides iconv in the main libc.so, so libiconv isn't needed. All appropriate header files are also supplied. The problem lies in the line $(use_with iconv iconv $(use elibc_glibc || echo "${EPREFIX}"/usr)) of the ebuild. (musl also provides iconv in libc.) I'll try setting up an environment with musl to test this. I skimmed through the macros and it seems like it only checks for headers, but I might have missed something. You should also file an upstream bug as they might be able to resolve this faster I need to get a patch upstream to fix this anyway. Bugzilla won't let me add this as a "See Also"... Upstream bug report: https://bugs.php.net/bug.php?id=68685 (In reply to James Taylor from comment #11) > Bugzilla won't let me add this as a "See Also"... > > Upstream bug report: > https://bugs.php.net/bug.php?id=68685 (In reply to Felix Janda from comment #9) > The problem lies in the line > > $(use_with iconv iconv $(use elibc_glibc || echo "${EPREFIX}"/usr)) > > of the ebuild. (musl also provides iconv in libc.) Not really. you won't have elibc_glibc set, I assume, so this will add the flag --with-iconv=/usr which is where it will look for header files. I assume this is correct also for musl. If a path is given to --with-iconv, php's config script assumes that iconv is provided via libiconv. If no path is given (and it is enabled), it assumes that iconv is in libc. Therefore musl should be treated in the same way as glibc here. (check out PHP_SETUP_ICONV in aclocal.m4.) (In reply to Felix Janda from comment #13) > If a path is given to --with-iconv, php's config script assumes that > iconv is provided via libiconv. If no path is given (and it is enabled), > it assumes that iconv is in libc. Therefore musl should be treated in > the same way as glibc here. (check out PHP_SETUP_ICONV in aclocal.m4.) I see. Then you can try adding elibc_musl to the inner use flag check: $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr)) If that works, I can just add that check to future ebuilds. the elibc_musl use flag works for me. some other ebuilds already use it to fix building under musl as it is :) Created attachment 392684 [details, diff]
php-5.5.20.ebuild.patch
Patch applied to new ebuilds. Please test. current ebuilds in portage tree fixed the issue. Thanks! |