FairRoot
FairRoot copied to clipboard
Protobuf compiler version 3.20.1 doesn't match library version 3.12.4
Describe the bug
_I have installed FairSoft, and declare SIMPATH
Next step is to install FairRoot following the steps describe there : https://github.com/FairRootGroup/FairRoot/tree/dev I first have a warning while doing_ cmake -DCMAKE_INSTALL_PREFIX="~/fair_install/FairRoot/install" .. The warning is the following --- Found GNU compiler collection CMake Warning at /usr/share/cmake-3.22/Modules/FindProtobuf.cmake:524 (message): Protobuf compiler version 3.20.1 doesn't match library version 3.12.4 Call Stack (most recent call first): /home/audrey/fair_install/FairSoft/install/share/faircmakemodules/modules/FairFindPackage2.cmake:218 (find_package) CMakeLists.txt:155 (find_package2)
the command make -j16 is then failing, with a lot of errors, the first one being: In file included from /home/audrey/fair_install/FairRoot/build/examples/advanced/Tutorial3/FairTestDetectorPayload.pb.cc:4: /home/audrey/fair_install/FairRoot/build/examples/advanced/Tutorial3/FairTestDetectorPayload.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is 12 | #error This file was generated by a newer version of protoc which is | ^~~~~ /home/audrey/fair_install/FairRoot/build/examples/advanced/Tutorial3/FairTestDetectorPayload.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update 13 | #error incompatible with your Protocol Buffer headers. Please update | ^~~~~ /home/audrey/fair_install/FairRoot/build/examples/advanced/Tutorial3/FairTestDetectorPayload.pb.h:14:2: error: #error your headers. 14 | #error your headers. | ^~~~~
To Reproduce git clone -b dev https://github.com/FairRootGroup/FairRoot.git cd FairRoot mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX="~/fair_install/FairRoot/install" .. make -j16
System information (please complete the following information): Ubuntu 22.04
The command protoc --version, gives (base) audrey@ecrins:~/fair_install/FairRoot/build$ protoc --version libprotoc 3.20.1
See github markdown cheatsheet on how to format inline codes examples and logs.
What do the shell commands which protoc
and dpkg -S $(which protoc)
print?
(base) audrey@ecrins:/fair_install/FairRoot/build$ echo $SIMPATH /home/audrey/fair_install/FairSoft/install/ (base) audrey@ecrins:/fair_install/FairRoot/build$ protoc --version libprotoc 3.20.1 (base) audrey@ecrins:/fair_install/FairRoot/build$ which protoc /home/audrey/anaconda3/bin/protoc (base) audrey@ecrins:/fair_install/FairRoot/build$ dpkg -S /home/audrey/anaconda3/bin/protoc dpkg-query: no path found matching pattern /home/audrey/anaconda3/bin/protoc
(base) audrey@ecrins:~/anaconda3/bin$ ls -alh protoc -rwxrwxr-x 2 audrey audrey 28K mai 12 2022 protoc (base) audrey@ecrins:/usr/bin$ ls -alh protoc -rwxr-xr-x 1 root root 19K mars 17 2022 protoc
(base) audrey@ecrins:/usr/bin$ /usr/bin/protoc --version libprotoc 3.12.4 (base) audrey@ecrins:/usr/bin$ ~/anaconda3/bin/protoc --version libprotoc 3.20.1
To check, I created a symbolic link from ~/anaconda3/bin/protoc to /usr/bin/protoc and the result of make -j16 is OK
Basically, the output shows that your anaconda environment is interfering with the FairSoft/FairRoot installation. Please restart the FairSoft/FairRoot installation procedures in a shell environment that does not have your anaconda environment loaded/activated.
@audreychatillon,
was your problem solved with the proposed solution? If so please close the issue.