ROOT build fails

Hello,

I tried to compile ROOT v5.26.00b but make failed with an error.

Creating executable ../../bin/xrdcp g++ -m64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 ../../obj/Xrdcp.o ../../obj/XrdcpXtremeRead.o ../../lib/libXrdClient.a ../../lib/libXrdCrypto.a ../../lib/libXrdSut.a ../../lib/libXrdNet.a ../../lib/libXrdOuc.a ../../lib/libXrdSys.a -lnsl -lpthread -lrt -ldl -lc -lz -o ../../bin/xrdcp ../../obj/Xrdcp.o: In function `doCp_loc2xrd(XrdClient**, char const*, char const*)': /home/gene/tmp/packages/ROOT/root/net/xrootd/src/xrootd/src/XrdClient/Xrdcp.cc:1076: undefined reference to `eadler32' ../../obj/Xrdcp.o: In function `doCp_xrd2xrd(XrdClient**, char const*, char const*)': /home/gene/tmp/packages/ROOT/root/net/xrootd/src/xrootd/src/XrdClient/Xrdcp.cc:650: undefined reference to `eadler32' ../../obj/Xrdcp.o: In function `doCp_xrd2loc(char const*, char const*)': /home/gene/tmp/packages/ROOT/root/net/xrootd/src/xrootd/src/XrdClient/Xrdcp.cc:916: undefined reference to `eadler32' collect2: ld はステータス 1 で終了しました make[5]: *** [../../bin/xrdcp] エラー 1 make[4]: *** [Linuxall] エラー 2 make[3]: *** [all] エラー 2 make[2]: *** [XrdClient] エラー 2 make[1]: *** [all] エラー 2 make[1]: ディレクトリ `/home/gene/tmp/packages/ROOT/root/net/xrootd/src/xrootd' から出ます *** Error condition reported by make (rc = 2): make: *** [net/xrootd/src/xrootd/LastBuild.d] エラー 1

Some messages are Japanese, it means like “ld exited with status1”, “Error 1”, “Error 2”, “Exiting directory …” etc.

Anyone can help me out?

I checked Prerequisites page and found there is not /usr/lib/libXpm.so but /usr/lib/libXpm.so.2, so I made symlink like following,

cd /usr/lib ln -s libXpm.so.2 libXpm.so

And then did make again but got no luck. I also tried previous version (v5.24.00) but got no luck either.

My environment is following;
[ul]Red Hat Enterprise Linux Server release 5.4 (x86_64)
gcc 4.1.2
Don’t know hardware detail but it is DELL server with 24 core or something[/ul]

Gerri will process your problem once he will be back. Meanwhile do
make -k
the compilation will process till the end, only the xrootd stuff will not be built.

Rene

Thanks for quick reply.

I deleted entire directory and build from very the start with -k option while saving log.

./configure > configure.log 2>&1 make -k > make.log 2>&1

Linking xrdadler32 got same error about undefined reference to `eadler32’. Also another error can be observed.

g++ -m64 -O2 -o bin/hadd main/src/hadd.o \ -Llib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lMathCore -lThread -lm -ldl -pthread -rdynamic lib/libGraf.so: undefined reference to `einflate' lib/libGraf.so: undefined reference to `einflateInit2_' lib/libGraf.so: undefined reference to `einflateEnd' lib/libGraf.so: undefined reference to `einflateReset' collect2: ld はステータス 1 で終了しました

g++ -m64 -O2 -o bin/h2root main/src/h2root.o \ -Llib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lMathCore -lThread lib/libminicern.so \ /usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortran.so /usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortranbegin.a -lm -ldl -pthread -rdynamic lib/libGraf.so: undefined reference to `einflate' lib/libGraf.so: undefined reference to `einflateInit2_' lib/libGraf.so: undefined reference to `einflateEnd' lib/libGraf.so: undefined reference to `einflateReset' collect2: ld はステータス 1 で終了しました

I don’t know if this imformation helps. Anyway I hope I can hear from Gerri!

Hi,

looks like a platform problem affecting xrootd and libGraf.

But the strange thing is that the symbols don’t look correct. It is not ‘eadler32’, it should be ‘adler32’. The same for ‘einflate’.

Where can we find such a platform to have a look?

Fabrizio

[quote=“furano”]But the strange thing is that the symbols don’t look correct. It is not ‘eadler32’, it should be ‘adler32’. The same for ‘einflate’.

Where can we find such a platform to have a look?[/quote]

It is Red Hat Enterprise Linux Server release 5.4 (x86_64) as I mentioned, but default locale is ja_JP. I think there is not language specific version of RHEL but only universal version and user selects locale at install.

And about symbol, yes it is weired. I investigated a line of source code where error occurs, but there is not ‘eadler32’ but ‘adler32’.

I didn’t think locale affected but tried to build with LANG=C. Same error occured as LANG=ja_JP.UTF-8.

export LANG=C ./configure > configure.log 2>&1 make -k > make.log 2>&1

I managed to build successfully though need to do some tricky things.

It seems compiler replaces symbol when header file zlib.h are included from system, but when it is included from ROOT package itself by using -I option then symbol is not replaced. I don’t know why this makes difference for it can be confirmed that they are totaly same by following.

Anyway, below is what I did to build.

First run ‘make’ without ‘-k’ option till error occurs. And then move into directory where error occured and manually compile object file with specifying include directory by -I option.

cd net/xrootd/src/xrootd/src/XrdClient/ g++ -g -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 -DXrdDEBUG=0 -DHAVE_FSTATAT -DHAVE_LIBZ -DHAVE_XRDCRYPTO -I. -I.. -o ../../obj/Xrdcp.o Xrdcp.cc -I../../../../../../include/

Re-run ‘make’ till error occurs again. Then did similar to Xrdadler32 too.

For libGraf.so, it is a bit more complicated since I needed to rearchive library.

cd graf2d/freetype/src/freetype-2.3.5/ gcc -m64 -I/home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs -I./builds/unix -I/home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/include -c -m64 -O -DFT_CONFIG_OPTION_SYSTEM_ZLIB "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY "-DFT_CONFIG_MODULES_H=<ftmodule.h>" /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/src/gzip/ftgzip.c -fPIC -DPIC -o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftgzip.o -I../../../../include/ ar cru /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/.libs/libfreetype.a /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftsystem.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftdebug.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftinit.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftbase.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftbbox.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftbdf.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftbitmap.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftglyph.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftgxval.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftmm.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftotval.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftpfr.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftstroke.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftsynth.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/fttype1.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftwinfnt.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftxf86.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftlcdfil.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftgasp.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftpatent.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/truetype.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/type1.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/cff.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/type1cid.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/pfr.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/type42.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/winfnt.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/pcf.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/bdf.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/sfnt.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/autofit.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/pshinter.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/raster.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/smooth.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftcache.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftgzip.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/ftlzw.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/psaux.o /home/gene/tmp/packages/ROOT/root/graf2d/freetype/src/freetype-2.3.5/objs/psnames.o cd ../../../../ cp graf2d/freetype/src/freetype-2.3.5/objs/.libs/libfreetype.a lib/libfreetype.a g++ -shared -Wl,-soname,libGraf.so -m64 -O2 -o lib/libGraf.so graf2d/graf/src/TArc.o graf2d/graf/src/TArrow.o graf2d/graf/src/TAttImage.o graf2d/graf/src/TBox.o graf2d/graf/src/TCrown.o graf2d/graf/src/TCurlyArc.o graf2d/graf/src/TCurlyLine.o graf2d/graf/src/TCutG.o graf2d/graf/src/TDiamond.o graf2d/graf/src/TEllipse.o graf2d/graf/src/TFrame.o graf2d/graf/src/TGaxis.o graf2d/graf/src/TGraphPolar.o graf2d/graf/src/TGraphPolargram.o graf2d/graf/src/TGraphQQ.o graf2d/graf/src/TImage.o graf2d/graf/src/TLatex.o graf2d/graf/src/TLegend.o graf2d/graf/src/TLegendEntry.o graf2d/graf/src/TLine.o graf2d/graf/src/TLink.o graf2d/graf/src/TMarker.o graf2d/graf/src/TPave.o graf2d/graf/src/TPaveLabel.o graf2d/graf/src/TPaveStats.o graf2d/graf/src/TPaveText.o graf2d/graf/src/TPavesText.o graf2d/graf/src/TPie.o graf2d/graf/src/TPieSlice.o graf2d/graf/src/TPoints.o graf2d/graf/src/TPolyLine.o graf2d/graf/src/TTF.o graf2d/graf/src/TText.o graf2d/graf/src/TWbox.o graf2d/graf/src/G__Graf.o lib/libfreetype.a

Thanks Fabrizio, your comment guided me right direction. I hope this information helps those who meet same trouble.

Dear Root Experts,

I’m using Scientific Linux 6 (SL6 with x86_64) and can’t build root from source. I added all the packages listed on root.cern.ch/drupal/content/build-prerequisites and also found that the tetex-latex package is also needed.

However, the root build fails at

g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I/freetype2 -I -o graf2d/graf/src/TLatex.o -c /root/Cern/root/graf2d/graf/src/TLatex.cxx
g++: graf2d/graf/src/TLatex.o: No such file or directory
make: *** [graf2d/graf/src/TLatex.o] Error 1

Is there a page like root.cern.ch/drupal/content/build-prerequisites which can summarize the build prerequisites for root for SL6 (x86_64) so that the make completes?

Something appears to be missing, but ./configure did not complain.

I don’t know how many other compilation errors there will be beyond TLatex.o. If I knew how to compile TLatex.cxx by hand, I could see how much further the “make” got towards completion.

Thanks.

Yours, John

Hi John,

Try:

g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I/freetype2 -o graf2d/graf/src/TLatex.o -c /root/Cern/root/graf2d/graf/src/TLatex.cxx

Philippe.

Hi,

I’m having the same problem with root 5_32_04 on a SL 5.2 system, gcc 4.5.3:

g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude   -pthread -I/freetype2 -I -o graf2d/graf/src/TLatex.o -c /net/neutrino-fs/raid/genie/root_5_32_04/graf2d/graf/src/TLatex.cxx
g++: graf2d/graf/src/TLatex.o: No such file or directory

It looks like the -I flag is hiding the -o and g++ is interpreting TLatex.o as an input. I suppose the Makefile is autogenerated in some way? Otherwise, how is anyone getting this to build?

Removing the -I gets me to the next line which also has the same error. Fixing it, I get a different error:

g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude   -pthread -I/freetype2 -o graf2d/graf/src/TText.o -c /net/neutrino-fs/raid/genie/root_5_32_04/graf2d/graf/src/TText.cxx
In file included from include/TTF.h:30:0,
                 from /net/neutrino-fs/raid/genie/root_5_32_04/graf2d/graf/src/TText.cxx:16:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory

Again, looks like problems with the includes, but perhaps my freetype2 install is non-standard…

mike

[quote=“pcanal”]Hi John,

Try:

g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I/freetype2 -o graf2d/graf/src/TLatex.o -c /root/Cern/root/graf2d/graf/src/TLatex.cxx

Philippe.[/quote]

Hi,

It sounds like the configure step and/or the setting up of the variable has not been successful. Can you send us your config.log file and the location (path) of your source and build directory.

Cheers,
Philippe.

Hi Phillipe,

I discovered something interesting. In order to solve the freetype problem I reran configure with --enable-builtin-freetype. And, that had the side effect of fixing the original problem with the -I flag hiding the -o.

I’m doing the build at my local institution but can provide a “bad build” sandbox area and a login if you like.

mike

[quote=“pcanal”]Hi,

It sounds like the configure step and/or the setting up of the variable has not been successful. Can you send us your config.log file and the location (path) of your source and build directory.

Cheers,
Philippe.[/quote]

[quote]'m having the same problem with root 5_32_04 on a SL 5.2 system, gcc 4.5.3:

In order to solve the freetype problem I reran configure with --enable-builtin-freetype. And, that had the side effect of fixing the original problem with the -I flag hiding the -o.
[/quote]

I vaguely recollect that we did indeed have such a problem. A priori this is solved in more recent version of ROOT and you may want to try v5.34/07.

Cheers,
Philippe.