# [SOLVED by BUG fix]  PHP 5.2.6-rc4 won't build

## chaseguard

I have looked on the web and forums and see no help.  I also looked through the PHP bugs but nothing seems related.  Never had problems with other PHP versions.  I get:

/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

 * 

 * ERROR: dev-lang/php-5.2..............................

My system:

Portage 2.1.5_rc2 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.7-r2, 2.6.23-gentoo-r1 i686)

=================================================================

System uname: 2.6.23-gentoo-r1 i686 Dual-Core AMD Opteron(tm) Processor 1218

Timestamp of tree: Thu, 10 Apr 2008 20:33:01 +0000

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

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.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.23-r2

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=opteron -O2 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

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=opteron -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS=""

LINGUAS="en"

MAKEOPTS="-j1"

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"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X aac acl acpi alsa audiofile avi berkdb cairo cdparanoia cdr cdrom chroot cli cracklib crypt cups dbus divx4linux dri dv dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran freetype gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 gtkhtml hal iconv isdnlog java javascript jpeg kerberos lcms ldap lzo mad mbox midi mikmod mime mmap mmx mmxext mng mp3 mpeg mpi mudflap nas ncurses net network nis nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pcre pdf perl php png posix postgres ppds pppd python qt3 qt3support qt4 quicktime readline real reflection rtc samba sdl session sndfile snmp sockets socks5 spell spl ssl svg swat szip tcltk tcpd theora tidy tiff truetype type1-fonts unicode usb userlocales vidix vorbis win32codecs wxwindows x86 xfs xgetdefault xml xmlrpc xorg xsl xv xvid xvmc zlib" ALSA_CARDS="ice1712 intel8x0" 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 authn_alias authn_anon 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nv nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Any suggestions?Last edited by chaseguard on Thu Apr 17, 2008 3:09 pm; edited 3 times in total

----------

## nixnut

Moved from Desktop Environments to Networking & Security.

Not desktop stuff, so moved here.

----------

## luismanson

same here

-I/usr/include -march=athlon64 -O2 -ftracer -funit-at-a-time -fforce-addr -mno-tls-direct-seg-refs -pipe -funswitch-loops -fgcse-sm -fgcse-lm -fgcse-las -fgcse-after-reload -ftree-vectorize  -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

make: *** Waiting for unfinished jobs....

Vger dev # emerge -Dupv php;beep

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] dev-lang/php-5.2.6_rc4 [5.2.6_rc3-r1] USE="apache2 berkdb bzip2 calendar cdb cgi cli crypt ctype curl curlwrappers exif flatfile ftp gd gdbm iconv imap ipv6 mysql ncurses nls odbc pcntl pcre posix readline reflection session sharedext sharedmem simplexml sockets spell spl sqlite ssl sysvipc tidy tokenizer truetype unicode xml xmlrpc xpm xsl zip zlib (-adabas) -bcmath (-birdstep) -cjk -concurrentmodphp -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) -filter (-firebird) -force-cgi-redirect (-frontbase) -gd-external -gmp -hash -inifile -interbase -iodbc (-java-external) -json -kerberos -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -oci8 -oci8-instant-client -pdo -pic -postgres -qdbm -recode -sapdb -snmp -soap (-solid) -suhosin (-sybase) (-sybase-ct) -threads -wddx -xmlreader -xmlwriter -yaz -zip-external" 0 kB

----------

## bunder

does 5.2.6_rc3 compile cleanly?

cheers

----------

## chaseguard

Yes.  I presently use dev-lang/php-5.2.6_rc3-r1.   I attempted "emerge  =dev-lang/php-5.2.6_rc3-r1" to see if the change happened between php releases.  This failed with the same error message, so, evidently something else (glib 2.7?) has removed the function getdomainname between the php releases.  

Rolling back to an earlier glibc is strongly discouraged so I cannot test that.  It seems that some package must  provide the function but I cannot figure which.  I am thinking of filing a bug (if not already filed by now).

----------

## JC99

 *bunder wrote:*   

> does 5.2.6_rc3 compile cleanly?

 

I just tried compiling 5.2.6_r3 and got the following error message...

 *Quote:*   

> checking for gzgets in -lz... yes
> 
> checking whether to enable bc style precision math functions... yes, shared
> 
> checking for BZip2 support... yes, shared
> ...

 

----------

## chaseguard

So now I see a bug 217392.  I will make this resolved and defer to the bug.

----------

## luismanson

the bug is open, i wouldnt change the thread to solved, specially we could also discuss workarounds here...

----------

## chaseguard

I can see you have a point luismanson.

----------

## luismanson

yes, its not very common on me, but sometimes i do  :Razz: 

thanks!

----------

