0

I got some error message while installing GENIE generator. I am using :

  ubuntu  18.0.4
  gcc      7.3.0
  ROOT    v6.14.04
  gsl     v1.1
  pythia6 v6.4.28
  LHAPDF  v5.9.1
  log4cpp v1.1.3-1 
  libxml2 v2.9.2 

Path setting and Configure setting is using :

 ------------PATH-SETTING-------------
 export GENIE=/home/feng/Desktop/genie/GENIE-master
 export ROOTSYS=/home/feng/Desktop/Support/root_v6.14.04.source/ROOT
 source /home/feng/Desktop/Support/root_v6.14.04.source/ROOT/bin/thisroot.sh
 export PYTHONPATH=$PYTHONPATH:$ROOTSYS/lib
 export PYTHIA6=/home/feng/Desktop/Support/pythia6428/lib
 export LHAPATH=/home/feng/Desktop/Support/lhapdf_5.9.1.orig/LHAPDF
 export LHAPDF_INC=/home/feng/Desktop/Support/lhapdf_5.9.1.orig/LHAPDF/include
 export LHAPDF_LIB=/home/feng/Desktop/Support/lhapdf_5.9.1.orig/LHAPDF/lib

 export LD_LIBRARY_PATH=/usr/lib:\LDLIBRARYPATH
 export LD_LIBRARY_PATH=/home/feng/Desktop/Support/lhapdf_5.9.1.orig/LHAPDF/lib:\LDLIBRARYPATH
 export LD_LIBRARY_PATH=/home/feng/Desktop/Support/pythia6428/lib:\LDLIBRARYPATH
 export LD_LIBRARY_PATH=/home/feng/Desktop/Support/root_v6.14.04.source/ROOT/lib:\LDLIBRARYPATH
 export LD_LIBRARY_PATH=/home/feng/Desktop/genie/GENIE-Generator_v2.10.0/lib:\LDLIBRARYPATH

 ---------------CONFIGURE-SETTING-------------
 #!/bin/bash
 ./configure \
 --enable-gsl \
 --prefix=/home/feng/Desktop/genie/GENIE-master/GENIE \

And the error message is below.

** Building gevgen g++ -g -Wl,--no-as-needed -Wl,--no-undefined gEvGen.o -L/home/feng/Desktop/Support/root_v6.14.04.source/ROOT/lib -lGui -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTDataFrame -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -pthread -lm -ldl -rdynamic -lMinuit -lGeom -lEG -lEGPythia6 -lGenVector -L/home/feng/Desktop/Support/pythia6428/lib -lPythia6 -L/home/feng/Desktop/Support/lhapdf_5.9.1.orig/LHAPDF/lib -lLHAPDF -L/usr/lib/x86_64-linux-gnu -lxml2 -L/usr/local/lib -llog4cpp -lnsl -L/home/feng/Desktop/genie/GENIE-master/lib -lGMessenger -lGRegistry -lGAlgorithm -lGInteraction -lGHEP -lGBase -lGNumerical -lGUtils -lGPDG -lGBaryonResonance -lGEVGCore -lGEVGDrivers -lGNtuple -lGGeo -lGFluxDrivers -lGPDF -lGElFF -lGDecay -lGFragmentation -lGNuclear -lGLlewellynSmith -lGCrossSections -lGCharm -lGElas -lGGiBUU -lGReinSehgal -lGQPM -lGBodekYang -lGEVGModules -lGQEL -lGRES -lGDIS -lGCoh -lGDfrc -lGMEC -lGNuE -lGNuGamma -lGHadronTransp -lGAlvarezRuso -lGBergerSehgal -lGSingleKaon -lGMuELoss -o /home/feng/Desktop/genie/GENIE-master/bin/gevgen

gEvGen.o: In function `_GLOBAL__sub_I_gEvGen.cxx':

gEvGen.cxx:(.text.startup+0x40): undefined reference to `log4cpp::Appender::AppenderMapStorageInitializer::AppenderMapStorageInitializer()'

gEvGen.cxx:(.text.startup+0x47): undefined reference to `log4cpp::Appender::AppenderMapStorageInitializer::~AppenderMapStorageInitializer()'

collect2: error: ld returned 1 exit status

Makefile:85: recipe for target '/home/feng/Desktop/genie/GENIE-master/bin/gevgen' failed

make[1]: *** [/home/feng/Desktop/genie/GENIE-master/bin/gevgen] Error 1

make[1]: Leaving directory '/home/feng/Desktop/genie/GENIE-master/src/Apps'

Makefile:257: recipe for target 'apps' failed

make: *** [apps] Error 2

I have tried GENIE 2.0.0 , 2.8.0 , 2.10.0. It does not seems like version problems.

I don't know, what to do :(

Please help me.

  • Did you look into `log4cpp` whether there is such a class `log4cpp::Appender::AppenderMapStorageInitializer` available? Are you sure that `log4cpp v1.1.3-1` is the right version? May be, a newer is necessary or even an older... This should be documented somewhere. – Scheff's Cat Oct 02 '18 at 08:12
  • There is a class define in my Appender.hh class LOG4CPP_EXPORT AppenderMapStorageInitializer { public: AppenderMapStorageInitializer(); ~AppenderMapStorageInitializer(); }; – 馮立誠 Oct 02 '18 at 08:34
  • There is a class but when using it from another DLL it is complained as unresolved reference? The usual reason in Windows is that the `__declspec(dllexport)` is not defined properly. In your case, `LOG4CPP_EXPORT` had to be `__declspec(dllexport)` when compiling log4cpp DLL and `__declspec(dllimport)` otherwise. I see you are on ubuntu - i.e. no MS `__declspec` thingy-dingy. Though, for shared objects, there is something similar: `__attribute__ (visibility)` which is used similar like these `__declspec` things. – Scheff's Cat Oct 02 '18 at 09:19
  • On Linux, I've rather limited experience but I found a nice (and IMHO authoritative) introduction which covers the above said: [GCC Wiki Visibility](https://gcc.gnu.org/wiki/Visibility). That's IMHO the background of your error. However, I'm a bit wondering why you have this issue at all. Shouldn't that work out of the box? May be, you should ask the GENIE generator guys if there is something special to consider. – Scheff's Cat Oct 02 '18 at 09:23
  • OK, I downloaded the GENIE source file on their official Github site (https://github.com/GENIE-MC/Generator) rather than their web site. The installation did not report any error this time. If everything go well, then this issue can be closed. – 馮立誠 Oct 02 '18 at 11:26

0 Answers0