Hello, dear all!
I have a problem.
I built my geant4(version geant4.10.05.p01) to this directory: /opt/geant4/geant4.10.05.p01
After that i ran my project with cmake: after success compiling my project i have this error:
/opt/geant4/geant4.10.05.p01/config/binmake.gmk:398: recipe for target ‘Linux-g++/tracker’ failed
file content(binmake.gmk) is:
395 (G4BINDIR)/(G4TARGET): $(LINK_DEPENDENCIES)
I built to this directory(/opt/geant4/geant4.10.05.p01) my install-files, i.e. this directory has source and install files and no build-files.
My project and geant4 are different directory.
P.S. I use Linux Mint 19.
compilling my project and my error:
andy@andy:~/geant4/MONITOR$ make
Making dependency for file tracker.cc …
Compiling tracker.cc …
Using granular libraries …
ERROR: No liblist program or library map file.
These are needed for building with granular
libraries.
cd $G4INSTALL/source
gmake
or if you are sure you have already made all the
granular libraries:
gmake libmap
/opt/geant4/geant4.10.05.p01/config/binmake.gmk:398: recipe for target ‘Linux-g++/tracker’ failed
make: *** [Linux-g++/tracker] Error 1
To use the GNUmake system, you need to source the geant4make.sh file first, which should be located at /opt/geant4/geant4.10.05.p01/share/Geant4-10.5.1/geant4make/geant4make.sh.
may be, do I have multiple definitions of the same class?
look up my error(it is line after ifndef) in text down:
this is file binmake.gmk
… (G4BINDIR)/(G4TARGET): $(LINK_DEPENDENCIES)
ifndef USER_DEFINED_LDLIBS
ifndef GLOBALLIBS
**@echo "Using granular libraries ..."**
@if [ ! \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
echo "ERROR: No liblist program or library map file."; \
echo " These are needed for building with granular"; \
echo " libraries."; \
echo ' cd $$G4INSTALL/source'; \
echo " gmake"; \
echo " or if you are sure you have already made all the"; \
echo " granular libraries:"; \
echo " gmake libmap"; \
exit 1; fi
OK, thank you very mach your help!
I ran this file in current terminal:
andy@andy:~/geant4/MONITOR$ source /opt/geant4/geant4.10.05.p01/share/Geant4-10.5.1/geant4make/geant4make.sh
and my error went away/disappear, but the new error came up:
Using global libraries …
Linking tracker
/usr/bin/ld: cannot find -lEvent
collect2: error: ld returned 1 exit status
/opt/geant4/geant4.10.05.p01/share/Geant4-10.5.1/geant4make/config/binmake.gmk:411: recipe for target ‘Linux-g++/tracker’ failed
make: *** [Linux-g++/tracker] Error 1
What’s the Event library? Part of your project, or from somewhere else? It’s not part of Geant4, so you’ll need to look in your project’s Makefile so see how it expect to be located.
What libraries are linked to libSD and libOptical (and in what order since they’re built static)? The missing symbols should be in the libG4global library.
hello, dear all!
Thank you very much for your help!
I use Linux Mint 19 Mate, root_v5.34.38, geant4.10.05.p01.
I resolved my problem:
i used different classes in my project and if i write them in one file - i have this error(written up) , but if these classes write in two different files - error vanishes.