Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230809 - dev-lang/php-5.2.6-r2: a 64bit arch build problem
Summary: dev-lang/php-5.2.6-r2: a 64bit arch build problem
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-05 01:02 UTC by Rafał Mużyło
Modified: 2008-07-20 14:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2008-07-05 01:02:39 UTC
This is not my bug. This is something I came across on the forum.
I'm on x86 and not (yet) on glibc 2.8, so I can neither confirm or deny the problem, but this looks like a _GNU_SOURCE problem.

On a related note: in 5.2.6 I had a following warning:
 /var/tmp/portage/dev-lang/php-5.2.6/work/php-5.2.6/Zend/zend_language_parser.
c:2581: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6/work/php-5.2.6/Zend/zend_language_parser.c:2
640: warning: incompatible implicit declaration of built-in function ‘stpcpy’

This too, may be something that can be cured by defining _GNU_SOURCE in the proper place.
Comment 1 Michał Lipski 2008-07-05 11:58:40 UTC
Hello,

It's my topic/bug. I don't have glibc-2.7

emerge --info: http://pastebin.com/m356abeeb

I've fixed compilation problem by this:
--- ext/standard/old.datetime.c   2007-12-31 08:20:12.000000000 +0100
+++ ext/standard/datetime.c   2008-07-04 23:52:41.000000000 +0200
@@ -100,7 +100,7 @@
    char      *format;
    int        format_length;
    struct tm  parsed_time;
-   char      *unparsed_part;
+   int        unparsed_part;
 
    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
       &ts, &ts_length, &format, &format_length) == FAILURE) {

It works, but I guess it's ugly fix ;)
Comment 2 Michał Lipski 2008-07-05 12:01:15 UTC
it's fix for line:
Function `strptime' implicitly converted to pointer at /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112 

111:
112:    unparsed_part = strptime(ts, format, &parsed_time);
113:    if (unparsed_part == NULL) {
Comment 3 Rafał Mużyło 2008-07-05 16:15:28 UTC
Well, OK, in that case it's not a glibc 2.8 problem
(though it's still strange, it didn't appear before),
but looking on the man pages, I still think it may be _GNU_SOURCE ralated
(I'll think about testing some parts of that theory for myself, but I'm x86).
Comment 4 Rafał Mużyło 2008-07-05 16:18:22 UTC
Oh, and could you attach your build log and emerge info in the proper way.
pastebin-alikes are EVIL, when used for bugzilla.
Comment 5 Michał Lipski 2008-07-05 17:26:06 UTC
emerge --info
Portage 2.2_rc1 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.7-r2, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r6-x86_64-Intel-R-_Core-TM-2_CPU_4300_@_1.80GHz-with-glibc2.2.5
Timestamp of tree: Sat, 05 Jul 2008 12:35:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ABI="amd64"
ACCEPT_KEYWORDS="amd64 ~amd64"
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"
ANT_HOME="/usr/share/ant-core"
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 auth_digest"
ARCH="amd64"
ASFLAGS_x86="--32"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-march=core2 -mtune=core2 -O2 -pipe"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLASSPATH="."
CLEAN_DELAY="5"
COLORTERM="gnome-terminal"
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/ca-certificates.conf /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 /etc/udev/rules.d"
CVS_RSH="ssh"
CXXFLAGS="-march=core2 -mtune=core2 -O2 -pipe"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-oCrxPxNwlT,guid=a45f9a041fdb6191ad3d0d98486fa986"
DCCC_PATH="/usr/lib/distcc/bin"
DEFAULT_ABI="amd64"
DESKTOP_SESSION="gnome"
DESKTOP_STARTUP_ID=""
DISPLAY=":0.0"
DISTCC_LOG=""
DISTCC_VERBOSE="0"
DISTDIR="/var/tmp/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--ask --verbose --tree"
EMERGE_WARNING_DELAY="10"
FEATURES="distlocks flawfinder parallel-fetch preserve-libs rats sandbox sfperms splitdebug strict unmerge-orphans userfetch"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
GCC_SPECS=""
GDK_USE_XFT="1"
GDMSESSION="gnome"
GDM_LANG="pl_PL.UTF-8"
GDM_XSERVER_LOCATION="local"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl http://src.gentoo.pl http://gentoo.mirror.pw.edu.pl"
GNOME_DESKTOP_SESSION_ID="Default"
GNOME_KEYRING_PID="3865"
GNOME_KEYRING_SOCKET="/tmp/keyring-OGg2kf/socket"
GPG_AGENT_INFO="/tmp/seahorse-08UKle/S.gpg-agent:3961:1"
GTK_MODULES="gnomebreakpad"
GTK_RC_FILES="/etc/gtk/gtkrc:/home/michal/.gtkrc-1.2-gnome2"
GUILE_LOAD_PATH="/usr/share/guile/1.8"
HG="/usr/bin/hg"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/info"
INPUT_DEVICES="keyboard mouse"
JAVAC="/home/michal/.gentoo/java-config-2/current-user-vm/bin/javac"
JAVA_HOME="/home/michal/.gentoo/java-config-2/current-user-vm"
JDK_HOME="/home/michal/.gentoo/java-config-2/current-user-vm"
KDEDIRS="/usr:/usr/local:/usr/kde/3.5"
KERNEL="linux"
LANG="pl_PL.UTF-8"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_ALL="pl_PL.UTF-8"
LDFLAGS=""
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_x86="lib32"
LINGUAS="pl"
LOGNAME="root"
MAKEOPTS="-j3"
MANPATH="/home/michal/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/man:/etc/java-config/system-vm/man/:/usr/lib64/php5/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)"
OLDPWD="/home/michal"
OPENGL_PROFILE="nvidia"
PAGER="/usr/bin/less"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
PKGDIR="/usr/portage/packages"
PKG_CONFIG_PATH="/usr/qt/3/lib64/pkgconfig"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha hppa sparc-fbsd"
PORTAGE_BINHOST="/usr/portage/packages"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlay"
PWD="/usr/local/portage"
QMAKESPEC="linux-g++"
QTDIR="/usr/qt/3"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/avr/gcc-bin/4.1.2:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin"
RPMDIR="/usr/portage/rpm"
SESSION_MANAGER="local/michal:@/tmp/.ICE-unix/3869,unix/michal:/tmp/.ICE-unix/3869"
SHELL="/bin/bash"
SHLVL="2"
SSH_AUTH_SOCK="/tmp/keyring-OGg2kf/ssh"
STAGE1_USE="multilib nptl nptlonly unicode"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
TERM="xterm"
USE="X acl amd64 automount berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus djvu dri dvd dvdr ffmpeg flac fortran gdbm gif gnome gnome-keyring gnomecd gpm gstreamer gtk hal iconv isdnlog java jpeg jpeg2 kerberos libnotify mad midi mmx mpeg mudflap multilib nautilus ncurses nfs nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre perl png pppd python readline reflection samba sdl session slang spell spl sse sse2 sse3 ssl svg tcpd tiff truetype unicode vhosts vorbis xml xorg xprint xulrunner xv zip 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 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 auth_digest" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia"
USER="root"
USERLAND="GNU"
USERNAME="michal"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="nvidia"
WINDOWID="39845953"
WINDOWPATH="7"
XAUTHORITY="/root/.xauthCxDTz9"
XDG_DATA_DIRS="/usr/share:/usr/kde/3.5/share:/usr/local/share"
XPSERVERLIST=""
_="/usr/bin/emerge"

-------------------------------------------

 * 
 * Installing SAPI(s)  cli apache2
 * 
 * Installing CLI SAPI
 * Setting extension_dir in php.ini
 * Securing fopen wrappers
 * Setting correct include_path
 * MySQL extensions charset for 'cli' SAPI is: empty
 * Installing Apache2 SAPI
Installing PHP SAPI module:       apache2handler
/usr/lib64/apache2/build/instdso.sh SH_LIBTOOL='/usr/bin/libtool' libphp5.la /var/tmp/portage/dev-lang/php-5.2.6-r2/image//usr/lib64/apache2/modules
/usr/bin/libtool --mode=install cp libphp5.la /var/tmp/portage/dev-lang/php-5.2.6-r2/image//usr/lib64/apache2/modules/
cp .libs/libphp5.so /var/tmp/portage/dev-lang/php-5.2.6-r2/image//usr/lib64/apache2/modules/libphp5.so
cp .libs/libphp5.lai /var/tmp/portage/dev-lang/php-5.2.6-r2/image//usr/lib64/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/libs'
chmod 755 /var/tmp/portage/dev-lang/php-5.2.6-r2/image//usr/lib64/apache2/modules/libphp5.so
 * Installing Apache2 config file for PHP5 (70_mod_php5.conf)
 * Setting extension_dir in php.ini
 * Securing fopen wrappers
 * Setting correct include_path
 * MySQL extensions charset for 'apache2' SAPI is: empty
>>> Completed installing php-5.2.6-r2 into /var/tmp/portage/dev-lang/php-5.2.6-r2/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib64/apache2/modules/libphp5.so
   usr/lib64/php5/bin/php
ecompressdir: bzip2 -9 /usr/lib64/php5/man

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:377: warning: implicit declaration of function ‘pread’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:416: warning: implicit declaration of function ‘pwrite’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112: warning: implicit declaration of function ‘strptime’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: implicit declaration of function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:377: warning: implicit declaration of function ‘pread’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:416: warning: implicit declaration of function ‘pwrite’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112: warning: implicit declaration of function ‘strptime’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: implicit declaration of function ‘stpcpy’


 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2640: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2640: warning: incompatible implicit declaration of built-in function ‘stpcpy’


 * QA Notice: Package has poor programming practices which may compile
 *            but will almost certainly crash on 64bit architectures.
 * Function `strptime' implicitly converted to pointer at /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112
Function `strptime' implicitly converted to pointer at /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112

 * 
 * ERROR: dev-lang/php-5.2.6-r2 failed.
 * Call stack:
 *       misc-functions.sh, line 653:  Called install_qa_check
 *       misc-functions.sh, line 349:  Called die
 * The specific snippet of code:
 *   				alpha*|ia64*|powerpc64*|mips64*|sparc64*|x86_64*) die "this code is not 64bit clean";;
 *  The die message:
 *   this code is not 64bit clean
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/environment'.
 * 
Comment 6 Rafał Mużyło 2008-07-06 21:57:22 UTC
See instead, if adding
#define _GNU_SOURCE
before
#include <time.h>
works, if it does, that's a better solution.
Comment 7 Michał Lipski 2008-07-07 09:47:17 UTC
I doesn't work... same problem.
Comment 8 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-07 15:05:49 UTC
I think I've seen these as well, but they've never lead to a failure for me, as this only happens with FEATURES=stricter (which you've got set). So, as a workaround, try without this, but I agree nevertheless, that this is a bug which should be fixed, of course.

I'm pretty sure this isn't a regression either, that's why it didn't have highest priority for me. :)
Comment 9 Michał Lipski 2008-07-07 16:09:29 UTC
(In reply to comment #8)
> I think I've seen these as well, but they've never lead to a failure for me, as
> this only happens with FEATURES=stricter (which you've got set). So, as a
> workaround, try without this, but I agree nevertheless, that this is a bug
> which should be fixed, of course.
> 
> I'm pretty sure this isn't a regression either, that's why it didn't have
> highest priority for me. :)
> 

I didn't set it, maybe profil has it as default. Anyway setting FEATURES=-stricter or FEATURES=-strict doesn't solve it...
And I don't have libtool 2.2* installed.
Comment 10 Michał Lipski 2008-07-17 15:32:06 UTC
Damn... still have this problem, same with dev-lang/php-5.2.6-r5
Comment 11 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-19 13:36:53 UTC
(In reply to comment #10)
> Damn... still have this problem, same with dev-lang/php-5.2.6-r5
This wasn't supposed to fix it either.
The problem in this case is probably autoconf-2.62 and the fact that main/php_config.h is not included everywhere, which means that things like _GNU_SOURCE are not defined in all cases, which means that some function definitions are going to miss (and assumed to be int foo(void) as such), leading to those problems.
I'll try to find out what the easiest/proper way to fix this is.
Comment 12 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-19 14:39:37 UTC
I just committed an updated version of php-5.2.6-r5 (no revbump as this is a build-time-only problem).
I've never been able to reproduce the *fatal* error, but I've always seen the warnings and those are gone now, so I hope this change fixes the bug.
We simply always pass -D_GNU_SOURCE now. This already was my first attempt at fixing the initial autoconf-2.62 breakage, but it didn't work as php no longer built. Those two occurences which made the build fail have been fixed in the meanwhile, that's why it works now.
Comment 13 Michał Lipski 2008-07-19 19:56:52 UTC
Now I get:

Build complete.
Don't forget to run 'make test'.

find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f 
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp5.la sapi/cli/php  modules/* libs/*
 *   Enabling bcmath
 *   Enabling bz2
 *   Enabling calendar
 *   Enabling ctype
 *   Enabling curl
 *   Enabling curlwrappers
 *   Disabling dbase
 *   Enabling dom
 *   Enabling exif
 *   Disabling fbsql
 *   Disabling fdftk
 *   Disabling filter
 *   Enabling ftp
 *   Enabling gettext
 *   Disabling gmp
 *   Enabling hash
 *   Enabling iconv
 *   Disabling ipv6
 *   Disabling json
 *   Enabling kerberos
 *   Enabling libxml
 *   Enabling mbstring
 *   Enabling mcrypt
 *   Enabling mhash
 *   Disabling msql
 *   Disabling mssql
 *   Enabling ncurses
 *   Enabling openssl
 *   Enabling openssl-dir
 *   Disabling pcntl
 *   Enabling pcre-regex
 *   Enabling pdo
 *   Disabling pgsql
 *   Disabling posix
 *   Enabling pspell
 *   Disabling recode
 *   Enabling reflection
 *   Enabling simplexml
 *   Disabling shmop
 *   Disabling snmp
 *   Disabling soap
 *   Enabling sockets
 *   Enabling spl
 *   Disabling sybase
 *   Disabling sybase-ct
 *   Disabling sysvmsg
 *   Disabling sysvsem
 *   Disabling sysvshm
 *   Disabling tidy
 *   Disabling tokenizer
 *   Disabling wddx
 *   Enabling xml
 *   Disabling xmlreader
 *   Disabling xmlwriter
 *   Disabling xmlrpc
 *   Disabling xsl
 *   Enabling zip
 *   Enabling zlib
 *   Enabling debug
 *   Disabling cdb
 *   Disabling db4
 *   Disabling flatfile
 *   Enabling gdbm
 *   Disabling inifile
 *   Disabling qdbm
 *   Enabling freetype-dir
 *   Enabling t1lib
 *   Disabling gd-jis-conv
 *   Enabling jpeg-dir
 *   Enabling png-dir
 *   Disabling xpm-dir
 *   Enabling gd
 *   Enabling imap
 *   Enabling imap-ssl
 *   Enabling mysql
 *   Enabling mysql-sock
 *   Disabling mysqli
 *   Disabling pdo-dblib
 *   Enabling pdo-mysql
 *   Disabling pdo-odbc
 *   Disabling pdo-pgsql
 *   Disabling pdo-sqlite
 *   Enabling readline
 *   Disabling libedit
 *   Disabling mm
 *   Disabling sqlite
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
configure: loading cache ./config.cache
configure: error: `FFLAGS' has changed since the previous run:
configure:   former value:  `-D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE'
configure:   current value: `-D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE'
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
 * 
 * ERROR: dev-lang/php-5.2.6-r5 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4470:  Called src_compile_normal
 *             environment, line 4593:  Called php5_2-sapi_src_compile
 *             environment, line 3500:  Called die
 * The specific snippet of code:
 *       ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed";
 *  The die message:
 *   configure failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.6-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6-r5/temp/environment'.
 * 

Comment 14 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-20 08:32:04 UTC
Reopening then.
Comment 15 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-20 09:37:07 UTC
I'm not able to reproduce this. Nevertheless, I've changed the code to manipulate CFLAGS/CXXFLAGS directly instead of using flag-o-magic's append-flags, which also changes FFLAGS (which isn't used at all by php).
Hopefully this helps.
If it doesn't, please post emerge -pv php.

(Still php-5.2.6-r5)
Comment 16 Michał Lipski 2008-07-20 10:48:37 UTC
It works now :) Thanks a lot.

p.s You have to rerun ebuild ... digest, as checksums doesn't match.
Comment 17 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-20 12:52:41 UTC
(In reply to comment #16)
> p.s You have to rerun ebuild ... digest, as checksums doesn't match.
Checksum of what? I don't see any problem in my cvs checkout and neither on a system using rsync. Maybe it was just some intermediate failure (cvs -> rsync master just at the time between my commit and the Manifest commit).

Comment 18 Michał Lipski 2008-07-20 13:16:10 UTC
Nevermind... I've run emerge --sync, and it's OK now.
Comment 19 Rafał Mużyło 2008-07-20 13:26:14 UTC
A bit late question:
Shouldn't this line:
export CXXFLAGS="${CFLAGS} -D_GNU_SOURCE"
be:
export CXXFLAGS="${CXXFLAGS} -D_GNU_SOURCE"
Comment 20 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-20 14:04:26 UTC
(In reply to comment #19)
> A bit late question:
> Shouldn't this line:
> export CXXFLAGS="${CFLAGS} -D_GNU_SOURCE"
> be:
> export CXXFLAGS="${CXXFLAGS} -D_GNU_SOURCE"

This is certainly not my day... I fail again. :P
Thanks for noticing, committed the fix (although it should not matter -- CXXFLAGS should not be used at all in case of php, but who knows).