Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 74627

Summary: dev-php/mod_php-4.3.10 fails to build on Sparc (and probably ppc)
Product: Gentoo Linux Reporter: Olivier Castan <castan.o>
Component: Current packagesAssignee: Gustavo Zacarias (RETIRED) <gustavoz>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: High    
Version: unspecified   
Hardware: Sparc   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 74547    

Description Olivier Castan 2004-12-16 06:36:03 UTC
Build fails with :
[...]
/bin/sh /usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/libtool --silent --preserve-dup-deps --mode=compile gcc  -IZend/ -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend/ -DPHP_ATOM_INC -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/include -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/main -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10 -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend -I/usr/include/libxml2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/ext/mbstring/mbregex -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/ext/mbstring/libmbfl -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/pspell -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/ext/xml/expat  -I/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/TSRM  -O2 -mcpu=ultrasparc  -prefer-pic -c /usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend/zend_strtod.c -o Zend/zend_strtod.lo
/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend/zend_strtod.c:239: error: parse error before "uint32_t"
/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend/zend_strtod.c:239: warning: no semicolon at end of struct or union
/usr/local/portage/tmp/portage/mod_php-4.3.10/work/php-4.3.10/Zend/zend_strtod.c:240: warning: data definition has no type or storage class
[...]

The problem in Zend/zend_strtod.c comes from :
#if defined(__sparc__) || defined(__ppc__)
#define u_int32_t uint32_t
#endif
at line 130. Since the the proper include is not set (<stdint.h>) uint32_t is not defined (I've checked with gcc -E, __uint32_t and u_int32_t are defined thanks to stddef.h but not uint32_t).

So the lines above should be changed to :
#ifndef u_int32_t
#if defined(__sparc__) || defined(__ppc__)
#define u_int32_t __uint32_t
#endif
#endif
or :
#ifndef u_int32_t
#if defined(__sparc__) || defined(__ppc__)
#include <stdint.h>
#define u_int32_t uint32_t
#endif
#endif


Reproducible: Always
Steps to Reproduce:




# emerge info
Portage 2.0.51-r8 (default-linux/sparc/sparc64/2004.3, gcc-3.3.5,
glibc-2.3.3.20040420-r2, 2.6.8-gentoo-r12 sparc64)
=================================================================
System uname: 2.6.8-gentoo-r12 sparc64 sun4u Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 23 2004, 18:49:16)]
dev-lang/python:     2.3.4 sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.4_p6, 1.9.3, 1.5, 1.6.3, 1.7.9
sys-devel/binutils:  2.15.92.0.2-r1 sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.4.23 ACCEPT_KEYWORDS="sparc ~sparc"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=ultrasparc"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=ultrasparc"
DISTDIR="/usr/local/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/
ftp://mirror.switch.ch/mirror/gentoo/ ftp://mir.zyrianes.net/gentoo/
http://mir.zyrianes.net/gentoo/ http://www.gigaload.org/gentoo.org/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/local/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="sparc X X509 acpi4linux arts avi bash-completion berkdb bitmap-fonts cdr
cdrom chroot crypt cups dga dillo dmx encode esd ethereal exif f77 fam fbcon
font-server foomaticdb fortran frlargefiles gcc64 gd gdbm gif gimpprint gnome
graphviz gs gtk gtk2 hardened hardenedphp imagemagick imlib jbig jp2 jpeg jpeg2k
ldap libwww live lzo lzw mad matroska md5sum mikmod mng motif mozilla
moznocompose moznoirc moznomail mozsvg mpeg mplayer mysql nagios-dns nagios-ntp
nagios-ping nagios-ssh ncurses nls ntlm offensive oggvorbis opengl openntpd oss
pam pdflib perl png ppds python qt quicktime readline recode rtc samba sdl
session sftplogging skey smime snmp spell ssl svg tcpd theora threads tidy tiff
truetype truetype-fonts type1-fonts userlocales v4l v4l2 vim-with-x xanim xine
xml2 xmms xprint xrandr xscreensaver xv xvid xvmc zlib"
Comment 1 Gustavo Zacarias (RETIRED) gentoo-dev 2004-12-16 17:40:01 UTC
Including stdint.h is the right solution IMHO.
The fix is in CVS.
Thanks for the report.