FairRootGroup / FairRoot

C++ simulation, reconstruction and analysis framework for particle physics experiments
http://fairroot.gsi.de
Other
57 stars 96 forks source link

Problem with compiling FairRoot #1022

Closed carlu closed 3 years ago

carlu commented 3 years ago

Describe the bug Hi. I have followed the instructions on the FairRoot Github page to compile first FairSoft then FairRoot. The various FairSoft components compile successfully but I am getting an error with FairRoot from the linker due to the "Position independent code" flag not being set for one of the libraries.

I've been stuck on this awhile, any help appreciated :-)

Here is the end of the output from the terminal:

[ 31%] Linking CXX shared library ../../lib/libMCConfigurator.so
/usr/bin/ld: /home/npg/Packages/fair_install/FairSoftInst/lib/libyaml-cpp.a(convert.cpp.o)
: relocation R_X86_64_PC32 against symbol `_ZTIN4YAML11InvalidNodeE' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [fairtools/MCConfigurator/CMakeFiles/MCConfigurator.dir/build.make:170: lib/l
ibMCConfigurator.so.18.4.1] Error 1
make[1]: *** [CMakeFiles/Makefile2:2134: fairtools/MCConfigurator/CMakeFiles/MCConfigurato
r.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

To Reproduce Steps to reproduce the behavior:

  1. Describe environment

Ubuntu 20.04 but I have also tried with Fedora 33. Running within a VirtualBox VM on an x86_64 machine.

  1. Describe compile options used

For FairSoft: GCC, no debug symbols, install everything, no python bindings. For FairRoot: no options selected, just compile as per instructions on GitHub.

  1. Give commands you invoked

Expected behavior FairRoot would compile. It does not, see errors above.

Logs / Screenshots If applicable, add logs or screenshots to help explain your problem.

System information (please complete the following information):

Additional context Add any other context about the problem here.

See github markdown cheatsheet on how to format inline codes examples and logs.

dennisklein commented 3 years ago

Environment: Latest fairSoft/Root from Github.

Which FairSoft revision are you building exactly? (Change directory to your FairSoft git clone and run git describe)

carlu commented 3 years ago

Thanks for the quick response.

"git describe" in fair_install/FairSoft/ returns: jun19p1-499-g3fd2184

dennisklein commented 3 years ago

This should be fixed in FairRootGroup/FairSoft@7778fcb23bd525be18cfd274fec47a57f9a8841b (latest dev branch of FairSoft). Let me know if this works for you.

carlu commented 3 years ago

Thank you @dennisklein I can now compile FairSoft and FairRoot.

When I run "make test" it fails 2/55 tests with "Required regular expression not found". I'm not yet sure if this will be a problem but if so I will open another issue.

Another thing I noticed. FairSoft compilation failed on Pythia6 because it was looking for libPythia6.so instead of libpythia6.so. I fixed this by changing the value of "checkfile" in FairSoft/legacy/scripts/install_pythia6.sh.

Failed tests were ex_MQ_pixel_simulation and pixelSplitDDS.

I didn't open an issue since the fix was easy but thought I'd mention here in case you weren't aware.

Thanks again.

dennisklein commented 3 years ago

When I run "make test" it fails 2/55 tests with "Required regular expression not found". I'm not yet sure if this will be a problem but if so I will open another issue.

Any information/feedback will help (even if it turns out to be a non-issue), so you are welcome to create an issue! Also note, that some of our tests are unstable, that means, they only fail every once in a while. But they are still worth an issue and we want to improve on them! That said, if the test fails consistently for you, then it is even more serious and we would definitely want you to create an issue. Thx!

Another thing I noticed. FairSoft compilation failed on Pythia6 because it was looking for libPythia6.so instead of libpythia6.so. I fixed this by changing the value of "checkfile" in FairSoft/legacy/scripts/install_pythia6.sh.

This sounds familiar, I will have another look at it.

dennisklein commented 3 years ago

Failed tests were ex_MQ_pixel_simulation and pixelSplitDDS

These failures may have been covered by #977, #985, and #1019 which are all concerned about making these tests more stable.

Just for the context: Some of the stability improvements are actually implemented in DDS, which is a separate project from FairRoot. The version that is built currently in FairSoft does not pick up those improvements. Please note, there will be a new FairSoft release this November, probably next week, which will update many of the package versions in FairSoft, including DDS.

dennisklein commented 3 years ago

Another thing I noticed. FairSoft compilation failed on Pythia6 because it was looking for libPythia6.so instead of libpythia6.so. I fixed this by changing the value of "checkfile" in FairSoft/legacy/scripts/install_pythia6.sh.

This sounds familiar, I will have another look at it.

This should be fixed in FairRootGroup/FairSoft@fc4e5f0.

Closing. Let's discuss the failing tests in a separate issue, if needed.