Installing root v6 on MACOS Sierra : problem with libtool?

I’m having trouble compiling ROOT v6 (v6-08-06) on my macos Sierra (10.12.4) build.

Tried:

cmake ../root-v6 -Droofit=ON -Dpython=ON -Dmacos_native=ON

and

cmake ../root-v6 -Droofit=ON -Dpython=ON

Then I do the compilation with:

cmake --build .

But I keep getting this error with my libtool:

[ 19%] Building CXX object interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGLexer.cpp.o
[ 19%] Building CXX object interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o
[ 19%] Linking CXX static library ../libLLVMTableGen.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make[2]: *** [interpreter/llvm/src/lib/libLLVMTableGen.a] Error 1
make[1]: *** [interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2

The versions of my compilation are :

gimli:%  g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
gimli:% libtool --version
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gimli:% cmake --version
cmake version 3.8.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Hi,

Could you post the output of which libtool?

Axel

Sorry for the delay (holiday weekend). Here it is:

gimli:% which libtool
/usr/local/bin/libtool

gimli:% libtool --version
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Continuing with debugging, I have also seen this error in the configuration output:

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
  Referenced from: /usr/local/bin/bash
  Reason: image not found

So I fixed this by upgrading readline and bash:

brew install --force readline
brew link --force readline
brew upgrade bash

That did not work. Then I tried also:

setenv MACOSX_DEPLOYMENT_TARGET 10.12

Still no luck.

Any ideas? I am running out of them :wink:

I would try using the stock apple libtool (/usr/bin/libtool) rather than the one packaged with homebrew.

Thanks a lot! Is there a way to specify this on the ROOT build commands or do I just have to switch the order of /usr/bin and /usr/local bin in the path?

You can use ccmake or the following:

cmake /path/to/root/source -DCMAKE_LIBTOOL=/usr/bin/libtool
1 Like

That worked, thanks a lot for the help!

There are now problems with PYROOT, unfortunately:

gimli:% which python
/opt/local/bin/python
gimli:% python --version
Python 2.7.12
gimli:% echo $PYTHONPATH
/Users/rappoccio/software_installs/root-v6-install/lib

What are the problems?

It’s getting a segfault. I am trying to re-compile to make sure it is picking up the right libtools.

OK, after a completely clean rebuild (including removing existing directories), this finally worked. Thanks a lot for the help!

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