Not able to build root from source in ubuntu toolbx (podman container) image


ROOT Version: 6.36.12
Platform: (Ubuntu 24.04-LTS toolbx container) host fedora
Compiler: gcc 13.3.0


Hi all,

Does anyone have experience of building root from source in toolbx container. I have encountered a problem while building it from source.

[ 78%] Building CXX object graf2d/asimage/CMakeFiles/ASImage.dir/src/TASPluginGS.cxx.o
[ 78%] Building CXX object hist/spectrumpainter/CMakeFiles/G__SpectrumPainter.dir/G__SpectrumPainter.cxx.o
[ 78%] Building CXX object gui/gui/CMakeFiles/G__Gui.dir/G__Gui.cxx.o
[ 78%] Building CXX object graf2d/asimage/CMakeFiles/ASImage.dir/src/TASPngWriter.cxx.o
[ 78%] Built target G__SpectrumPainter
[ 78%] Generating G__WebGui6.cxx, ../../lib/WebGui6.pcm
[ 78%] Linking CXX shared library ../../lib/libASImage.so
/usr/bin/ld: ../../builtins/LIBJPEG-prefix/lib/libjpeg.a(jdhuff.c.o): warning: relocation against jpeg_natural_order' in read-only section .text’
/usr/bin/ld: ../../builtins/LIBJPEG-prefix/lib/libjpeg.a(jcmarker.c.o): relocation R_X86_64_PC32 against symbol `jpeg_natural_order’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [graf2d/asimage/CMakeFiles/ASImage.dir/build.make:150: lib/libASImage.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:44046: graf2d/asimage/CMakeFiles/ASImage.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
[ 78%] Building CXX object net/httpsniff/CMakeFiles/G__RHTTPSniff.dir/G__RHTTPSniff.cxx.o
[ 78%] Built target G__RHTTPSniff
[ 78%] Built target G__RooFitCore
[ 78%] Built target G__Gui
[ 78%] Building CXX object graf2d/fitsio/CMakeFiles/G__FITSIO.dir/G__FITSIO.cxx.o
[ 78%] Built target G__FITSIO
[ 78%] Building CXX object gui/webgui6/CMakeFiles/G__WebGui6.dir/G__WebGui6.cxx.o
[ 78%] Built target G__WebGui6
gmake: *** [Makefile:156: all] Error 2

Hi,

We have never seen that issue with our ubuntu 24. Have you tried to install the development version of libjpeg on the system?

Best,
Danilo

@Danilo It is sufficient to configure it using (tested on a regular machine):
cmake -Dbuiltin_jpeg=ON -DCMAKE_INSTALL_PREFIX=...

Hi Danilo,

After you suggestion I installed libjpeg-dev and ROOT is now installed. But root-dependencies page never mentioned it.

Thanks for the help.

I am sorry to hear ROOT did not work out of the box for you.
Normally, that is not needed, and, as underlined above, the builtin libjpeg is enough.

Said that, ROOT is moving away from builtins and trying to rely even more on system packages. The next big step in this direction will be version 6.40.00, due next week.

Cheers,
Danilo

Quite the contrary,
Adding “-Dbuiltin_jpeg=ON” reproduces the bug reported in the original post here (on a standalone Ubuntu 22.04 LTS / x86_64 machine, and the ROOT 6.36.12 source code).