Failing to build ROOT

Hi all.

This question is probably naive but I haven’t found the answer after extensive google-ing in this forum.
I want to build the latest stable version of ROOT6 on my macOS Sierra. I have homebrew installed and from there I installed mysql and cmake. However, cmake --build fails at 98%, apparently having some issues with my mysql setup,

Scanning dependencies of target RMySQL
[ 98%] Building CXX object sql/mysql/CMakeFiles/RMySQL.dir/G__MySQL.cxx.o
[ 98%] Building CXX object sql/mysql/CMakeFiles/RMySQL.dir/src/TMySQLResult.cxx.o
[ 98%] Building CXX object sql/mysql/CMakeFiles/RMySQL.dir/src/TMySQLRow.cxx.o
[ 98%] Building CXX object sql/mysql/CMakeFiles/RMySQL.dir/src/TMySQLServer.cxx.o
[ 98%] Building CXX object sql/mysql/CMakeFiles/RMySQL.dir/src/TMySQLStatement.cxx.o
[ 98%] Linking CXX shared library ../../lib/libRMySQL.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libRMySQL.so] Error 1
make[1]: *** [sql/mysql/CMakeFiles/RMySQL.dir/all] Error 2
make: *** [all] Error 2

I went through the prerequirements page for ROOT but something still seems to be missing, can you help me out?

Thanks!
heico

Dear heico,

Looks like you are missing the SSL library, could you try to install libssl on your system?

Best regards,

Enric

Dear etejedor.

Thanks a lot for your reply!
I followed the instructions from this thread, http://stackoverflow.com/questions/38670295/homebrew-refusing-to-link-openssl, but I still get the same error - maybe I didn’t do it right?

Regards,
heico

Dear heico,

I would check a couple of thinks:

  • Is Openssl correctly installed in your system? What happens if you type, from a terminal:

openssl

does it open the openssl shell?

And what happens if you type:

otool -L /usr/bin/openssl

you should see something like (note that libssl is there):

/usr/bin/openssl:
    /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
  • Did you try to build ROOT from scratch after you installed Openssl? I would try to do Cmake again and perform the entire rebuild.

Enric

YEAH! It worked. Building from scratch solved it.
Thanks so much for your help!
heico

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