Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437064 - dev-lang/php (5.4.6 and 5.4.7) fail to build under x32 profile
Summary: dev-lang/php (5.4.6 and 5.4.7) fail to build under x32 profile
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL: https://bugs.php.net/bug.php?id=64729
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2012-10-03 12:52 UTC by LABBE Corentin
Modified: 2014-10-07 20:10 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 LABBE Corentin 2012-10-03 12:52:11 UTC
/bin/sh /var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/libtool --silent --preserve-dup-deps --mode=compile x86_64-pc-linux-gnu-gcc  -Iext/standard/ -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/ -DPHP_ATOM_INC -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/include -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/main -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/date/lib -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/ereg/regex -I/usr/include/libxml2 -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/mbstring/libmbfl -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/mbstring/libmbfl/mbfl -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/TSRM -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend    -I/usr/include -O2 -pipe -march=core2  -c /var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c -o ext/standard/math.lo 
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c: Assembler messages:
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c:628: Error: incorrect register `%esi' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c:629: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c:632: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/standard/math.c:633: Error: incorrect register `%esi' used with `q' suffix
make: *** [ext/standard/math.lo] Erreur 1

The problem is located in the ZEND_SIGNED_MULTIPLY_LONG macro defined at php-5.4.6/Zend/zend_multiply.h.
But if you manually remove "q" from instruction, php will fail later:

/bin/sh /var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/libtool --silent --preserve-dup-deps --mode=compile x86_64-pc-linux-gnu-gcc  -IZend/ -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/ -DPHP_ATOM_INC -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/include -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/main -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/date/lib -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/ereg/regex -I/usr/include/libxml2 -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/mbstring/libmbfl -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/ext/mbstring/libmbfl/mbfl -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/TSRM -I/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend    -I/usr/include -O2 -pipe -march=core2  -c /var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c -o Zend/zend_alloc.lo 
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c: Assembler messages:
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edi' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:701: Error: incorrect register `%esi' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:701: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:701: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:701: Error: incorrect register `%ecx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:675: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2484: Error: incorrect register `%esi' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2485: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2486: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2484: Error: incorrect register `%esi' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2485: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2486: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2484: Error: incorrect register `%r9d' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2485: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2486: Error: incorrect register `%edx' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2484: Error: incorrect register `%r9d' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2485: Error: incorrect register `%eax' used with `q' suffix
/var/tmp/portage/dev-lang/php-5.4.6/work/sapis-build/cli/Zend/zend_alloc.c:2486: Error: incorrect register `%edx' used with `q' suffix


Reproducible: Always




Portage 2.1.11.9 (default/linux/amd64/10.0/x32, gcc-4.7.1, glibc-2.16.0, 3.4.9-gentoo x86_64)
=================================================================
System uname: Linux-3.4.9-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Wed, 03 Oct 2012 05:00:01 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          3.2.3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/tomoyo/conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch parse-eapi-ebuild-head protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 berkdb bzip2 cli cracklib crypt cups cxx dri gpm iconv mmx modules mudflap multilib ncurses nls nptl pam pcre pppd readline session sse sse2 ssl tcpd unicode 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 mmap_emul 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 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" 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 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" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Guillaume BINET 2013-03-19 23:55:07 UTC
Apparently they have a pure C version, the preprocessing is just not up to date: 
if the assembly is for amd64 we need to check also for the pointer length : 
#ifdef __LP64__
 LP64 code
# else
 X32 code or C-code
# endif
Comment 2 Brian Evans Gentoo Infrastructure gentoo-dev 2014-10-07 20:10:40 UTC
This should be fixed in 5.4.16 according to the ChangeLog and $URL