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

Bug 128738

Summary: openpbs-2.3.16-r3 fails to compile with gcc-4
Product: Gentoo Linux Reporter: Sebastiaan <s.breedveld>
Component: [OLD] GCC PortingAssignee: Gentoo Cluster Team <cluster>
Status: RESOLVED FIXED    
Severity: critical CC: halcy0n
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Other   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 117482    
Attachments: openpbs-gcc4.patch
openpbs-2.3.16-r4.ebuild

Description Sebastiaan 2006-04-04 01:51:12 UTC
When compiling OpenPBS with gcc-4 it exits with:

sed: file ../../buildutils/exclude_script line 4: unknown command: `/'
make[3]: Entering directory `/var/tmp/portage/openpbs-2.3.16-r3/work/OpenPBS_2_3_16/src/resmom'
gcc -O3 -march=pentium4 -pipe -I../include -I../../src/include -I./linux -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/sbin/pbs_demux\" -DRCP_PATH=\"/usr/sbin/pbs_rcp\" -c mom_main.c
gcc -O3 -march=pentium4 -pipe -I../include -I../../src/include -I./linux -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/sbin/pbs_demux\" -DRCP_PATH=\"/usr/sbin/pbs_rcp\" -c mom_comm.c
gcc -O3 -march=pentium4 -pipe -I../include -I../../src/include -I./linux -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/sbin/pbs_demux\" -DRCP_PATH=\"/usr/sbin/pbs_rcp\" -c mom_server.c
In file included from mom_server.c:106:
../include/pbs_nodes.h:196: error: array type has incomplete element type
make[3]: *** [mom_server.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/openpbs-2.3.16-r3/work/OpenPBS_2_3_16/src/resmom'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/openpbs-2.3.16-r3/work/OpenPBS_2_3_16/src/resmom'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/openpbs-2.3.16-r3/work/OpenPBS_2_3_16/src'
make: *** [all] Error 2

The sed error is from the gcc32 patch. Not sure what it patches, but when removed openpbs still compiles.

The incomplete element type error seems typical for gcc-4:
http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html

This patch seems to fix it (I'm not a programmer!).
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-04 01:56:12 UTC
*** Bug 128739 has been marked as a duplicate of this bug. ***
Comment 2 Sebastiaan 2006-04-04 01:56:26 UTC
Created attachment 83867 [details, diff]
openpbs-gcc4.patch
Comment 3 Sebastiaan 2006-04-04 01:57:11 UTC
Created attachment 83868 [details]
openpbs-2.3.16-r4.ebuild
Comment 4 Mark Loeser (RETIRED) gentoo-dev 2006-05-01 09:36:51 UTC
I'm not about to register on the site, so I can't give you an actual fix, but I can tell you right now that the one proposed isn't the right one :)  Find out where attribute_def is defined (in which header), and include that header at the top of the file with the error.  That should fix it.
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2006-09-25 21:40:41 UTC
Fixed in CVS.