| Summary: | P01 compiled with CMake loading nonexistent libExP01ClassesDict.so | ||
|---|---|---|---|
| Product: | Examples/Extended | Reporter: | Mojca Miklavec <mojca.miklavec.lists> |
| Component: | persistency/P01,P02 | Assignee: | Witold.Pokorski |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 9.6 | ||
| Hardware: | Apple | ||
| OS: | Mac OS X | ||
Hi Mojca, I have just tried and the example works fine for me. The libExP01ClassesDict.so (yes .so also on Mac) is generated by the CMake build system. You should be able to find it in your CMake build directory in outputs/library/Darwin-clang Cheers, Witek (In reply to comment #1) > Hi Mojca, > > I have just tried and the example works fine for me. The libExP01ClassesDict.so > (yes .so also on Mac) is generated by the CMake build system. You should be > able to find it in your CMake build directory in outputs/library/Darwin-clang I don't want to rebuild everything again to check, but I never claimed the file isn't generated. All I'm claiming is that it doesn't get installed with "make install". To simplify testing I have installed geant4 and then tried to compile just the example with the following command: cmake -DCMAKE_INSTALL_PREFIX=$PWD/inst ../../geant4.10.00.b01/examples/extended/persistency/P01 make make install The file libExP01ClassesDict.so ends up in current folder (the one where "make" is run), but it doesn't end up in "inst": > find inst inst inst/bin inst/bin/exampleP01 inst/bin/readHits So I need to delete the files (exampleP01, exampleP02, readHits) to prevent complaints. (In reply to comment #2) > I never claimed the file > isn't generated. All I'm claiming is that it doesn't get installed with "make > install". Oh, sorry. It's probably not true that I didn't claim that it's not generated. Anyway: it IS generated somehow, but it doesn't end up in the right place. added install command copying the dictionary to the lib directory |
I'm compiling Geant4 9.6 with examples (for testing reasons) in MacPorts on Mac OS X 10.7, but the checking phase of installation fails: Could not open /opt/local/lib/libExP01ClassesDict.so: Error opening or reading file (referenced from /opt/local/libexec/Geant4/Geant4.9.6/examples/exampleP01) Could not open /opt/local/lib/libExP02ClassesDict.so: Error opening or reading file (referenced from /opt/local/libexec/Geant4/Geant4.9.6/examples/exampleP02) The code tries to load ./src/RootIO.cc: gSystem->Load("libExP01ClassesDict"); and the library is probably created with GNUmake: ./GNUmakefile: $(CXX) -o ${G4WORKDIR}/tmp/${G4SYSTEM}/${G4TARGET}/libExP01ClassesDict.so -fpic -shared ... while the CMake procedure doesn't seem to generate any such library. (Also, I would expect the library on Mac to have an extension dylib, but that's less important.)