Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217392 - dev-lang/php fails to build w/ autoconf-2.62 on *BSD
Summary: dev-lang/php fails to build w/ autoconf-2.62 on *BSD
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 217933 (view as bug list)
Depends on:
Blocks: autoconf-2.62
  Show dependency tree
 
Reported: 2008-04-12 13:18 UTC by Daniel Kenzelmann
Modified: 2009-04-09 09:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,3.44 KB, text/plain)
2008-04-12 13:21 UTC, Daniel Kenzelmann
Details
emerge --info (emerge-info.txt,3.67 KB, text/plain)
2008-04-16 11:33 UTC, Oggy
Details
emerge --info (emerge.info,10.62 KB, text/plain)
2008-04-16 12:04 UTC, Dzikri Aziz
Details
environment (environment.2,178.24 KB, text/plain)
2008-04-30 15:52 UTC, Dan Coats
Details
dev-lang:php-5.2.6_rc4:20080430-151538.log (dev-lang:php-5.2.6_rc4:20080430-151538.log,366.05 KB, text/plain)
2008-04-30 15:53 UTC, Dan Coats
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Kenzelmann 2008-04-12 13:18:20 UTC
Emerge fails

/bin/sh /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/libtool --sile
nt --preserve-dup-deps --mode=compile i686-pc-linux-gnu-gcc  -Iext/posix/ -I/var
/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/ -DPHP_ATOM_INC 
-I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/include -I/var/tmp/p
ortage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/main -I/var/tmp/portage/dev-lang
/php-5.2.6_rc4/work/php-5.2.6RC4 -I/usr/include/libxml2 -I/var/tmp/portage/dev-l
ang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/date/lib -I/usr/include/freetype2 -I/usr
/include/imap -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/mb
string/oniguruma -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext
/mbstring/libmbfl -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ex
t/mbstring/libmbfl/mbfl -I/usr/include/postgresql/libpq-4 -I/usr/include/pspell 
-I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/TSRM -I/var/tmp/port
age/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/Zend    -I/usr/include -O3 -march=p
entium3 -mtune=pentium3 -pipe -fomit-frame-pointer  -c /var/tmp/portage/dev-lang
/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c -o ext/posix/posix.lo 
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c: In 
function ‘zif_posix_uname’:
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c:471: error: ‘struct utsname’ has no member named ‘domainname’
make: *** [ext/posix/posix.lo] Error 1


Reproducible: Always

Steps to Reproduce:
Comment 1 Daniel Kenzelmann 2008-04-12 13:21:01 UTC
Created attachment 149478 [details]
emerge --info
Comment 2 Nathan Sullivan 2008-04-12 23:09:15 UTC
confirmed here on amd64 as well...

exists in both 5.2.6-rc4 and 5.2.6-rc3-r1 (only versions tested so far, havent gone back further...)

Portage 2.1.5_rc2 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.20.12-xen x86_64)
=================================================================
System uname: 2.6.20.12-xen x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Sat, 12 Apr 2008 16:20:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.iinet.net.au/pub/Gentoo http://ftp.iinet.net.au/pub/Gentoo"
LDFLAGS=""
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-overlays/layman/enlightenment /usr/local/portage-overlays/layman/gnash-cvs /usr/local/portage-overlays/layman/spring-unofficial /usr/local/portage-overlays/layman/mozilla /usr/local/portage-overlays/layman/xen /usr/local/portage-overlays/layman/java-overlay /usr/local/portage-overlays/layman/sunrise /usr/local/portage-overlays/testing /usr/local/portage-overlays/testing-xen /usr/local/portage-overlays/spring /usr/local/portage-overlays/x4x-portage"
SYNC="rsync://10.100.10.1/gentoo-portage"
USE="X a52 aac acl acpi aim alsa amd64 apache2 audiofile avahi avi bash-completion berkdb big-tables bzip2 cairo canvas cdr cli cpdflib cracklib crypt cups curl dba dbus divx4linux dlloader dri dts dv dvb dvd dvdr dvdread emboss encode ethereal evo exif extraengine fam fame ffmpeg firefox flac fortran gd gdbm gif gimpprint glut gmp gpm gstreamer gtk gtk2 hal iconv icq idn imap innodb ipv6 isdnlog jabber java jpeg json kerberos lcms ldap libcaca logrotate mad mhash midi mikmod mmx mng mono mozsvg mp3 mpeg mppe-mppc mudflap mysql mysqli ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcntl pcre pdf pear perl php png posix pppd pulseaudio python qt3support quicktime readline reflection ruby samba sdl session slang snmp soap sockets spell spl sqlite sse sse2 ssl subtitles suhosin svg tcpd threads tiff truetype unicode userlocales utf8 vorbis wddx wma xine xinerama xml xml2 xmlrpc xorg xosd xprint xsl xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Nathan Sullivan 2008-04-12 23:31:14 UTC
confirmed, 5.2.6-rc3 and 5.2.6-rc1-r1 are also affected... back to 5.2.5 for me :)
Comment 4 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-13 09:12:22 UTC
Hm, I'm pretty sure it worked for me when I added it to the tree (and I'm always testing with USE="posix threads" as well).
ext/posix has not been changed in ages (and there haven't been any code changes since 5.2.5 at all), so I'd say this is either related to ebuild-specific stuff or maybe some library.
sys/utsname.h belongs to glibc, but as I'm using the same version as you, I don't think this is the problem. However, apparently __USE_GNU has to be defined to get the "domainname" struct member. Maybe somehow this used to be defined before and no longer is...

ATM I'm re-merging PHP after the autotools update, which might be the guilty one here.
Comment 5 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-13 09:16:16 UTC
Ok, now I'm able to reproduce it, so I'm pretty sure it is the autotools update. Working on it...
Comment 6 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-13 09:59:30 UTC
Ok, now I'm sure it's autotools. pam had a similar problem (bug 217154). They used append-flags -D_GNU_SOURCE to work around it, and it works in case of PHP as well.
Bad thing is, the problems continue afterwards:

/bin/sh /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/libtool --silent --preserve-dup-deps --mode=compile x86_64-pc-linux-gnu-gcc  -Iext/standard/ -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/ -DPHP_ATOM_INC -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/include -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/main -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4 -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/date/lib -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/TSRM -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/Zend    -march=nocona -O2 -pipe -D_GNU_SOURCE  -c /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c -o ext/standard/string.lo 
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c: In function ‘zif_nl_langinfo’:
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c:597: error: duplicate case value
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c:594: error: previously used here
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c:603: error: duplicate case value
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/standard/string.c:600: error: previously used here
make: *** [ext/standard/string.lo] Error 1

Comment 7 Oggy 2008-04-16 11:33:44 UTC
Created attachment 149923 [details]
emerge --info
Comment 8 Oggy 2008-04-16 11:34:32 UTC
Comment on attachment 149923 [details]
emerge --info

5.2.5 does not work for me also:

/var/tmp/portage/dev-lang/php-5.2.5-r1/work/php-5.2.5/ext/posix/posix.c: In function 'zif_posix_uname':
/var/tmp/portage/dev-lang/php-5.2.5-r1/work/php-5.2.5/ext/posix/posix.c:471: error: 'struct utsname' has no member named 'domainname'
Comment 9 Dzikri Aziz 2008-04-16 12:03:46 UTC
confirmed. thought it's the newest ebuild/package fault, tried to mask it then rebuild the old one and the error still appears.
Comment 10 Dzikri Aziz 2008-04-16 12:04:21 UTC
Created attachment 149924 [details]
emerge --info
Comment 11 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-16 14:32:46 UTC
As I said, this is related to autoconf. Downgrade autoconf to <2.62 for now if you need it working w/ USE=posix right now.

We know about the problem, I am able to reproduce it and trying different fixes. No need for more "me too"'s :)

On a technical note:
With append-flags -D_GNU_SOURCE it fails even with autotools-2.61-r1. That probably means that parts of php need _GNU_SOURCE defined and other parts need it to be undefined.... I'll see if I can patch in the necessary definitions.
Comment 12 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-16 14:55:38 UTC
Should be fixed in CVS (without a revbump, as it is a build failure). Sync in some hours or try adding this line to src_unpack yourself:

sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c
Comment 13 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-16 15:37:05 UTC
*** Bug 217933 has been marked as a duplicate of this bug. ***
Comment 14 Dan Coats 2008-04-30 14:34:52 UTC
This is not fixed for gentoo-freebsd sed needs to be gsed I think.
Should I open a new bug? Testing gsed now
Comment 15 Dan Coats 2008-04-30 15:43:13 UTC
gsed didn't do it either. 
/bin/bash /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/libtool --silent --preserve-dup-deps --mode=compile /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/meta_ccld  -Iext/posix/ -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/ -DPHP_ATOM_INC -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/include -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/main -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4 -I/usr/include/libxml2 -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/mbstring/oniguruma -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/mbstring/libmbfl -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/pspell -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/TSRM -I/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/Zend  -D_REENTRANT -D_THREAD_SAFE  -I/usr/include -O2 -mtune=i686 -pipe -pthread -DZTS  -c /var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c -o ext/posix/posix.lo 
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c: In function 'zif_posix_uname':
/var/tmp/portage/dev-lang/php-5.2.6_rc4/work/php-5.2.6RC4/ext/posix/posix.c:472: error: 'struct utsname' has no member named 'domainname'
gmake: *** [ext/posix/posix.lo] Error 1
gmake: *** Waiting for unfinished jobs....
 * 
 * ERROR: dev-lang/php-5.2.6_rc4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4344:  Called src_compile_normal
 *             environment, line 4455:  Called php5_2-sapi_src_compile
 *             environment, line 3398:  Called die
 * The specific snippet of code:
 *       emake || die "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/dev-lang:php-5.2.6_rc4:20080430-151538.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6_rc4/temp/environment'.
 * 
Comment 16 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-30 15:51:32 UTC
I would have been surprised if gsed worked, as `sed` is aliased to `gsed` for ebuilds (in the freebsd profile's bashrc). Also, much more ebuilds would fail if this was the reason.

Anyway, I don't really have a clue how to fix it, I both lack the knowledge and the hardware, but I'll try to ping some of our fbsd devs.
Comment 17 Dan Coats 2008-04-30 15:52:15 UTC
Created attachment 151432 [details]
environment
Comment 18 Dan Coats 2008-04-30 15:53:59 UTC
Created attachment 151434 [details]
dev-lang:php-5.2.6_rc4:20080430-151538.log

~ # emerge --info
Portage 2.1.5_rc6 (default-bsd/fbsd/6.2/x86, gcc-4.2.3, freebsd-lib-6.2-r3, 6.2-RELEASE i386)
=================================================================
System uname: 6.2-RELEASE i386 i386
Timestamp of tree: Wed, 30 Apr 2008 14:00:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r4, 2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.17-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  6.2-r3
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
CBUILD="i686-gentoo-freebsd6.2"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i686-gentoo-freebsd6.2"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks parallel-fetch sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl adns apache2 bash-completion bcmath berkdb bidi bindinst browserplugin bzip2 cairo calendar cli cracklib crypt cups curlwrappers dbus dedicated dga dlloader dri dts emacs emacs-w3 erandom ethereal expat fastcgi font ftp gd gdbm geoip glitz glut gnusetup gnutls gtk gtkhtml hal iconv imap immqt-bc inifile innodb java java5 javascript jp2 jpeg jpeg2k libcaca libclamv live lzo midi mime ming mmap motif mpi ncurses nls nsplugin nvidia oav objc oracle oscar oss pam pcre pdf perl php pic posix ppds python qt3support readline reflection samba session shared spl sqlite sse ssl symlink tcltktcpd tcpd test threads unicode urandom usb usepackagedmakefiles userlocales vcd vhosts x86-fbsd xcomposite xml xorg xpm xprint zeroconf zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="BSD" VIDEO_CARDS="nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 19 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-30 15:56:35 UTC
Just to be sure: This problem got introduced for you when you updated autoconf to 2.62, right? I.e. downgrading to 2.61* makes it work again?
At least you seem to be running 2.62.
Comment 20 Dan Coats 2008-05-05 20:39:41 UTC
I guess so and php-5.2.6 now fails the same way.
Comment 21 Dan Coats 2008-05-07 20:58:48 UTC
php-5.2.6-r1 still fails on this with autoconf-2.62
Comment 22 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-07 21:03:49 UTC
Yes, I wasn't able to do anything about this one. Still hoping to get help from the BSD team (pinged them on IRC, now I'll CC them :p).
Comment 23 Dan Coats 2008-06-17 14:17:50 UTC
Still no fix for this yet?
Comment 24 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-20 17:05:36 UTC
Can you please retry with -r5? Although I doubt it, it might fix it because I changed the way of passing _GNU_SOURCE.
But without any help from the BSD team (or some BSD user) we'll probably not be able to fix this, except maybe by coincidence.
Comment 25 Alexis Ballier gentoo-dev 2008-10-18 15:17:36 UTC
(In reply to comment #24)
> Can you please retry with -r5? Although I doubt it, it might fix it because I
> changed the way of passing _GNU_SOURCE.
> But without any help from the BSD team (or some BSD user) we'll probably not be
> able to fix this, except maybe by coincidence.
> 

well domainname is a GNU libc extension.
http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/utsname.h.html
php failing code has:
#ifdef _GNU_SOURCE
        add_assoc_string(return_value, "domainname", u.domainname, 1);
#endif

Therefore defining _GNU_SOURCE makes it think it's on a gnu system while its not. Maybe replacing the code by
#ifdef __GLIBC__
etc
would make more sense if it does not break anything on linux (and maybe add other libc's that are confirmed to have domainname); at least for fbsd 7.0, replacing the ifdef like that solves the issue.
Comment 26 Christian Hoffmann (RETIRED) gentoo-dev 2008-10-18 20:25:28 UTC
(In reply to comment #25)
> Therefore defining _GNU_SOURCE makes it think it's on a gnu system while its
> not. Maybe replacing the code by
> #ifdef __GLIBC__
> etc
> would make more sense if it does not break anything on linux (and maybe add
> other libc's that are confirmed to have domainname); at least for fbsd 7.0,
> replacing the ifdef like that solves the issue.
Sadly, changing this solely to __GLIBC__ breaks on Linux, as glibc only exposes this symbol if _GNU_SOURCE is defined. So I've replaced _GNU_SOURCE by __GLIBC__ as you suggested, but kept -D _GNU_SOURCE in the CFLAGS. Does that make things better on *BSD?
The changed ebuild is in the php-testing overlay available via layman (=dev-lang/php-5.2.6-r8).

What's the concrete problem btw, the fact that _GNU_SOURCE is defined?

Thanks for your input anyway. :)
Comment 27 Alexis Ballier gentoo-dev 2008-10-19 10:29:14 UTC
(In reply to comment #26)
> Sadly, changing this solely to __GLIBC__ breaks on Linux, as glibc only exposes
> this symbol if _GNU_SOURCE is defined. So I've replaced _GNU_SOURCE by
> __GLIBC__ as you suggested, but kept -D _GNU_SOURCE in the CFLAGS. Does that
> make things better on *BSD?

it shouldn't matter i'd say; standard bsd headers do not care at all about GNU_SOURCE being defined or not :) except that it's supposed to mean you want gnu libc features which won't be available on bsd :)
I don't really understand the initial problem anyway, why _GNU_SOURCE is defined there (so that php code tries to use domainname) but not when including the standard headers (so that domainname isn't available in the struct), how it relates to latest autoconf, etc


> What's the concrete problem btw, the fact that _GNU_SOURCE is defined?

the problem is *php* code:
#ifdef _GNU_SOURCE
        add_assoc_string(return_value, "domainname", u.domainname, 1);
#endif

and the ebuild defining _GNU_SOURCE in cflags makes it use domainname everywhere which is invalid on bsd. If you need _GNU_SOURCE to get __GLIBC__ defined but replaced  that #ifdef by __GLIBC__ it should work I think.
Comment 28 Christian Hoffmann (RETIRED) gentoo-dev 2008-12-08 23:32:45 UTC
Please try the in-tree php-5.2.8.
Comment 29 Christian Hoffmann (RETIRED) gentoo-dev 2009-01-11 21:22:24 UTC
php-5.2.8-r2 has yet another fix (an official one from upstream this time).
Comment 30 Dan Coats 2009-01-12 19:17:36 UTC
5.2.8-r2 still the same

/bin/bash /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/libtool --silent --preserve-dup-deps --mode=compile /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/meta_ccld  -Iext/posix/ -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/posix/ -DPHP_ATOM_INC -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/include -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/main -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8 -I/usr/include/libxml2 -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/mbstring/oniguruma -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/mbstring/libmbfl -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/pspell -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/TSRM -I/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend  -D_REENTRANT -D_THREAD_SAFE  -I/usr/include -O2 -mtune=i686 -pipe -D_GNU_SOURCE -pthread -DZTS  -c /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/posix/posix.c -o ext/posix/posix.lo                                                                      
/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/posix/posix.c: In function 'zif_posix_uname':                                     
/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/ext/posix/posix.c:476: error: 'struct utsname' has no member named 'domainname'       
gmake: *** [ext/posix/posix.lo] Error 1                                                                                                     
 *                                                                                                                                          
 * ERROR: dev-lang/php-5.2.8-r2 failed.                                                                                                     
 * Call stack:                                                                                                                              
 *               ebuild.sh, line   49:  Called src_compile                                                                                  
 *             environment, line 4393:  Called src_compile_normal                                                                           
 *             environment, line 4512:  Called php5_2-sapi_src_compile                                                                      
 *             environment, line 3435:  Called die                                                                                          
 * The specific snippet of code:                                                                                                            
 *       emake || die "make failed"                                                                                                         
 *  The die message:                                                                                                                        
 *   make failed                                                                                                                            
 *                                                                                                                                          
 * If you need support, post the topmost build error, and the call stack if relevant.                                                       
 * A complete build log is located at '/var/log/portage/dev-lang:php-5.2.8-r2:20090112-190429.log'.                                         
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.8-r2/temp/environment'.                                     
 *                                                                                                                                          

>>> Failed to emerge dev-lang/php-5.2.8-r2, Log file:
Comment 31 Dan Coats 2009-01-14 16:00:49 UTC
It does build with autoconf-2.6x, just not USE posix
Comment 32 Jason Rexilius 2009-01-24 17:30:11 UTC
emerge =sys-devel/autoconf-2.61-r2 and PHP with USE=posix works

and compiles, fine, but still breaks on 2.62..
Comment 33 Christian Hoffmann (RETIRED) gentoo-dev 2009-01-24 18:34:05 UTC
Next revision will have yet another fix... maybe that helps.
Comment 34 Christian Hoffmann (RETIRED) gentoo-dev 2009-04-09 09:30:23 UTC
What's the status currently?