# Cannot complie ROOT on ubuntu 18.04

**URL:** <https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521>\
**Category:** ROOT\
**Created:** [November 9, 2018, 5:12pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521 "2018-11-09T17:12:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhanashree\_Mehar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dhanashree\_Mehar](https://root-forum.cern.ch/u/Dhanashree_Mehar)\
**Post date:** [November 9, 2018, 5:12pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/1 "2018-11-09T17:12:12Z")

</div>

* * *

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.

```auto
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

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [November 9, 2018, 5:34pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/2 "2018-11-09T17:34:34Z")

</div>

Hi,  
if you don’t have any special requirement, maybe you can grab a [precompiled ROOT](https://root.cern/downloading-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

---

<div class="post-metadata">

**Author:** ![Henri\_Girard](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/a3d4f5/32.png) [@Henri\_Girard](https://root-forum.cern.ch/u/Henri_Girard)\
**Post date:** [November 10, 2018, 3:57pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/3 "2018-11-10T15:57:53Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![Henri\_Girard](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/a3d4f5/32.png) [@Henri\_Girard](https://root-forum.cern.ch/u/Henri_Girard)\
**Post date:** [November 10, 2018, 4:00pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/4 "2018-11-10T16:00:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Henri\_Girard](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/a3d4f5/32.png) [@Henri\_Girard](https://root-forum.cern.ch/u/Henri_Girard)\
**Post date:** [November 10, 2018, 4:02pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/5 "2018-11-10T16:02:47Z")

</div>

Sorry again

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

---

<div class="post-metadata">

**Author:** ![Dhanashree\_Mehar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dhanashree\_Mehar](https://root-forum.cern.ch/u/Dhanashree_Mehar)\
**Post date:** [November 11, 2018, 1:59pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/6 "2018-11-11T13:59:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Henri\_Girard](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/a3d4f5/32.png) [@Henri\_Girard](https://root-forum.cern.ch/u/Henri_Girard)\
**Post date:** [November 11, 2018, 7:11pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/7 "2018-11-11T19:11:54Z")

</div>

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

I follow this :

first `install all dependencies`

```
  ``

```

```auto
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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Henri\_Girard](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/a3d4f5/32.png) [@Henri\_Girard](https://root-forum.cern.ch/u/Henri_Girard)\
**Post date:** [November 11, 2018, 7:21pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/8 "2018-11-11T19:21:40Z")

</div>

> [Dhanashree\_Mehar] Dhanashree\_Mehar  
> [http://root-forum.cern.ch/u/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)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 25, 2018, 7:21pm UTC](https://root-forum.cern.ch/t/cannot-complie-root-on-ubuntu-18-04/31521/9 "2018-11-25T19:21:42Z")

</div>

Closed on November 25, 2018, 7:21pm UTC

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