Having difficulties installing ROOT locally

ROOT Version: 6.34.04
Platform: Linux
Compiler: Not Provided


Hi, I’ve been having this issue for a while when installing ROOT locally:

bash

CMake Error at ~/root-6.34.04/buildroot/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-Release.cmake:49 (message):
  Command failed: 2

   'make'

  See also

~/root-6.34.04/buildroot/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-*.log

Here’s the log file it’s referring to:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
/usr/bin/ld: /tmp/tempfile1.o: in function `asim_parse_argb_color':
afterbase.c:(.text+0x1773): undefined reference to `get_default_asvisual'
/usr/bin/ld: afterbase.c:(.text+0x17a5): undefined reference to `XLookupColor'
/usr/bin/ld: /tmp/tempfile1.o: in function `asim_get_drawable_size':
afterbase.c:(.text+0x2336): undefined reference to `get_default_asvisual'
/usr/bin/ld: afterbase.c:(.text+0x2390): undefined reference to `XGetGeometry'
/usr/bin/ld: /tmp/tempfile1.o: in function `asim_asxml_var_init':
afterbase.c:(.text+0x27b4): undefined reference to `get_default_asvisual'
/usr/bin/ld: afterbase.c:(.text+0x27f2): undefined reference to `XDisplayWidth'
/usr/bin/ld: afterbase.c:(.text+0x280e): undefined reference to `XDisplayHeight'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:348: afterbase.o] Error 1

I’ve successfully installed it before by making it disregard AFTERIMAGE, but that breaks TBrowser. Not sure what I’m doing wrong.

Welcome to the ROOT Forum!
It looks like some X11 libs are missing. Did you check the Dependencies - ROOT?
And BTW, why don’t you take a pre-built binary distribution for your system?

according to the dependancies page for Ubuntu and Debian based distributions it says the only dependencies come from this:

sudo apt install binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev \
libxext-dev libxft-dev libxpm-dev python3 libtbb-dev libvdt-dev libgif-dev

I have them downloaded but still have been having the issue.

Not sure what a pre-built binary distribution means.

I’ve been following a youtube video called Installing CERN ROOT in Windows with WSL

Look at Installing ROOT - ROOT

I’ve followed what’s on the website up to sourcing it, but it still doesn’t work.

So what’s the error now?

Says root cannot be found.

Used this command from my user directory: source root-6.34.04/buildroot/bin/thisroot.sh

Can you describe in details what you’ve done to install it?

wget https://root.cern/download/root_v6.34.04.source.tar.gz

tar xzfv root_v6.34.04.source.tar.gz

sudo apt install binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev
libxext-dev libxft-dev libxpm-dev python3 libtbb-dev libvdt-dev libgif-dev

sudo apt install libtiff-tools

mkdir buildroot
cd buildroot

ccmake ..

configure then changed CMAKE_INSTALL_PREFIX to home//root/root-6.34.04-install/

make -j2

after doing the make -j2 i get the error I first posted about:

CMake Error at ~/root-6.34.04/buildroot/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-Release.cmake:49 (message):
Command failed: 2

‘make’

See also

~/root-6.34.04/buildroot/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-*.log

OK, so let me repeat my question: why do you want to build from source and not take the pre-built binary?

I found a video that outlined building from source and I can’t seem to get the pre-built binary to work either. By my understanding it’s just doing the first two steps of what I’ve done and then sourcing to a thisroot.sh file, which doesn’t seem to do anything.

root_v6.34.04.source.tar.gz is not a binary, it’s the source (as its name suggest). The binaries are available here for the latest 6.34/08 release: Release 63408 - ROOT and here for the latest release: Release 63600 - ROOT

Thank you for your help! I’ve got it working now.

2 Likes

You’re very welcome!