Problem 1502 - P01 compiled with CMake loading nonexistent libExP01ClassesDict.so
Summary: P01 compiled with CMake loading nonexistent libExP01ClassesDict.so
Status: RESOLVED FIXED
Alias: None
Product: Examples/Extended
Classification: Unclassified
Component: persistency/P01,P02 (show other problems)
Version: 9.6
Hardware: Apple Mac OS X
: P5 trivial
Assignee: Witold.Pokorski
URL:
Depends on:
Blocks:
 
Reported: 2013-07-26 15:34 CEST by Mojca Miklavec
Modified: 2014-07-04 17:02 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Mojca Miklavec 2013-07-26 15:34:40 CEST
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.)
Comment 1 Witold.Pokorski 2013-08-06 18:00:48 CEST
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
Comment 2 Mojca Miklavec 2013-08-07 15:05:08 CEST
(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.
Comment 3 Mojca Miklavec 2013-08-07 15:07:34 CEST
(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.
Comment 4 Witold.Pokorski 2014-07-04 17:01:52 CEST
added install command copying the dictionary to the lib directory