Installing the native Coin3D packages on Mac (OSX 10.7.4) results in having the Coin3d library (libCoin.dylib) located in: /Library/Frameworks/Inventor.framework/Libraries/ and the SoXt extensions (libSoXt.dylib) in: /opt/local/lib (specifying /opt/local as prefix in the installation). CMake apparently correctly picks up the SoXt lib from /opt/local but something fails in referencing the Coin3D library... so that the generation of the final libG4OpenInventor.dylib fails. Looking at the LD command issued through XCode (attached below) for generating the G4Inventor driver library, one can clearly see that the Coin3d library is missing in the list... at least, I cannot see any call to libCoin.dylib from /Library/Frameworks/Inventor.framework ... therefore all Sb*/So* symbols defined in the Coin3d libraries get undefined. The configuration for visualization I've chosen is: + GEANT4_USE_GDML + GEANT4_USE_INVENTOR + GEANT4_USE_NETWORKDAWN + GEANT4_USE_NETWORKVRML + GEANT4_USE_OPENGL_X11 + GEANT4_USE_RAYTRACER_X11 + GEANT4_USE_XM Both INVENTOR_LIBRARY_RELEASE and INVENTOR_INCLUDE_DIR are properly set to /Library/Frameworks/Inventor.framework in the configuration... ------------ Ld /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4OpenInventor.dylib normal x86_64 cd /Users/gcosmo/Software/geant4 setenv MACOSX_DEPLOYMENT_TARGET 10.7 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -L/Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug -F/Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Library/Frameworks -filelist /Users/gcosmo/Software/g4work/source/visualization/OpenInventor/Geant4.build/Debug/G4OpenInventor.build/Objects-normal/x86_64/G4OpenInventor.LinkFileList -install_name /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4OpenInventor.dylib -mmacosx-version-min=10.7 -dynamiclib -Wl,-headerpad_max_install_names /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4gl2ps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4interfaces.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4modeling.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4vis_management.dylib -framework AGL -framework OpenGL /usr/X11R6/lib/libGL.dylib /usr/X11R6/lib/libGLU.dylib /opt/local/lib/libSoXt.dylib /sw/lib/libXm.dylib /usr/X11R6/lib/libSM.dylib /usr/X11R6/lib/libICE.dylib /usr/X11R6/lib/libX11.dylib /usr/X11R6/lib/libXext.dylib /usr/X11R6/lib/libXt.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4zlib.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4modeling.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4run.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4event.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4processes.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4track.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4particles.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4clhep.dylib /usr/lib/libexpat.dylib -single_module -o /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Debug/libG4OpenInventor.dylib
Identified as issue in FindInventor.cmake when Debug mode is selected, but debug Inventor libraries are not present. The module uses a style of library declaration that does not provide a fallback when debug libraries are not present. Fix in progress
Increasing priority for 9.6 release.
I can confirm that by setting build type to Release in CMake allows for proper build of the libraries. Still, when linking any example (doing this through XCode), I get a link error saying: ld: framework not found Inventor The link dump is reported below and Inventor seems to be included... Ld /Users/gcosmo/Software/g4work/outputs/runtime/Release/exampleB4d normal x86_64 cd /Users/gcosmo/Software/geant4 setenv MACOSX_DEPLOYMENT_TARGET 10.8 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/gcosmo/Software/g4work/outputs/runtime/Release -F/Users/gcosmo/Software/g4work/outputs/runtime/Release -F/opt/local/lib -filelist /Users/gcosmo/Software/g4work/examples/basic/B4/B4d/Geant4.build/Release/exampleB4d.build/Objects-normal/x86_64/exampleB4d.LinkFileList -mmacosx-version-min=10.8 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4Tree.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4FR.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4GMocren.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4visHepRep.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4RayTracer.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4VRML.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4OpenGL.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4gl2ps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4OpenInventor.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4vis_management.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4modeling.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4interfaces.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4persistency.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4analysis.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4error_propagation.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4readout.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4physicslists.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4run.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4event.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4parmodels.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4processes.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4track.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4particles.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4clhep.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4zlib.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4FR.dylib /usr/X11R6/lib/libXmu.dylib -framework QtOpenGL /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4gl2ps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4zlib.dylib -framework AGL /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4vis_management.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4modeling.dylib -framework QtGui -framework QtCore -framework Inventor -framework OpenGL /usr/X11R6/lib/libGL.dylib /usr/X11R6/lib/libGLU.dylib /opt/local/lib/libSoXt.dylib /sw/lib/libXm.dylib /usr/X11R6/lib/libSM.dylib /usr/X11R6/lib/libICE.dylib /usr/X11R6/lib/libX11.dylib /usr/X11R6/lib/libXext.dylib /usr/X11R6/lib/libXt.dylib /opt/local/lib/libxerces-c.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4run.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4event.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4processes.dylib /usr/lib/libexpat.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4track.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4particles.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4clhep.dylib -o /Users/gcosmo/Software/g4work/outputs/runtime/Release/exampleB4d
Preliminary fix committed in tag cmake-V09-05-51 (r62909), please see the commit log for details (N.B. clang++ does not like Inventor!). Tested against the ref-09 development tag, and all seems fine. Please try it yourselves and report any errors here!
Thanks for the report John, I have seen the clang++ issue: In file included from /Library/Frameworks/Inventor.framework/Headers/SoType.h:27: /Library/Frameworks/Inventor.framework/Headers/SbBasic.h:99:5: error: call to function 'cc_debugerror_post' that is neither visible in the template definition nor found by argument-dependent lookup cc_debugerror_post(funcname, "divide by zero error.", divider); ^ /Library/Frameworks/Inventor.framework/Headers/SbVec3f.h:78:37: note: in instantiation of function template specialization 'SbDividerChk<float>' requested here SbVec3f & operator /= (float d) { SbDividerChk(... ^ /Library/Frameworks/Inventor.framework/Headers/C/errors/debugerror.h:59:19: note: 'cc_debugerror_post' should be declared prior to the call site COIN_DLL_API void cc_debugerror_post(const char * source, const char * ... ^ 3 errors generated. make[2]: *** [source/visualization/OpenInventor/CMakeFiles/G4OpenInventor.dir/src/G4OpenInventor.cc.o] Error 1 make[1]: *** [source/visualization/OpenInventor/CMakeFiles/G4OpenInventor.dir/all] Error 2 make: *** [all] Error 2 as well. This I think would need tracing through the Inventor sources, as the functions mentioned are part of Inventor. For now I will note this problem in the documentation. I'll leave the bug as ASSIGNED for now. Once the tag is accepted, I'll mark it as RESOLVED FIXED unless Gabriele has further comments.
I've tried "cmake-V09-05-51" on top of ref-09. Just tried one configuration (Release, on XCode). I come to the same conclusion I reported in my last posting: - libraries build fine; - examples fail to link with the error "Framework not found Inventor".
Can you build the example outside of Geant4 (i.e. standalone?). There's nothing in that link list to suggest a problem, but what link line do you get for the build of the actual G4OpenInventor library? This is just to see if we can get a comparison. Also, could you check the architectures you have in your Inventor framework? There's no architecture related error, but just worthwhile to check.
> Can you build the example outside of Geant4 (i.e. standalone?). There's nothing > in that link list to suggest a problem, but what link line do you get for the > build of the actual G4OpenInventor library? This is just to see if we can get a > comparison. Indeed, the examples are built in a separate location from the Geant4 source tree. The failure I get happens when selecting the GEANT4_BUILD_EXAMPLES flag in CMake, which automatically triggers the build of all examples after having built the libraries. Below you find the link line used for building the G4OpenInventor library... Have tried to select -only- Inventor as driver in CMake and then built B1 as only target and ... this time it linked OK ! So, I'm rather confused. It appears to me the GEANT4_BUILD_EXAMPLES flag does not work properly ! > Also, could you check the architectures you have in your Inventor framework? > There's no architecture related error, but just worthwhile to check. I guess it's a Universal binary... how can I check that for sure ? ... and it works fine though through the GNUmake system. ---------- Ld /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4OpenInventor.dylib normal x86_64 cd /Users/gcosmo/Software/geant4 setenv MACOSX_DEPLOYMENT_TARGET 10.8 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release -F/Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release -F/Library/Frameworks -filelist /Users/gcosmo/Software/g4work/source/visualization/OpenInventor/Geant4.build/Release/G4OpenInventor.build/Objects-normal/x86_64/G4OpenInventor.LinkFileList -install_name /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4OpenInventor.dylib -mmacosx-version-min=10.8 -dynamiclib -Wl,-headerpad_max_install_names /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4gl2ps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4interfaces.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4modeling.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4vis_management.dylib -framework Inventor -framework AGL -framework OpenGL /usr/X11R6/lib/libGL.dylib /usr/X11R6/lib/libGLU.dylib /opt/local/lib/libSoXt.dylib /sw/lib/libXm.dylib /usr/X11R6/lib/libSM.dylib /usr/X11R6/lib/libICE.dylib /usr/X11R6/lib/libX11.dylib /usr/X11R6/lib/libXext.dylib /usr/X11R6/lib/libXt.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4zlib.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4modeling.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4run.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4event.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4tracking.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4processes.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4digits_hits.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4track.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4particles.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4geometry.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4graphics_reps.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4materials.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4intercoms.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4global.dylib /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4clhep.dylib /usr/lib/libexpat.dylib -single_module -o /Users/gcosmo/Software/g4work/outputs/library/Darwin-g++/Release/libG4OpenInventor.dylib
Resolved as of Release 9.6