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.
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.
Thank you for this informative report; assigning to maintainers.
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!!
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!
Stefaan: can we add arches and request stabilisation?
(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.
Sparc stable.
amd64/x86 stable
Stable on alpha, closing.