Cannot complie ROOT on ubuntu 18.04


ROOT Version:6.08.6
platform:
ubuntu 18.04
Compiler: Not Provided


hi, Im trying to install ROOT and the cofiguration is going fine but after “make” I’m getting the following errors.

ln -f bin/rootcling bin/genreflex
g++ -shared -Wl,-soname,libFITSIO.so -m64 -O2 -DNDEBUG -Wl,--no-undefined -Wl,--as-needed -o lib/libFITSIO.so graf2d/fitsio/src/TFITS.o graf2d/fitsio/src/G__FITSIO.o -Llib -lCore -ldl -Llib -lHist -lGpad -lGraf -lMatrix /usr/lib/x86_64-linux-gnu/libcfitsio.a -lpthread -lz
/usr/lib/x86_64-linux-gnu/libcfitsio.a(cfileio.o): In function `ffihtps':
(.text+0xbe9a): undefined reference to `curl_global_init'
/usr/lib/x86_64-linux-gnu/libcfitsio.a(cfileio.o): In function `ffchtps':
(.text+0xbeb5): undefined reference to `curl_global_cleanup'
/usr/lib/x86_64-linux-gnu/libcfitsio.a(drvrmem.o): In function `bzip2uncompress2mem':
(.text+0x1262): undefined reference to `BZ2_bzReadOpen'
(.text+0x1289): undefined reference to `BZ2_bzRead'
(.text+0x12c0): undefined reference to `BZ2_bzReadClose'
(.text+0x131e): undefined reference to `BZ2_bzReadClose'
(.text+0x1397): undefined reference to `BZ2_bzReadClose'
(.text+0x13f7): undefined reference to `BZ2_bzReadClose'
/usr/lib/x86_64-linux-gnu/libcfitsio.a(drvrnet.o): In function `https_open_network':
(.text+0x761): undefined reference to `curl_easy_init'
(.text+0x778): undefined reference to `curl_easy_setopt'
(.text+0x7a1): undefined reference to `curl_easy_setopt'
(.text+0x7b7): undefined reference to `curl_easy_setopt'
(.text+0x7cd): undefined reference to `curl_easy_setopt'
(.text+0x810): undefined reference to `curl_easy_setopt'
/usr/lib/x86_64-linux-gnu/libcfitsio.a(drvrnet.o):(.text+0x833): more undefined references to `curl_easy_setopt' follow
/usr/lib/x86_64-linux-gnu/libcfitsio.a(drvrnet.o): In function `https_open_network':
(.text+0x8df): undefined reference to `curl_easy_perform'
(.text+0x905): undefined reference to `curl_easy_cleanup'
(.text+0x93c): undefined reference to `curl_easy_setopt'
(.text+0x94d): undefined reference to `curl_easy_setopt'
(.text+0x955): undefined reference to `curl_easy_perform'
(.text+0x9b5): undefined reference to `curl_easy_setopt'
(.text+0x9bd): undefined reference to `curl_easy_perform'
(.text+0xa63): undefined reference to `curl_easy_cleanup'
(.text+0xb07): undefined reference to `curl_easy_setopt'
(.text+0xb0f): undefined reference to `curl_easy_perform'
collect2: error: ld returned 1 exit status
/home/username/Downloads/root-6.08.06/graf2d/fitsio/Module.mk:45: recipe for target 'lib/libFITSIO.so' failed
make: *** [lib/libFITSIO.so] Error 1

Hi,
if you don’t have any special requirement, maybe you can grab a precompiled ROOT rather than compile it yourself: we have binary releases for ubuntu 18, that you just need to untar (and then you need to source $ROOTSYS/bin/thisroot.sh to add ROOT to your environment).

If you want to compile ROOT yourself you should use a newer version than 6.08 (6.08 is more than 5 years old and Ubuntu 18 is from this year, there might be mismatches in package versions).
The latest release is v6.14.04, but 6.16 is coming very soon.

Also, make sure to use cmake rather than ./configure; make, the latter build method has been deprecated after moving to C++ de-facto standard cmake build system.

Cheers,
Enrico

1 Like

I just compiled git and after installing all dependencies it works fine. For a long time I wanted to use it with python (jupyter notebook) and it works fine. But most of old examples don’t run, but recent one do. It’s version 6.15/01 I am really happy I awaited such a long time !

1 Like

I forget I did the same way as other softs

cd root
cmake … -DCMAKE_INSTALL_PREFIX=/usr
make -j9 (8 cores)
sudo make install

ubuntu 18.04

Sorry again

cd root
mkdir build (but it’s already made)
cd build
cmake … (only two points)

I tried installing ROOT-6.14.08 nd tried using the cmake

cmake …/root-6.14.08/

make -j2

Its showing this error

…/…/interpreter/llvm/src/lib/libLLVMPasses.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
…/…/…/interpreter/llvm/src/lib/libLLVMPasses.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
core/metacling/src/CMakeFiles/Cling.dir/build.make:207: recipe for target ‘lib/libCling.so’ failed
make[2]: *** [lib/libCling.so] Error 1
core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/build.make:221: recipe for target ‘core/rootcling_stage1/src/rootcling_stage1’ failed
make[2]: *** [core/rootcling_stage1/src/rootcling_stage1] Error 1
CMakeFiles/Makefile2:16171: recipe for target ‘core/metacling/src/CMakeFiles/Cling.dir/all’ failed
make[1]: *** [core/metacling/src/CMakeFiles/Cling.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
CMakeFiles/Makefile2:17579: recipe for target ‘core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all’ failed
make[1]: *** [core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Can you please help me resolve thiss issue?

and can you please refer a step by step procedure for installing precomplied root?

Thanking you

I can’t help about the errors … I just can tell you how I compiled,good luck :slight_smile:

I follow this :

first install all dependencies

  ``
https://root.cern/build-prerequisites

sudo apt-get install git dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev
sudo apt-get install gfortran libssl-dev libpcre3-dev xlibmesa-glu-dev libglew1.5-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev \ libldap2-dev python-dev libxml2-dev libkrb5-dev \ libgsl0-dev libqt4-dev

and get the git

git clone https:
//github.com/root-project/root.git cd root mkdir build (it's already done) cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr (so that it's in your path and installed like ubuntu softs /usr) Everything should be ok ! then make with the number of cores (I got a 8 cores AMD then make -j9) make -j2 (or what you have) you should reach 100% success (except if you have a lot of exotic softs ?) then installation sudo make install (idem 100%) then try root (it should appears )

sudo apt-get install git dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev
sudo apt-get install gfortran libssl-dev libpcre3-dev xlibmesa-glu-dev libglew1.5-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev \ libldap2-dev python-dev libxml2-dev libkrb5-dev \ libgsl0-dev libqt4-dev

[Dhanashree_Mehar] Dhanashree_Mehar
http://root-forum.cern.ch/u/dhanashree_mehar
November 11

I tried installing ROOT-6.14.08 nd tried using the cmake

I don’t use precompiled binary, sorry I can help you with this.

But I do it for other softs

Get your precompiled binay ubuntu 18.04 then uncompressed it in your
home then you should have a root dir ?

cd root

I do a link to have it started

sudo ln -s /root executable path /root /usr/bin/root

then you should be able to run it from your home

root --notebook (you can make a start icon)

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