Load Error: Failed to load Dynamic link library root

Dear Experts,
I am trying to check the roofit package is install or not but facing the missing library error.
I am using Root 5.34/36 in my macOS High Sierra(Version 10.13).
One example is here.

Chandi:~ chandiprasadkar$ root -l
root [0] gSystem->Load("libRooFit") ;
dlopen error: dlopen(/Users/chandiprasadkar/root/lib/libThread.so, 9): can't resolve symbol __DefaultRuneLocale in /Users/chandiprasadkar/root/lib/libThread.so because dependent dylib #1 could not be loaded in /Users/chandiprasadkar/root/lib/libThread.so
Load Error: Failed to load Dynamic link library /Users/chandiprasadkar/root/lib/libThread.so
root [1] 

Could please point out what is the problem?

Regards
Chandi

Hi Chandi,

do you have the same error using ROOT 6.10?

Cheers,
D

Hi ,
When I install root 6.10.04 in my mac it is giving compilation error after “make”[1].

thanks ,
Chandi

[1]In file included from include/TString.h:28:
include/RStringView.h:35:12: error: unknown type name 'basic_string_view’
typedef basic_string_view string_view;
^
include/RStringView.h:35:29: error: expected unqualified-id
typedef basic_string_view string_view;
^
include/RStringView.h:36:12: error: unknown type name 'basic_string_view’
typedef basic_string_view<char16_t> u16string_view;
^
include/RStringView.h:36:29: error: expected unqualified-id
typedef basic_string_view<char16_t> u16string_view;
^
include/RStringView.h:37:12: error: unknown type name 'basic_string_view’
typedef basic_string_view<char32_t> u32string_view;
^
include/RStringView.h:37:29: error: expected unqualified-id
typedef basic_string_view<char32_t> u32string_view;
^
include/RStringView.h:38:12: error: unknown type name 'basic_string_view’
typedef basic_string_view<wchar_t> wstring_view;
^
include/RStringView.h:38:29: error: expected unqualified-id
typedef basic_string_view<wchar_t> wstring_view;
^
8 errors generated.
make: *** [core/base/src/Stringio.o] Error 1
Chandi:root-6.10.04 chandiprasadkar$

Hi,

what are the steps you performed? Did you install xcode?

Cheers,
D

Hi,
Thanks for your response.
I followed these steps:

  1. install prerequisites form https://root.cern.ch/build-prerequisites
    2.download the source package from https://root.cern.ch/content/release-61004
    unzip by command, tar -xvzf
    3.go to root directory and type the command
    cd root
    ./configure --enable-roofit
    make

Yes, I have the xcode[1].

Thanks
Chandi

[1]Chandi:~ chandiprasadkar$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Chandi:~ chandiprasadkar$ xcode-select -p
/Library/Developer/CommandLineTools
Chandi:~ chandiprasadkar$

Hi Chandi,

I now see. This is a known problem with XCode9. This will be resolved with the forthcoming release of 6.10 (it’s right now fixed in master and in the 6.10 patches branch).

Apologies for the inconvenience.

Cheers,
Danilo

Hi Danilo,

Thanks. For the time now, Is there any other way to compile root in mac? It is necessary for me.

Reagrds
Chandi

Hi Chandi,

if this is urgent (needed now), you can take the master version.

Cheers,
D

Hi Danilo,

Which root master version I should use?

Do you mean v6.10.06?

FYI, The command should be followed,
git clone http://root.cern.ch/git/root.git
cd root
$ git tag -l
$ git checkout -b v6-10-06 v6-10-06

Thanks
Chandi

Hi Chandi,

just

git clone http://root.cern.ch/git/root.git
cd root

A development release is coming soon. This will work today.

Cheers,
D

Hi Danilo,

After doing what you said, I compile with the following command,
cd root
./configure --enable-roofit
make

After few minute of running, it is giving error,

"*** Configuring LLVM in interpreter/llvm/obj/ …
/bin/sh: cmake: command not found
make: *** [interpreter/llvm/obj/CMakeCache.txt] Error 127
Chandi:root chandiprasadkar$ "

Thanks
Chandi

Hi,

configure/make is deprecated (as the message prompted by the script says). You should try again with CMake.

Cheers,
D

Hi Danilo,

Could you please tell me what are the commands I have to write with CMake to install root from git?

Thanks
Chandi

Hi,

  1. Create a build directory, “mydir”

  2. cd mydir

3.cmake path/to/root/sources/root

  1. make -j 8

Cheers,

  D

Hi,
The procedure I followed is,
1.git clone http://root.cern.ch/git/root.git
2.mkdir mydir
3. cd mydir
4.cmake …/root

After doing make -j 8, it is giving an error at some point[1].

Thanks
Chandi

[1].
[ 69%] Built target clangCodeGen
[ 69%] Building CXX object interpreter/llvm/src/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/PartiallyInlineLibCalls.cpp.o
[ 69%] Building CXX object core/dictgen/CMakeFiles/Dictgen.dir/src/DictSelectionReader.cxx.o
[ 69%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingBaseClassInfo.cxx.o
[ 69%] Building CXX object interpreter/llvm/src/lib/Analysis/CMakeFiles/LLVMAnalysis.dir/DomPrinter.cpp.o
[ 69%] Building CXX object interpreter/llvm/src/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/PlaceSafepoints.cpp.o
[ 69%] Building CXX object interpreter/llvm/src/lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86FixupLEAs.cpp.o
/Users/chandiprasadkar/root/core/metacling/src/TCling.cxx:1161:29: error: ambiguous conversion for functional-style cast from
’const TString’ to ‘std::string’ (aka ‘basic_string<char, char_traits, allocator >’)
std::string vfsPath = std::string(TROOT::GetIncludeDir()) + “/modulemap.overlay.yaml”;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:778:31: note: candidate constructor
_LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:799:5: note: candidate constructor
basic_string(__self_view __sv);
^
[ 69%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/PHIEliminationUtils.cpp.o
[ 69%] Building CXX object interpreter/llvm/src/lib/Analysis/CMakeFiles/LLVMAnalysis.dir/DominanceFrontier.cpp.o
[ 69%] Building CXX object interpreter/llvm/src/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/Reassociate.cpp.o
1 error generated.
make[2]: *** [core/metacling/src/CMakeFiles/MetaCling.dir/TCling.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs…
[ 69%] Building CXX object core/dictgen/CMakeFiles/Dictgen.dir/src/LinkdefReader.cxx.o
[ 69%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/PostRAHazardRecognizer.cpp.o
make[1]: *** [core/metacling/src/CMakeFiles/MetaCling.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 72%] Built target LLVMAnalysis
[ 72%] Linking CXX static library …/libLLVMCodeGen.a
[ 72%] Built target LLVMCodeGen
make: *** [all] Error 2

Hi,

we just released v6.11/02. I thought you might have been interested.
https://root-forum.cern.ch/t/development-release-v6-11-02

Cheers,
D

Hi Danilo,
Thanks for your help. But The error which I was previously mentioning still there, when I do make -j 8.

Thanks
Chandi


’const TString’ to ‘std::string’ (aka ‘basic_string<char, char_traits, allocator >’)
std::string vfsPath = std::string(TROOT::GetIncludeDir()) + “/modulemap.overlay.yaml”;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:778:31: note: candidate constructor
_LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:799:5: note: candidate constructor
basic_string(__self_view __sv);
^

Hi Chandi,

apologies for this taking so long.
This should now be fixed in master. Propose to pick this commit as reference: 7e68e2 .

Cheers,
Danilo

1 Like

Hi Danilo,

Many many thanks for the latest commit. It worked. Could please tell me how to enable roofit when using cmake?

Regards
Chandi

Hi Chandi,

great.
Just change your cmake command to “cmake -Droofit=ON”. This will activate roofit and roostats.

Cheers,
D

1 Like