Error Building "makefile" : cant find some library


Looks like you ended up with a mess that once was a ROOT installation. I have a hunch why: you report using “ROOT 6.18/00” but /usr/opt/root/lib/ etc belong to v6.10. Did you mix libraries across ROOT versions somehow?



As far as I remember I did a clean installation of ROOT v 6.18.00.
I had installed another online/offline software which requires ROOT v6.18 and that installation was successful.

I am somehow having errors when i try to make this “Analysis Program”

I have a feeling that may be , it is looking for a older version of ROOT.

Please suggest.


Hello Again,

I am trying to install a older version of ROOT on my machine, just to have two different versions going on.

So I am now trying to install ROOT_v6.06.
I am doing a out of source build. I tried to do it make and/or cmake command-
But I always end up getting the same error-

In file included from /home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/include/llvm/IR/DataLayout.h:23,
from /home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/include/llvm/IR/IRBuilder.h:23,
from /home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/tools/clang/lib/CodeGen/CGBuilder.h:13,
from /home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/tools/clang/lib/CodeGen/CodeGenFunction.h:17,
from /home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/tools/clang/lib/CodeGen/CGVTables.cpp:14:
/home/mansi/Downloads/root-6.06.00/interpreter/llvm/src/include/llvm/ADT/DenseMap.h:428:27: note: synthesized method ‘llvm::ValueMapCallbackVH<const llvm::Value*, llvm::WeakVH, llvm::ValueMapConfig<const llvm::Value*, llvm::sys::SmartMutex > >& llvm::ValueMapCallbackVH<const llvm::Value*, llvm::WeakVH, llvm::ValueMapConfig<const llvm::Value*, llvm::sys::SmartMutex > >::operator=(llvm::ValueMapCallbackVH<const llvm::Value*, llvm::WeakVH, llvm::ValueMapConfig<const llvm::Value*, llvm::sys::SmartMutex > >&&)’ first required here
428 | TheBucket->getFirst() = std::move(Key);
gmake[2]: *** [interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/build.make:479: interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGVTables.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:10489: interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2
[mansi@localhost ROOT_v6.06]$

Is there a way out.

Please suggest

If you are on Fedora, I recommend using yum or dnf to install ROOT with dnf install root root-* or just install the parts you need. If you need an older version of ROOT for any particular reason, we’d like to know, so that we fix the newer version to let you always use the latest version of ROOT.

Hi Thanks Amadio

I have already installed the latest version of ROOT_V6.18 from the source code on my machine.
It was a clean installation.

I have a set of sorting code which I would like to compile on my machine. But, always I am getting a error. I was told to compile them using a older version of ROOT like 6.06.

The error which i get are as follows-
mansi@localhost RootAnalysis]$ make

g++ -O3 -I. -I/usr/opt/ddas/3.0/include -pthread -std=c++11 -m64 -I/home/mansi/build-6.18/include -c -o Correlator.o Correlator.cpp
g++ -O3 -I. -I/usr/opt/ddas/3.0/include -pthread -std=c++11 -m64 -I/home/mansi/build-6.18/include -c -o Variables-ddas.o Variables-ddas.cpp
g++ -O3 -I. -I/usr/opt/ddas/3.0/include -pthread -std=c++11 -m64 -I/home/mansi/build-6.18/include -c -o AnalyzeDDAS.o AnalyzeDDAS.cpp
rm -f ParametersddasDictionary.h
rootcint -f ParametersddasDictionary.cxx -c -p Parameters-ddas.h Parametersddas_linkdef.h
Warning: Unused class rule: bdecaySegaTotal
Warning: Unused class rule: bdecaySega
Warning: Unused class rule: bdecaySssdout
Warning: Unused class rule: bdecaySssd
Warning: Unused class rule: bdecayDssdout
g++ -fPIC -shared -m64 -O3 -I. -I/usr/opt/ddas/3.0/include -pthread -std=c++11 -m64 -I/home/mansi/build-6.18/include -I/home/mansi/root/include ParametersddasDictionary.cxx Parameters-ddas.cpp
Parameters-ddas.cpp: In member function ‘int bdecayTrace::ProcessTrace(int, int, int)’:
Parameters-ddas.cpp:215:1: warning: no return statement in function returning non-void [-Wreturn-type]
215 | }
| ^
g++ -O3 -o AnalyzeDDAS Correlator.o Variables-ddas.o AnalyzeDDAS.o -L/usr/lib64 -lpthread -lrt -lm -L/home/mansi/build-6.18/lib -lGui -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lROOTDataFrame -pthread -lm -ldl -rdynamic -L -I. -Wl,-rpath,/home/mansi/EXPT-NSCL/e17009/home/RootAnalysis -L/home/mansi/EXPT-NSCL/e17009/home/RootAnalysis -lParametersddas -Wl,-rpath,/usr/opt/ddas/3.0/lib -L/usr/opt/ddas/3.0/lib -lddaschannel
/usr/bin/ld: warning:, needed by /usr/opt/root/lib/, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_CTX_free@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_get_error@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_CTX_use_PrivateKey_file@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to EVP_sha1@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_read@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_set_quiet_shutdown@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSLv23_method@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_CTX_new@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_peek@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_new@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toHMAC@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_write@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_CTX_load_verify_locations@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_free@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_set_fd@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to SSL_connect@OPENSSL_1.0.0' /usr/bin/ld: /usr/opt/root/lib/ undefined reference toSSL_library_init@OPENSSL_1.0.0’
/usr/bin/ld: /usr/opt/root/lib/ undefined reference to `SSL_shutdown@OPENSSL_1.0.0’
collect2: error: ld returned 1 exit status
make: *** [Makefile:33: AnalyzeDDAS] Error 1
[mansi@localhost RootAnalysis]$

I would be happy to use some help on this topic.


This error is saying that the ROOT installed into /usr/opt/root links against openssl 1.0.0, and your system probably has openssl 1.1.x only. You will probably have to install openssl 1.0.x if you want to use that ROOT, but I recommend to just use ROOT packaged in Fedora to avoid such problems, or you can rebuild ROOT from source again so that it gets linked with the right version of openssl that you have on your system.


I actually did rebuild ROOT again from the source. But I end up having the same error.

So, If I would like to use the ROOT packaged in Fedora, then do I need to remove the ROOT v6.18 first from my computer and then install this using the dnf command.

If you built ROOT from source, then it’s probably linking against the builtin openssl. Try to set LD_LIBRARY_PATH to find the libraries from your installed ROOT and it should work. You can also try to build ROOT with -Drpath=ON to not need to set LD_LIBRARY_PATH. If you use the ROOT from Fedora, you can probably keep the one you have installed elsewhere. I’ve never had problems with having more than one installation. However, if you want to build ROOT yourself, you have to uninstall the one from Fedora, because it may cause your build to mix headers from the wrong version.

So , I have set the following environments in my bashrc file.
Should I change anything in this -

source /home/mansi/build-6.18/bin/

I’d remove any ROOT setup from bashrc and only do it when necessary. It usually causes problems.


I redid the ROOT installation on my machine.
I build it with -Drpath=ON

But, when I try to compile my analysis code- i end up having the same error as before.

My makefile looks as follows-

Establish the compilers


CXXFLAGS= -O3 -I. -I/usr/opt/ddas/3.0/include

LDFLAGS= -L/usr/lib64 -lpthread -lrt

ROOTCFLAGS := (shell root-config --cflags) ROOTGLIBS := (shell root-config --glibs)
ROOTLDFLAGS := $(shell root-config --ldflags)


LIBS = -lm (ROOTGLIBS) -L(LIB_DIR) -I. -Wl,-rpath,/home/mansi/EXPT-NSCL/e17009/home/RootAnalysis -L/home/mansi/EXPT-NSCL/e17009/home/RootAnalysis -lParametersddas -Wl,-rpath,/usr/opt/ddas/3.0/lib -L/usr/opt/ddas/3.0/lib -lddaschannel

O_FILES = Correlator.o Variables-ddas.o AnalyzeDDAS.o
O_FILES_F = Variables-ddas.o FilterDDAS.o

all: AnalyzeDDAS FilterDDAS



ParametersddasDictionary.cxx: Parameters-ddas.h Parametersddas_linkdef.h
rm -f ParametersddasDictionary.h
rootcint -f $@ -c -p Parameters-ddas.h Parametersddas_linkdef.h ParametersddasDictionary.cxx Parameters-ddas.cpp
(CXX) -fPIC -shared -o@ (ROOTLDFLAGS) (CXXFLAGS) -I$(ROOTSYS)/include $^

#%.o: %.cpp %.h

(CXX) -fPIC (CXXFLAGS) -c < -o @

makedepend $(CXXFLAGS) *.cpp *.c

rm -f .o AnalyzeDDAS ParametersddasDictionary


Your build is still mixing up different ROOT versions. See the command line, which contains -L/home/mansi/build-6.18/lib, vs the error message, which contains /usr/opt/root/lib/

How do I correct ?

I don’t know, somewhere in your configuration you must set environment variables that find ROOT 6.10, which you have to remove. Just look into LD_LIBRARY_PATH, PATH, etc, and remove paths pointing to /usr/opt/root. In your case, you should also check which root-config is being called from your Makefile.

If I try to find “root-config” This is what I get -

mansi@localhost ~]$ locate root-config












[mansi@localhost ~]$

Which one check now ?

locate finds all of them, you want which root-config. But you should also run printenv | sed -ne /root/p to print which variables contain “root” in them.

This seems to be pointing to the correct place

[mansi@localhost RootAnalysis]$ which root-config

[mansi@localhost RootAnalysis]$

[mansi@localhost RootAnalysis]$ printenv | sed -ne /root/p


And if i try to locate -

mansi@localhost lib]$ locate

mansi@localhost lib]$ locate

So, I am still not sure about correcting this ?

It’s hard to guess what’s wrong in your configuration, but it’s not ROOT at fault here. The best you can do is to follow my recommendation, just remove your custom installations of ROOT and install it with dnf install root root-* as I suggested in the beginning. Cheers,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.