Skip navigation

As the matter of the this topic stole me some of my “very” precious time I will give you the solution to this rather easy problem. IT IS JUST NOT VERY LONG!

ROOT battles to be not compiled on Ubuntu 11.04 stating that it cannot find some libraries (, and and even fails to build xrootd. To get

  • ./configure –prefix=/usr/local


to work, and that the process is also able to build xrootd, just tell the script where to find those ominous libs by adding –with-x11-libdir=/usr/lib/i386-linux-gnu –with-xft-libdir=/usr/lib/i386-linux-gnu –with-xext-libdir=/usr/lib/i386-linux-gnu –with-xrootd-opts=–syslibs=/usr/lib/i386-linux-gnu to the command that it reads

  • ./configure –with-x11-libdir=/usr/lib/i386-linux-gnu –with-xft-libdir=/usr/lib/i386-linux-gnu –with-xext-libdir=/usr/lib/i386-linux-gnu –with-xrootd-opts=–syslibs=/usr/lib/i386-linux-gnu –prefix=/usr/local


Apparently the Ubuntu team changed the structure of the /usr/lib directory for compatibility between system architectures.

One rule to remember is to define every library path for every feature by hand if possible.

Again do not just copy and paste the above command as it seems that the double line is transformed to a long line by WordPress.

For everything else to work just follow the instructions regarding ROOT in my former post.

I warned you that it will be a short post. OUT!


  1. Thanks for that awesome posting. It saved MUCH time :-)

    disclaimer: edited by rikmer => removed advertisement for woman car insurance (beside of this aspect I found it a very nice comment. Sorry wci!!!) ;)

  2. hey this came in handy,

    I had to change to:
    ./configure –with-x11-libdir=/usr/lib/x86_64-linux-gnu –with-xft-libdir=/usr/lib/x86_64-linux-gnu –with-xext-libdir=/usr/lib/x86_64-linux-gnu –prefix=/usr/local

    saved me a lot of time! thanks

  3. actually i have another bug in there somewhere… ah well, kind of regretting upgrading now

    • Well. I suppose you also have to add ” –with-xrootd-opts=–syslibs=/usr/lib/x86_64-linux-gnu”. This last parameter did the trick for me.

  4. hey,
    thanks a lot for your help, you solved a big problem for me! But I still got some paths left, which must be changed, too. Most of them were easy to add, but I don’t know how to do with shape.h, it says:
    Checking for X11/extensions/shape.h … no
    configure: X11/extensions/shape.h header MUST be installed
    Can somebody tell me the right path for that? Everything I tried did not work and I did not find help with ./configure –help
    I would really appreciate some help on that!

    • Did you install all of the prerequisites mentioned in my former post?

      1. make
      2. g++
      3. gcc
      4. binutils
      5. libx11-dev
      6. libxpm-dev
      7. libxft-dev
      8. libxext-dev

      • yes, everything is already installed. Maybe it helps to post everything I entered:

        ./configure –with-x11-libdir=/usr/lib/i386-linux-gnu –with-xft-libdir=/usr/lib/i386-linux-gnu –with-xext-libdir=/usr/lib/i386-linux-gnu –with-xpm-libdir=/usr/lib/i386-linux-gnu –with-xft-libdir=/usr/lib/i386-linux-gnu –with-xrootd-opts=\u2013syslibs=/usr/lib/i386-linux-gnu –prefix=/usr/local

        Configuring for linux
        Checking for GNU Make version >= 3.80 … ok
        Checking for C compiler … gcc
        Checking for C++ compiler … g++
        Checking for linker (LD) … g++
        Checking for F77 compiler … gfortran
        Checking for libX11 … /usr/lib/i386-linux-gnu
        Checking for X11/Xlib.h … /usr/include
        Checking for X11/xpm.h … /usr/include
        Checking for X11/Xft/Xft.h … /usr/include
        Checking for X11/extensions/shape.h … no
        configure: X11/extensions/shape.h header MUST be installed

        • Hmm … looks right except of the strange character \u2013 after –with-xrootd-opts= .

          If you enter “sudo find -name shape.h” in the root of your system, do you find shape.h in ./usr/include/X11/extensions/ ?

            • Verena
            • Posted May 3, 2011 at 11:18
            • Permalink

            no, I found it under ./usr/include/xcb/shape.h
            under ./usr/include/X11/extensions/ there is:

            • rikmer
            • Posted May 3, 2011 at 11:40
            • Permalink

            Try symlinking the shape.h from xcb directory to the X11/extensions directory via “sudo ln -s /usr/include/xcb/shape.h /usr/include/X11/extensions/shape.h”.
            I don’t guarantee that this will work but it ‘s worth a try.

            (is seems that it is not possible to reply on the comments any more because of text formatting, so let me know if it works in a new comment please)

  5. yeah, this worked! thanks a lot!
    But now I’ve got a new problem, it seems as if something else is missing:

    Checking for libXpm … no
    configure: libXpm MUST be installed

    I cannot install libXpm and I didn’t find it with sudo find -name libXpm
    And I also don’t see the difference between libxpm and libXpm?

  6. Regarding the problem of Verena …
    It turned out that the dependencies for ROOT weren’t installed or at least not correctly.
    Double-check if those are installed:
    1. make
    2. g++
    3. gcc
    4. binutils
    5. libx11-dev
    6. libxpm-dev
    7. libxft-dev
    8. libxext-dev

  7. Hi!
    I haven’t any problem to install ROOT 5.28/00d on Ubuntu 11.04 by


    with this 2 commands it works but is installed just on the folder of the source, so to setup the environment variables i need everytime to
    . bin/

    I tried with
    ./configure –prefix=/usr/local
    sudo make install
    It install everything in the system folder but the problem is the environment variable are not setup automatically…

    Do somebody has some advice to setup automatically the environment variable?

    I already tried adding to .bashrc the “. bin/” it works! BUT only from the shell if I try to use some IDE like Geany doesn’t work anymore!

    Thank you

    • Did you do these steps?
      The only thing which is left now is to tell the compiler where to find the new libraries. To do so create the file libroot.conf in /etc/ by entering

      sudo nano /etc/

      into the terminal and editing the content of the file to read


      Save it by pressing +o then and leave the editor by hitting +x.

      Next step is to register libroot.conf by entering

      sudo ldconfig

      I mention them in my former post regarding installation of ROOT and KDevelop.

      Also to use an external IDE and compiler you have to add the right compiler flags. To get them just enter “root-config –cflags –glibs” .

      so long …

    • I think you installed version 5.29 of ROOT. In this version it is supposed to work on Ubuntu 11.04 on the fly.

  8. I did it, but after “make” the following error appeared

    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h:211:23: warning: unused parameter ‘size_t’
    /usr/include/lzma/lzma.h:399:3: warning: unused parameter ‘lzma_options_lzma’
    /usr/include/lzma/lzma.h:155:3: warning: unused parameter ‘lzma_mode’
    /home/rafael/root/core/lzma/src/ZipLZMA.c:109:1: warning: control reaches end of non-void function
    make: ** [core/lzma/src/ZipLZMA.o] Erro 1

    Is this because of my architecture?

  9. Sorry for the delay, I was busy this week.
    I have a problem. In the first time with I ran (.\configure –prefix=/usr/local, make) the system crashed. So I rebooted the system after that I did make again then appeared:
    cint/cint/src/loadfile_tmp.o: file not recognized: File truncated
    collect2: ld returned 1 exit status
    make: ** [cint/cint/main/cint_tmp] Erro 1

    • Try “whereis root” in the commandline. If you find installation directories delete them (do only delete root related files and folders! [so don't delete, for example, the whole /usr/local/bin/ but only the root exectuable]). Reboot your system. Than also delete the folder where you extracted root and extract it again. Do the whole configure/make process again.

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>