Problems with Root 6.04/06 on Yosemite

Hi rooters,

After some time spent looking for solutions on the forums, I still didn’t succeed making root 6.04/06 work on my Macbook Pro.
Some remarks:

  • I run Yosemite 10.10.5
  • I have Xcode 7.1 installed, including command line tools
  • root installed from the “OsX 10.10 clang70” dmg file
  • I tried to compile with clang++ a really simple C++ code which includes , and it worked.

Any idea ?

Thanks for your help,
Cheers,
Julien

[lpnlp75] ~> root
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^
input_line_3:38:10: fatal error: 'string' file not found
#include <string>
         ^
   -------------------------------------------------------------------------
  | Welcome to ROOT 6.04/06                             http://root.cern.ch |
  |                                            (c) 1995-2014, The ROOT Team |
  | Built for macosx64                                                      |
  | From heads/v6-04-00-patches@v6-04-04-12-g9436735, Oct 13 2015, 12:34:29 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'              |
   -------------------------------------------------------------------------

input_line_8:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
root [0] TH1D *h = new TH1D("h2","h2",100,0,10)
IncrementalExecutor::executeFunction: symbol '_ZN5cling7runtime6gClingE' unresolved while linking function '_GLOBAL__sub_I_cling_module_6'!
You are probably missing the definition of cling::runtime::gCling
Maybe you need to load the corresponding shared library?

 *** Break *** segmentation violation
 Generating stack trace...

do you get the same if you do:

$ root -n

?

Yes.

it is just like some code is executed when you start ROOT … that’s why I asked.

Any clue on what could happen ?
Meanwhile, I checked that I don’t have any rootlogon file.
I wonder if the problem could come from my environment ?

LD_LIBRARY_PATH=/Applications/root_v6.04.06/lib:/usr/local/lib:/Developer/usr/lib
PATH=/Applications/root_v6.04.06/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/munki:/Library/TeX/texbin:/usr/local/bin:/Users/bolmont/bin:.:/Developer/usr/bin
ROOTSYS=/Applications/root_v6.04.06
DYLD_LIBRARY_PATH=/Applications/root_v6.04.06/lib:

and what you you get when you type:
$ which root

?

I get this:

/Applications/root_v6.04.06/bin/root

I asked help from your Cling expert. Vasil told me:

Can you try “.I” ?

Ok ! It starts to make sense !
Of course, “/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/” does not exist on my laptop…

How to change this ?

root [1] .I
-I
/Applications/root_v6.04.06/etc
-I
/Applications/root_v6.04.06/include
-I
1: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/interpreter/cling/include
-I
/Applications/root_v6.04.06/etc/cling
-I
.
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/include
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06/graf3d/g3d/inc
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06/gui/gui/inc
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06/io/io/inc
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06/core/base/../textinput/src
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/core/base/
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/core/rint/
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/core/thread/
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/io/io/
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/sources/root_v6.04.06/root-6.04.06/hist/hist/inc
-I
/Volumes/HD2/build/jenkins/workspace/root-release-6.04/BUILDTYPE/Release/COMPILER/native/LABEL/mac1010/build/root_v6.04.06-cmake/math/mathcore/
-resource-dir
/Applications/root_v6.04.06/etc/cling/lib/clang/3.7.0
-nostdinc++
-stdlib=libc++

Hi,
This looks like a bug. Could you please open a ticket of it?
Where and come from? IIUC /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1 got changed by your new xcode version.

There is no easy fix to this, since it happens at root startup (i.e. .I /some/new/include/folder will be too late). A temporary fix would be making a symbolic link (ln -s) of the location of to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1

Vassil

Ok, I will do that.

[quote]Where and come from? IIUC /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1 got changed by your new xcode version.
There is no easy fix to this, since it happens at root startup (i.e. .I /some/new/include/folder will be too late). A temporary fix would be making a symbolic link (ln -s) of the location of to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1
[/quote]

I don’t really understand your question. If I look into the directory “/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1”, I see the header files iostream, string, new, etc.

Hi,

Just a quick sanity check: you have Xcode and its command line tools installed, right? What does xcode-select --install say?

Cheers, Axel.

Here it is:

Cheers,
Julien

Hi,

Can I ask you for a very informative but slightly tedious bit of help? Can you do check out the sources of ROOT and build from source, using CMake https://root.cern.ch/building-root - do the resulting binaries work?

Cheers, Axel.

Ok, so I tried to compile from source, v6.04.06. I left default options for the configure script. After some time, make fails with these error messages:

llvm[1]: Installing include files
llvm[1]: Making install directory /Users/bolmont/Downloads/root-6.04.06/interpreter/llvm/inst/include/1:1:./llvm/ADT
install: 1:1:./llvm/ADT/APFloat.h: No such file or directory
llvm[1]: Making install directory /Users/bolmont/Downloads/root-6.04.06/interpreter/llvm/inst/include/2:2:./llvm/ADT
install: 2:2:./llvm/ADT/APInt.h: No such file or directory
llvm[1]: Making install directory /Users/bolmont/Downloads/root-6.04.06/interpreter/llvm/inst/include/3:3:./llvm/ADT
install: 3:3:./llvm/ADT/APSInt.h: No such file or directory
........
llvm[1]: Making install directory /Users/bolmont/Downloads/root-6.04.06/interpreter/llvm/inst/include/645:645:./llvm-c/Transforms
install: 645:645:./llvm-c/Transforms/Scalar.h: No such file or directory
llvm[1]: Making install directory /Users/bolmont/Downloads/root-6.04.06/interpreter/llvm/inst/include/646:646:./llvm-c/Transforms
install: 646:646:./llvm-c/Transforms/Vectorize.h: No such file or directory
make[1]: *** [install-local] Error 71
make: *** [interpreter/llvm/inst/lib/libclangSema.a] Error 2

Here is the full output of configure:

[lpnlp75] root-6.04.06> ./configure
Checking for source directory ... /Users/bolmont/Downloads/root-6.04.06
Configuring for macosx64
Checking for Fink/MacPorts directory ... 
Checking for GNU Make version >= 3.80 ... ok
Checking for C compiler ... clang
Checking for C++ compiler ... clang++
Checking for linker (LD) ... clang++
Checking for F77 compiler ... no F77 compiler gfortran found
Checking whether compiler can generate dependencies ... yes
Checking whether c++11 mode is supported ... yes
Checking whether libc++ is supported ... yes
Checking for string_view implementation ... <experimental/string_view>
Checking for Python version >= 2.7 ... yes
Checking whether to build native MacOS X Cocoa backend ... yes
Checking for Xcode OSX SDK ... no
Checking for system OSX SDK ... yes
Checking for freetype-config ... using builtin freetype
Checking whether to build included libfreetype6 ... yes
Checking for pcre-config ... not found
Checking whether to build included libpcre ... yes
Checking for zlib.h ... /usr/include
Checking for libz ... /usr/lib
Checking whether to build included zlib ... no
Checking for lzma.h ... no
Checking for liblzma ... /usr/lib
Checking whether to build included lzma ... yes
Checking for GL/gl.h, or gl.h ... /System/Library/Frameworks/OpenGL.framework/Headers
Checking for libGL, or libMesaGL ... /System/Library/Frameworks/OpenGL.framework/Libraries
Checking for libGLU, or libMesaGLU ... /System/Library/Frameworks/OpenGL.framework/Libraries
Checking for GL/glew.h ... no
Checking for libGLEW ... no
Checking whether to build included GLEW ... yes
Checking for pkg-config ... not found
Checking whether to build included libftgl ... yes
Checking for mysql_config ... not found
Checking for mysql.h ... no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no
Checking for occi.h ... no
Checking for libclntsh, or oci ... no
Checking for libocci, or oraocci10 ... no
Checking for libpq-fe.h ... no
Checking for libpq ... /usr/lib
Checking for sqlite3.h ... /usr/include
Checking for libsqlite3 ... /usr/lib
Checking for sql.h ... no
Checking for libsqlod ... no
Checking for sqlext.h ... no
Checking for libiodbc, libodbc, or odbc32 ... /usr/lib
Checking for rfio_api.h ... no
Checking for librfio, libdpm, libcastorrfio, libshift, shiftmd, or shift ... no
Checking for rfio_api.h ... no
Checking for stager_api.h ... no
Checking for libcastorrfio, libshift, shiftmd, or shift ... no
Checking for gfal_api.h ... no
Checking for libgfal ... no
Checking for gfal_srm_ifce_types.h ... no
Checking for ApMon.h ... no
Checking for libapmoncpp ... no
Checking for fftw3.h ... no
Checking for libfftw3, or libfftw3-3 ... no
Checking for fitsio.h ... no
Checking for libcfitsio, or cfitsio ... no
Checking for gvc.h ... no
Checking for libgvc, or gvc ... no
Checking for libgraph, graph, libcgraph, or cgraph ... no
Checking for libcdt, or cdt ... no
Checking for libpathplan, or pathplan ... no
Checking for libexpat, or expat ... /usr/lib
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout ... no
Checking for libPythia6 ... no
Checking for Pythia8/Pythia.h ... no
Checking for libpythia8 ... no
Checking for dcap.h ... no
Checking for libdcap ... no
Checking for davix.hpp ... no
Checking for libdavix ... no
Checking for chirp_reli.h ... no
Checking for libchirp_client ... no
Checking for hdfs.h ... no
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Checking for jni.h ... no
Checking for libhdfs ... no
Checking for libjvm ... no
Checking for libglite-api-wrapper ... no
Checking for gapiUI.h ... no
Checking for libgapiUI ... no
Checking whether to build included libAfterImage ... yes
Checking for ldap.h ... /usr/include
Checking for libldap ... /usr/lib
Checking for liblber ... /usr/lib
Checking for PyROOT prerequisites ... yes
Checking for Python.h ... /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python ... /System/Library/Frameworks/Python.framework/Versions/2.7/lib
Checking for xml2-config ... /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x ... ok
Checking for XrdVersion.hh ... no
Checking for libssl ... /usr/lib
Checking for libcrypto ... /usr/lib
Checking for openssl/bio.h ... /usr/include
Checking for openssl/blowfish.h ... /usr/include
Checking for openssl/err.h ... /usr/include
Checking for openssl/pem.h ... /usr/include
Checking for openssl/rand.h ... /usr/include
Checking for openssl/rsa.h ... /usr/include
Checking for t_server.h ... no
Checking for libsrp ... no
Checking for libgmp ... no
Checking for libmisc ... no
Checking for pwauth.h ... no
Checking for krb5.h ... /usr/include
Checking for krb5.h redirect ... /usr/include/krb5/krb5.h
Checking for krb5_c_valid_cksumtype in krb5.h ... yes
Checking for valid_cksumtype in krb5.h ... no
Checking for libk5crypto ... /usr/lib
Checking whether we're using MIT Kerberos ... yes
Checking for krb5_c_valid_cksumtype in /usr/lib/libk5crypto.dylib ... ok
Checking for valid_cksumtype in /usr/lib/libk5crypto.dylib ... ok
Checking for libkrb5 ... /usr/lib
Checking for kinit ... /usr/bin/kinit
Checking for libcom_err ... /usr/lib
Checking for shadow passwords ... no
Checking for gsl/gsl_version.h ... no
Checking for gsl-config ... not found
Checking whether to build libMathMore ... no
Checking whether to build libRInterface ... no
Checking whether to build libGenVector ... yes
Checking whether to build libRooFit ... no
Checking whether to build libMinuit2 ... no
Checking whether to build libUnuran ... no
Checking whether to build libVc ... no
Checking whether to install VDT ... yes
Checking whether to build libGdml ... no
Checking whether to build libTable ... no
Checking whether to build libTMVA ... yes
Checking whether to build libRHTTP ... no
Checking whether to build libMemStat ... yes
Checking whether to build afdsmgrd ... no
Creating include ... done
Creating bin ... done
Creating lib ... done
Writing config/Makefile.config ... done
Writing config/Makefile.comp ... done
Writing include/RConfigure.h ... done
Writing include/RConfigOptions.h ... done
Writing bin/root-config ... done
Writing etc/system.rootrc ... done
Writing etc/system.rootauthrc ... done
Writing etc/system.rootdaemonrc ... done
Writing etc/root.mimes ... done
Writing etc/daemons/rootd.rc.d ... done
Writing etc/daemons/rootd.xinetd ... done
Writing etc/daemons/proofd.rc.d ... done
Writing etc/daemons/proofd.xinetd ... done
Writing main/src/proofserv.sh ... done
Writing main/src/roots.sh ... done
Writing bin/memprobe ... done
Writing build/misc/root-help.el ... done
Writing macros/html.C ... done
Writing bin/thisroot.sh ... done
Writing bin/thisroot.csh ... done
Writing bin/setxrd.sh ... done
Writing bin/setxrd.csh ... done
Writing config.status ... done

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, builtin_llvm, libcxx, cocoa, explicitlink, fink, genvector, krb5, ldap, memstat, opengl, python, rpath, shared, sqlite, ssl, tmva, vdt, xml.

To build ROOT type:

   make 

Hi,

I’m at currently at LPNHE. Can I have a look, can we meet tomorrow morning? I’m in salle Charpak, say at 10am?

Cheers, Axel.

Hi,

I won’t be available tomorrow morning (teaching)… Only the afternoon.
Is it ok for you ?

Hi,

No, I’ll be gone after lunch. Tant pis. We go on here… I’ll come back to you later, I need to think what could trigger this.

Is “install: 1:1:./llvm/ADT/APFloat.h: No such file or directory” the first error message you see? That “1:1:” is really really weird…

Cheers, Axel.

Here is the output if I execute make a second time (with no cleaning).

make_output.txt (91.4 KB)

Hi,

Okay something fundamentally weird is happening with your build. Already the first line is wrong: “/bin/sh: 34m3.7.0: command not found”.

What’s the output of “make VERBOSE=1”? Can you send CMakeCache.txt?

Cheers, Axel.