Compiling 32bit ROOT on 64bit Kubuntu

Dear ROOT-ians,

for the past few days, I have been trying to produce a 32bit ROOT installation on a Kubuntu 11.04 x64 system. I took the following steps:

  • Replaced all occurrences of /usr/lib with /usr/lib32 in the configure script, as it does not look in the 32bit directory by default (is this necessary? is there an option to tell the script to search additional directories?)

  • Added “-L/usr/lib32 -L/usr/lib32/i386-linux-gnu -Werror” to OPTFLAGS in $ROOTSYS/config/Makefile.linux

  • Added “-L/usr/lib32/gcc-snapshot/lib -lquadmath” to F77FLAGS in $ROOTSYS/config/Makefile.linux

  • Installed a whole lot of libraries using getlibs. Separatly installed and compiled python and openssl in 32bit mode to get the correct header files.

I run the configure script as follows (configure32 is the version with /usr/lib replaced, as mentioned above):

./configure32 linux --with-python-incdir=/opt/python_i386/Python-2.7.1/Include --with-python-libdir=/opt/python_i386/Python-2.7.1 --with-ssl-libdir=/opt/openssl_i386/openssl-0.9.8o --with-ssl-incdir=/opt/openssl_i386/openssl-0.9.8o/include --with-xrootd-opts=--syslibs=/usr/lib32/i38-linux-gnu

which works. Afterwards, I do make and this also works. Executing root also works, but when I try start Eve with TEveManager::Create(), I get

/opt/root/root-52800c/bin/root.exe: symbol lookup error: /opt/root/root-52800c/lib/ undefined symbol: png_create_read_struct

I do not understand at all, why this does not work, there is in /usr/lib32 (which was also found by the configure script). I found this post [url]libASImage undefined symbol png_create_read_struct which mentions the same problem, but obviously, I have already verified that the is there. Also,

ldd =>  (0xf771c000) => /usr/lib32/ (0xf75e1000) => /usr/lib32/ (0xf75c1000) => /usr/lib32/ (0xf7566000) => /usr/lib32/ (0xf7555000) => /usr/lib32/ (0xf7546000) => /usr/lib32/ (0xf742a000) => /usr/lib32/ (0xf7416000) => /usr/lib32/ (0xf732b000) => /lib32/ (0xf72e0000) => /usr/lib32/ (0xf72c4000) => /lib32/ (0xf7167000) => /usr/lib32/ (0xf7151000) => /usr/lib32/ (0xf7138000) => /lib32/ (0xf7134000) => /usr/lib32/ (0xf7105000) => /usr/lib32/ (0xf70fb000)
        /lib/ (0xf771d000) => /usr/lib32/ (0xf70f6000) => /usr/lib32/ (0xf70f0000) => /lib32/ (0xf70c6000)

So it seems, everything was linked correctly, but why does not need I am confused. Does anyone have any idea how to solve this? If you need any more information, I will be glad to provide it.

Thanks in advance for your help!

Best regards,


After the 32bit compilation did not go through, I tried to get at least the regular x64 version (regular for a x64 system, that is). After encountering and circumventing the “-O2”->"-O" and the “undefined reference to adler32” problems, I was able to compile it.

Imagine my surprise when I found out that I have exactly the same error:

$ /opt/root/root-52800c-x64> root
root [0] TEveManager::Create()
/opt/root/root-52800c-x64/bin/root.exe: symbol lookup error: /opt/root/root-52800c-x64/lib/ undefined symbol: png_create_read_struct

To prove that I am using another version:

$ /opt/root/root-52800c-x64> file `which root`
/opt/root/current-x64/bin/root: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

This was with a fresh checkout of and with

./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 --with-xrootd-opts=--syslibs=/usr/lib/x86_64-linux-gnu

Am I the only one having this problem? Maybe I screwed up the libraries somewhere. Can somebody point me to a likley where the problem originates? Is it

Again: thanks in advance for any replies!

Best regards,

Ok, I solved it, kind of…

I uninstalled all libpng that were installed, and removed all 32-bit libpngs that I could find. Now 32bit and 64bit compile and run as far as I can tell.

Still, would be interesting to know where this problem came from… oh well.


I am trying to compile 64-bit root on 64-bit Kubuntu. I would be interested to know how you got around the adler32 problem:

Creating executable …/…/bin/xrdadler32
g++ -m64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 …/…/obj/Xrdadler32.o …/…/lib/libXrdPosix.a …/…/lib/libXrdClient.a -L…/…/lib -lXrdNet -lXrdOuc -lXrdNetUtil -lXrdSys -lnsl -lrt -ldl -lc -o …/…/bin/xrdadler32
…/…/obj/Xrdadler32.o: In function main': /data/Downloads/Linux/root/net/xrootd/src/xrootd/src/XrdApps/ undefined reference toadler32’
/data/Downloads/Linux/root/net/xrootd/src/xrootd/src/XrdApps/ undefined reference to adler32' /data/Downloads/Linux/root/net/xrootd/src/xrootd/src/XrdApps/ undefined reference toadler32’
collect2: ld returned 1 exit status


Just checking out root version 5.29 from the trunk seems to solve all problems!