Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 341729 - dev-db/postgresql-base-9.0.1 fails to compile on PPC
Summary: dev-db/postgresql-base-9.0.1 fails to compile on PPC
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal with 1 vote (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 07:26 UTC by Stefan de Konink
Modified: 2011-08-11 22:18 UTC (History)
2 users (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 Stefan de Konink 2010-10-19 07:26:10 UTC
First of all, when having 'threads' enabled, I'm getting a 'your platform is not thread safe'. If I disabled threads I get:

powerpc-unknown-linux-gnu-gcc -O2 -mcpu=7400 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-state ent -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE   -c -o strlcat.o strlcat.c -MMD -MP -MF .deps/strlcat Po
In file included from ../../src/include/postgres_fe.h:25,
                 from chklocale.c:19:
../../src/include/c.h:196: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from ../../src/include/c.h:851,
                 from ../../src/include/postgres_fe.h:25,
                 from chklocale.c:19:
../../src/include/port.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_noblock'
../../src/include/port.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_block'
../../src/include/port.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_contains_parent_reference'
../../src/include/port.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_is_prefix_of_path'
../../src/include/port.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'get_home_path'
../../src/include/port.h:222: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:291: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:293: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rmtree'
In file included from chklocale.c:27:
../../src/include/mb/pg_wchar.h:400: error: expected declaration specifiers or '...' before 'bool'
../../src/include/mb/pg_wchar.h:434: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_verifymbstr'
../../src/include/mb/pg_wchar.h:435: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_verify_mbstr'
../../src/include/mb/pg_wchar.h:438: error: expected declaration specifiers or '...' before 'bool'
../../src/include/mb/pg_wchar.h:463: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_utf8_islegal'
make[2]: *** [chklocale.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from strlcpy.c:35:

../../src/include/c.h:196: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from strlcat.c:22:
../../src/include/c.h:196: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from ../../src/include/c.h:851,
                 from strlcat.c:22:
../../src/include/port.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_noblock'
In file included from ../../src/include/c.h:851,
                 from strlcpy.c:35:
../../src/include/port.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_noblock'
../../src/include/port.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_block'
../../src/include/port.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_block'
../../src/include/port.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_contains_parent_reference'
../../src/include/port.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_contains_parent_reference'
../../src/include/port.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_is_prefix_of_path'
../../src/include/port.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_is_prefix_of_path'
../../src/include/port.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'get_home_path'
../../src/include/port.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'get_home_path'
../../src/include/port.h:222: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:222: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:291: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:291: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:293: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rmtree'
../../src/include/port.h:293: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rmtree'
make[2]: *** [strlcat.o] Error 1
make[2]: *** [strlcpy.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/postgresql-base-9.0.1/work/postgresql-9.0.1/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/postgresql-base-9.0.1/work/postgresql-9.0.1/src'
make: *** [all] Error 2
emake failed


Reproducible: Always




Portage 2.1.9.19 (default/linux/powerpc/ppc32/10.0, gcc-4.4.5, glibc-2.12.1-r1, 2.6.35-gentoo-r10 ppc)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.35-gentoo-r10-ppc-7400,_altivec_supported-with-gentoo-2.0.1
Timestamp of tree: Mon, 18 Oct 2010 09:30:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.68
sys-devel/automake:  1.6.3-r1, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.82
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="ppc ~ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=7400 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=7400 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://www.ibiblio.org/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="auto-hinter berkdb bzip2 cli cracklib crypt cups cxx dri gdbm iconv ipv6 modules ncurses nls nptl nptlonly odbc openmp pam pcre perl postgres ppc pppd python readline reflection session ssl sysfs tcpd threads unicode xorg zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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" 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" LINGUAS="en nl" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage tdfx trident voodoo" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Stefan de Konink 2010-10-19 07:58:41 UTC
The fix seems to be:

src/include/c.h:183
//#ifndef bool
typedef char bool;
//#endif

But where it is defined prior... no clue...
Comment 2 Jérémy Just 2010-12-25 17:22:47 UTC
I confirm the bug with dev-db/postgresql-base-8.4.5 on Gentoo PPC hardened.

I've recently upgraded from gcc-4.3.4 to gcc-4.4.4 and that has caused a few problems with some packages (XEmacs, for example). Postgresql may have been affected by this upgrade too.

<<<<<<<<<<<<<<<<<<<<<<<<<
powerpc-unknown-linux-gnu-gcc -O2 -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE   -c -o strlcat.o strlcat.c -MMD -MP -MF .deps/strlcat.Po
powerpc-unknown-linux-gnu-gcc -O2 -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE   -c -o strlcpy.o strlcpy.c -MMD -MP -MF .deps/strlcpy.Po
In file included from strlcat.c:22:
../../src/include/c.h:193: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from strlcpy.c:35:
../../src/include/c.h:193: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' tokenIn file included from ../../src/include/c.h:854,
                 from strlcat.c:22:
../../src/include/port.h:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_noblock'

../../src/include/port.h:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_block'
../../src/include/port.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_contains_parent_reference'
../../src/include/port.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_is_prefix_of_path'
../../src/include/port.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'get_home_path'
../../src/include/port.h:211: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:280: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:282: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rmtree'
make[2]: *** [strlcat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../src/include/c.h:854,
                 from strlcpy.c:35:
../../src/include/port.h:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_noblock'
../../src/include/port.h:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_set_block'
../../src/include/port.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_contains_parent_reference'
../../src/include/port.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'path_is_prefix_of_path'
../../src/include/port.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'get_home_path'
../../src/include/port.h:211: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:280: error: expected declaration specifiers or '...' before 'bool'
../../src/include/port.h:282: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rmtree'
make[2]: *** [strlcpy.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/postgresql-base-8.4.5/work/postgresql-8.4.5/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/postgresql-base-8.4.5/work/postgresql-8.4.5/src'
make: *** [all] Error 2
emake failed
>>>>>>>>>>>>>>>>>>>>>>>>>


<<<<<<<<<<<<<<<<<<<<<<<<<
Portage 2.1.9.25 (hardened/linux/powerpc/ppc32, gcc-4.4.4, glibc-2.11.2-r3, 2.6.28-hardened-r9 ppc)
=================================================================
System uname: Linux-2.6.28-hardened-r9-ppc-7447A,_altivec_supported-with-gentoo-1.12.14
Timestamp of tree: Sat, 25 Dec 2010 15:15:03 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="-O2 -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr en"
MAKEOPTS="-j2"
USE="acl altivec apache2 bash-completion berkdb bzip2 cdr cgi clamav cli cracklib crypt cxx dbm dri dvd dvdr fastcgi gd gdbm gif gmp gnutls gpm graphviz hardened hardenedphp iconv imagemagick imap jpeg mbox modules mpeg mudflap mule ncurses nptl nptlonly openmp pam pcre pdf perl pic png posix postgres ppc python readline session spell ssl svg symlink sysfs tcpd tetex tiff urandom xml xorg xpm zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac" 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 auth_digest authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir env expires file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi fcgid" 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" KERNEL="linux" LCD_DEVICES="ncurses text" LINGUAS="fr en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon fbdev dummy vga" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
>>>>>>>>>>>>>>>>>>>>>>>>>

  Thank you for your help!
Comment 3 Jérémy Just 2011-04-10 22:11:49 UTC
Problem still exists with dev-db/postgresql-base-9.0.3 and 9.0.3-r1

After an emerge failure, if I enter the directory /var/tmp/portage/dev-db/postgresql-base-9.0.3/work/postgresql-9.0.3 and I run the configure and make with the same options that are in the log file, everything works smoothly:

<<<<<<<<<<
$ make clean

$ ./configure --prefix=/usr --build=powerpc-unknown-linux-gnu --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --prefix=/usr/lib/postgresql-9.0 --datadir=/usr/share/postgresql-9.0 --docdir=/usr/share/doc/postgresql-9.0 --sysconfdir=/etc/postgresql-9.0 --includedir=/usr/include/postgresql-9.0 --mandir=/usr/share/postgresql-9.0/man --enable-depend --without-tcl --without-perl --without-python --with-readline --without-krb5 --without-gssapi --disable-nls --with-pam --enable-integer-datetimes --with-openssl --with-zlib --without-ldap

$ make
>>>>>>>>>>

So I suppose the bug is in the ebuild, and not in PostgreSQL. Unfortunately, I know absolutely nothing about the ebuild debugging process. I'm just starting to read the developer handbook.

What could I do to help finding the problem?

Jérémy.
Comment 4 Aaron W. Swenson gentoo-dev 2011-06-29 02:21:58 UTC
(In reply to comment #3)
> Problem still exists with dev-db/postgresql-base-9.0.3 and 9.0.3-r1
> 
> After an emerge failure, if I enter the directory
> /var/tmp/portage/dev-db/postgresql-base-9.0.3/work/postgresql-9.0.3 and I run
> the configure and make with the same options that are in the log file,
> everything works smoothly:
> 
> <<<<<<<<<<
> ....
> >>>>>>>>>>
> 
> So I suppose the bug is in the ebuild, and not in PostgreSQL. Unfortunately, I
> know absolutely nothing about the ebuild debugging process. I'm just starting
> to read the developer handbook.
> 
> What could I do to help finding the problem?
> 
> Jérémy.

It's sort of in the ebuild. For that manual run, you also need to pass the various environment variables set by Portage.
Comment 5 Stefan de Konink 2011-07-11 10:59:07 UTC
Any updates? My workaround is working even in the 9.0.4-r2 so could anyone take some action on this?
Comment 6 Aaron W. Swenson gentoo-dev 2011-08-02 02:50:58 UTC
Give the latest revisions a go.