Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251681 - Patch required for media-libs/openinventor to compile sci-physics/geant
Summary: Patch required for media-libs/openinventor to compile sci-physics/geant
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks:
 
Reported: 2008-12-19 23:05 UTC by Robert Penny
Modified: 2009-01-25 15:07 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 Robert Penny 2008-12-19 23:05:40 UTC
When trying to build sci-physics/geant-4.9.1_p03, there is a compilation error in:

geant4.9.1.p03/source/visualization/OpenInventor/src/SoDetectorTreeKit.cc

src/SoDetectorTreeKit.cc:67: error: extra ';'

This line has a reference to the macro:

	SO_KIT_SOURCE(SoDetectorTreeKit)

The macro is defined in the include files installed by
media-libs/openinventor

file: /usr/include/Inventor/nodekits/SoSubKit.h, line 194

#define SO_KIT_SOURCE(className)	                                      \
    SO_NODE_SOURCE(className);	                                              \
    SO__KIT_CATALOG_VARS(className);	                                      \
    SO__KIT_CATALOG_METHODS(className)


I currently have media-libs/openinventor-2.1.5.10-r2 installed.

Changing line 195 of /usr/include/Inventor/nodekits/SoSubKit.h, line 195 from

    SO_NODE_SOURCE(className);

to:

    SO_NODE_SOURCE(className)

fixes the problem.

It seems like this has already been addressed in Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/inventor/+bug/5733

Reproducible: Always

Steps to Reproduce:
1. package.use: sci-physics/geant examples opengl vrml openinventor dawn

2. package.keywords: sci-physics/geant ~x86

3. emerge --deep geant > build.log 2>&1 &

4. examine build.log to see the compiler error:

src/SoDetectorTreeKit.cc:67: error: extra ';'





Actual Results:  
The error message from the compiler is:

g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
 -pipe -O2 -mtune=i686 -pipe -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4VIS_BU
ILD -DG4VIS_BUILD_DAWN_DRIVER -DG4VIS_BUILD_OPENGLXM_DRIVER -DG4VIS_BUILD_OPENGLX_DRIVER -DG4VIS_BUILD_OPENGL_DRIVER -
DG4VIS_BUILD_OI_DRIVER -DG4VIS_BUILD_RAYTRACERX_DRIVER -DG4VIS_BUILD_VRML_DRIVER -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPR
EPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -I/var/tmp/portage/sci-phy
sics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/FukuiRenderer/include -I/var/tmp/portage/sci-physics/gea
nt-4.9.1_p03/work/geant4.9.1.p03/source/visualization/HepRep/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/wo
rk/geant4.9.1.p03/source/visualization/RayTracer/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.
1.p03/source/visualization/VRML/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visu
alization/Tree/include -DG4VIS_USE_DAWN -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -I/var/tmp/portage
/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/OpenGL/include -DG4VIS_USE_OI -I/var/tmp/portage
/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/OpenInventor/include -DG4VIS_USE_RAYTRACERX -DG4
VIS_USE_VRML -DG4VIS_USE -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/manag
ement/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/modeling/include
 -I/usr/local/Inventor/include  -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -DG4I
NTY_BUILD_XT -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/management/includ
e -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/visualization/modeling/include -I/var/tmp/
portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/global/management/include -I/var/tmp/portage/sci-physic
s/geant-4.9.1_p03/work/geant4.9.1.p03/source/global/HEPGeometry/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03
/work/geant4.9.1.p03/source/geometry/solids/CSG/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1
.p03/source/geometry/solids/specific/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source
/graphics_reps/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/geometry/management/i
nclude -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/interfaces/common/include -I/var/tmp/
portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/intercoms/include -I/var/tmp/portage/sci-physics/geant-
4.9.1_p03/work/geant4.9.1.p03/source/materials/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.
p03/source/global/HEPRandom/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/tracking
/include -I/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/source/digits_hits/hits/include -c -o /var
/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/tmp/Linux-g++/G4OpenInventor/SoGL2PSAction.o src/SoGL2PSA
ction.cc
src/SoDetectorTreeKit.cc:67: error: extra ';'
make[2]: *** [/var/tmp/portage/sci-physics/geant-4.9.1_p03/work/geant4.9.1.p03/tmp/Linux-g++/G4OpenInventor/SoDetectorTreeKit.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [granular] Error 2





It takes about an hour of compilation time of Geant to get to the error.  I would recommend manually doing the ebuild via:

ebuild /usr/portage/sci-physics/geant/geant-4.9.1_p03.ebuild compile > geant_ebuild_compile.log 2>&1 &

.. then patch the file SoSubKit.h file, delete the .compile file in /var/tmp/portage/sci-physics/geant-4.9.1_p03

and

ebuild /usr/portage/sci-physics/geant/geant-4.9.1_p03.ebuild compile > geant_ebuild_compile_SoSubKit_patched.log 2>&1 &

This will let gmake pick up the compilation where it left off without having to do the hour of successful compilation leading up to this point.

Other than the error message in the build log, and the failure to generate libG4OpenInventor.so, the emerge of geant4 appears to complete and install.  I would guess that the emerge should throw an error, or at least a warning on completion.
Comment 1 Robert Penny 2008-12-20 00:12:28 UTC
As an addendum, it may be the g++ -pedantic flag that's making this error appear in the Geant compilation where it might not appear elsewhere.
Comment 2 Wormo (RETIRED) gentoo-dev 2008-12-21 05:09:19 UTC
Thank you for this informative report; assigning to maintainers.
Comment 3 Stefaan De Roeck (RETIRED) gentoo-dev 2008-12-21 09:55:41 UTC
Just put this in ~arch: media-libs/openinventor-2.1.5.10-r3.  
If you could verify this fix and report back, moving it to stable should only be a formality.
Thanks for your very thorough report!!
Comment 4 Robert Penny 2008-12-22 20:39:21 UTC
It all looks good.

I synched the portage tree via emerge-webrsync (we're behind a firewall).  Fortunately media-libs/openinventor 2.1.5.10-r3 was in the latest snapshot.

emerge --deep media-libs/openinventor

The emerge appeared to complete without error.

Then:

emerge --deep geant > geant_openinventor_patched-2.1.5.10-r3_emerge.log 2>&1

There were no errors in the logfile this time.  This appears to have fixed the problem in the compilation of SoDetectorTreeKit.cc.

Note: Geant is the only package I have that uses OpenInventor, so it's the only one I can sensibly do a test build on against the new patch.

Thanks for the rapid response on this!
Comment 5 Markus Meier gentoo-dev 2009-01-18 13:09:25 UTC
Stefaan: can we add arches and request stabilisation?
Comment 6 Stefaan De Roeck (RETIRED) gentoo-dev 2009-01-19 07:10:33 UTC
(In reply to comment #5)
> Stefaan: can we add arches and request stabilisation?
> 

By all means.  Arches, please note that the only change from -r2 to -r3 is files/bug-251681.patch.  Thanks.  
Comment 7 Ferris McCormick (RETIRED) gentoo-dev 2009-01-19 13:26:01 UTC
Sparc stable.
Comment 8 Markus Meier gentoo-dev 2009-01-23 21:48:21 UTC
amd64/x86 stable
Comment 9 Tobias Klausmann (RETIRED) gentoo-dev 2009-01-25 15:07:26 UTC
Stable on alpha, closing.