I am using the ROOT trunk on my Mac OS X system.
I want to use the mathmore libraries on Root built with CMake.
Previously I used specify the directory which contains the GSL headers and libraries explicitly in the inputs of the configure scripts.
When I compile ROOT using the CMake build system, the mathmore libraries are not enabled. Could you tell me how to fix this
Did you check the “config.log” file in your installation directory? Search for the string “mathmore” there.
Anyway: while configuring you should have some optional arguments, like
./configure --enable-mathmore --enable-gsl-shared --with-gsl-incdir="$GSL_INCDIR" --with-gsl-libdir="$GSL_LIBDIR"
Some might be enabled by default, but you never know. Make sure “$GSL_INCDIR” and “$GSL_LIBDIR” are defined correctly.
I am I still supposed to run configure if I am running the CMake build?
The output of the CMake build checks for the compilers etc… what happens when I run the configure script.
How does the file “config.log” look like? Whether you run configure stand-alone, or it is run within CMake, it should produce a “config.log” file anyway. Post in this thread the few lines around the string “mathmore”.
If I run cmake, no config.log is created in either the build or the source directory.
Here is the output of cmake –
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The Fortran compiler identification is GNU
-- Check for working Fortran compiler: /usr/local/bin/gfortran
-- Check for working Fortran compiler: /usr/local/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes
-- Found GCC. Major version 4, minor version 2
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found a Mac OS X System 10.6
-- Found a 64bit system
-- Found GNU compiler collection
-- Build Type: RelWithDebInfo
-- Compiler Flags: -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common
-- Setting default installation prefix CMAKE_INSTALL_PREFIX to /opt/alice/root/trunk
-- Looking for ZLib
-- Found ZLIB: /usr/include (found version "1.2.3")
-- Looking for Freetype
-- Found Freetype: /sw/lib/libfreetype.dylib
-- Looking for X11
-- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib
-- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - not found
-- Found X11: /opt/local/lib/libX11.dylib
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib
-- X11_Xpm_INCLUDE_PATH: /usr/include
-- X11_Xpm_LIB: /usr/X11R6/lib/libXpm.dylib
-- X11_Xft_INCLUDE_PATH: /usr/include
-- X11_Xft_LIB: /sw/lib/libXft.dylib
-- X11_Xext_LIB: /opt/local/lib/libXext.dylib
-- Found GIF: /sw/lib/libgif.dylib
-- Found TIFF: /sw/lib/libtiff.dylib
-- Found PNG: /sw/lib/libpng.dylib
-- Found JPEG: /sw/lib/libjpeg.dylib
-- Looking for Python
-- Found PythonLibs: /opt/local/lib/libpython2.7.dylib
-- Found PythonInterp: /opt/local/bin/python2.7
-- Looking for GCCXML
-- Looking for OpenGL
-- Looking for Bonjour
-- Checking whether Bonjour/Avahi is supported
-- Looking for Kerberos 5
-- Looking for LibXml2
-- Found LibXml2: /opt/local/lib/libxml2.dylib
-- Looking for OpenSSL
-- Found OpenSSL: /usr/lib/libssl.dylib;/usr/lib/libcrypto.dylib
-- Looking for Castor
-- Found Castor version
-- Castor not found. Switching off castor option
-- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_glew builtin_pcre chirp cintex exceptions genvector krb5 ldap memstat odbc opengl python reflex rpath shared ssl tmva xml x11
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/alice/root/build
The closest file to the config.log is the ROOTCOnfig.cmake----
#---Options enabled for the build of ROOT-----------------------------------------------
I see you have mathmore set as OFF. You need probably to add
and also be sure that the gsl-config is in your path.
Thanks a lot that worked.
Along with the -D flag I just had to set the GSL_DIR environment variable
As Lorenzo has mentioned -Dmathmore=ON will tell CMake to build Mathmore (I am going to change the default to be ON from now on) Then CMake has to locate the GSL library that is required for Mathmore. For this it tries to look for the program ‘gsl-config’ in the PATH or standard places, or use the GSL_DIR environment. Alternatively the user can specify the location of gsl-config explicitly in the command line. Like this:
or use the ccmake utility to inspect the CMake cache.
Does the cmake build of the trunk always work?
I have two computers - a SLC5 desktop and a Snow Leopard laptop.
The trunk compiles with CMake on the desktop and not on the laptop. Also, there are times when the trunk doesnt compile in both places with CMake but using the old make system it compiles.
Am I to take it that this is still under development for even the default configuration of root.
I cannot claim that the build always works for all platforms and configurations. What can be said is that it SHOULD work. It would be nice that cases that does not work are reported. Often the problem is that the scripts to detect the installed external libraries are not robust enough to handle all different configurations.