Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74627 - dev-php/mod_php-4.3.10 fails to build on Sparc (and probably ppc)
Summary: dev-php/mod_php-4.3.10 fails to build on Sparc (and probably ppc)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High blocker (vote)
Assignee: Gustavo Zacarias (RETIRED)
Depends on:
Blocks: 74547
  Show dependency tree
Reported: 2004-12-16 06:36 UTC by Olivier Castan
Modified: 2004-12-16 17:40 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
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
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
or :
#ifndef u_int32_t
#if defined(__sparc__) || defined(__ppc__)
#include <stdint.h>
#define u_int32_t uint32_t

Reproducible: Always
Steps to Reproduce:

# emerge info
Portage 2.0.51-r8 (default-linux/sparc/sparc64/2004.3, gcc-3.3.5,
glibc-, 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: sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.4.23 ACCEPT_KEYWORDS="sparc ~sparc"
CFLAGS="-O2 -mcpu=ultrasparc"
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"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
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.