H2root compilation

Hi,

I’m trying to build h2root. I’m running SL 4.2 and I got libpacklib.a and libkernlib.a from cernlib.web.cern.ch/cernlib/down … cc344/lib/

I got the libshift I found in ftp://root.cern.ch/root/shift/ and run configure with the line

./configure linux --enable-cern --enable-shared -with-cern-libdir=/home/carlos/install/cernlib/lib --with-shift-libdir=/home/carlos/install/shift/lib/libshift.a

but the configure output keeps complaining like this:

Checking for libpacklib, packmd, or packlib … /home/carlos/install/cernlib/lib
Checking for libkernlib, kernmd, or kernlib … /home/carlos/install/cernlib/lib
Checking for rfio in /home/carlos/install/cernlib/lib/libpacklib.a … ok
Checking for rfio_connect in /home/carlos/install/cernlib/lib/libpacklib.a … no

Need libshift with this version of -lpacklib

Run configure with --enable-rfio or set --with-shift-libdir

Needless to say, h2root don’t get built when I do make. Where can I find the right libshift to get h2root compiled ?

Thank you !!

Carlos

Remove --with-shift…

Rene

Exactly the same result. I just added that option as a last resort, but with or without it, the configure output complains and h2root doesn’t get built. Any ideas?

Thanks,
Carlos

which version are you installing?
Coiuld you start from CVS?

Rene

I’m installing 5.10/00 from source, the recommended version. Do you think I should try CVS? Is there a way to force the building of h2root regardless of the output of ‘configure’?

Thanks,
Carlos

It looks like you have an old version of cernlib.
Look into the cernlib directory.
If you have a file libpacklib-no-shift.a, rename it to
libpacklib.a and do not specify --with-shift in configure.

Rene

Thanks, Rene. It works now…

It’s funny, though. I got the latest cernlib (2005) at cernlib.web.cern.ch/cernlib/down … cc344/lib/
Here you can find both libpacklib_noshift.a and libpacklib.a, and so I had both in my cernlib directory. I renamed libpacklib_noshift.a to libpacklib.a (overwriting the original libpacklib.a), as you suggested, and it worked.

Thanks again,
Carlos

[quote=“brun”]It looks like you have an old version of cernlib.
Look into the cernlib directory.
If you have a file libpacklib-no-shift.a, rename it to
libpacklib.a and do not specify --with-shift in configure.

Rene[/quote]

Rene I’m having the same problem installing v5.12.00e. Is there a work around that doesn’t involve moving or renaming libraries? That approach is problematic on a shared system.

Can you explain the origin of this problem? I have cernlib 2004 on a cern slc3 installation and find:

kordosky> nm -C /cern/pro/lib/libpacklib.a | grep rfio_connect
kordosky> nm -C /cern/pro/lib/libpacklib-shift.a | grep rfio_connect
kordosky> nm -C /cern/pro/lib/libpacklib_noshift.a | grep rfio_connect

that is, rfio_connect exists in no version of libpacklib. Now, rfio_connect is in my libshift.so but that doesn’t seem to help (I am setting --with-shift-libdir appropriately). I’ve checked that this isn’t a problem with an “old” version of cernlib by doing the same procedure on libpacklib* from
cernlib.web.cern.ch/cernlib/down … cc344/lib/

I am using the official CERN libraries for my system and I would expect that other important CERN products, such as ROOT, would be compatible. I suspect that our problem is either a bug in the configure procedure (shouldn’t require rfio_connect in libpacklib) or a problem with CERN’s build of CERNLIB.

After some debugging I think that there is a bug in ROOT’s configure script. Specifically, this line in $ROOTSYS/configure is incorrect:

if test ! "x$packlib" = "x" && test "x$enable_rfio" = "xno" ; then
# check if libpacklib contains rfio references, if yes make further check

That is, enable_rfio=“no” causes the code to check for rfio symbols. Failure to find these results in the build problem. I think the line should read:

if test ! "x$packlib" = "x" && test "x$enable_rfio" = "xyes" ; then

though the test for the existence of $packlib is pretty lousy (just sees if $packlib is non-null). This explains why setting --disable-rfio doesn’t solve the problem.

So, how does the configure ever build h2root? Well, $enable_rfio is set to “yes” by default. As long as it stays “yes” the program will not check for rfio symbols and h2root will probably get built. Sounds good. However the configure script may change $enable_rfio. This occurs when the script looks for rfio_api.h. If it fails to find rfio_api.h then $enable_rfio is set to “no” which triggers the bug. Setting --disable-rfio skips the rfio_api.h problem but still triggers the bug. So the conditions under which h2root will build are:

(1) user doesn’t set --disable-rfio and the script can find rfio_api.h.

(2) user has rfio and rfio_connect symbols in his cern libraries.

My experience suggests (1) is the most common case.

Please look carefully at how configure is working and fix.

Hi,

I’ve fixed configure by checking for libpacklib_noshift and libkernlib_noshift. In that case you will be able to build h2root without the need for libshift. In the other case you will need libshift and not having it will prevent h2root from being build, since it would not link.

To patch your ./configure make these changes:

    check_library "libpacklib_noshift libpacklib packmd packlib" \
        "$enable_shared" "${cernlibdir}" $cernlibdirs

    ...
    check_library "libkernlib_noshift libkernlib kernmd kernlib" \
        "$enable_shared" "${cernlibdir}" $cernlibdirs

Cheers, Fons.

[quote=“rdm”]Hi,

I’ve fixed configure by checking for libpacklib_noshift and libkernlib_noshift. In that case you will be able to build h2root without the need for libshift. In the other case you will need libshift and not having it will prevent h2root from being build, since it would not link.
To patch your ./configure make these changes:

    check_library "libpacklib_noshift libpacklib packmd packlib" \
        "$enable_shared" "${cernlibdir}" $cernlibdirs

    ...
    check_library "libkernlib_noshift libkernlib kernmd kernlib" \
        "$enable_shared" "${cernlibdir}" $cernlibdirs

Cheers, Fons.[/quote]

Hi Fons,

Maybe I’m wrong about the logic above. What is the script actually trying to do if I set “–disable-rfio” ? I guess I expect that it would not try to utilise any rfio features and therefore wouldn’t go looking for rfio symbols, wouldn’t compile in rfio function calls, etc. Clearly, this isn’t what happens. However, I can make h2root build by hacking the script. Maybe this is because I have libshift.so installed in my path (root’s configure finds it). But, for various reasons, primarily simplicity and reduction of dependencies, I would really just like to turn all these shift/castor/rfio/etc. features off because I do not use them.

Thanks for your help,

Mike Kordosky

I am trying to compile root 5.12 on mac osx 10.4.7 PPC with gcc 4.1.0. I have cernlib 2005 installed, and have attempted all of the suggested solutions here, but still no h2root.

I have configured with the following:

./configure  macosx --enable-cern --prefix=/usr/local --disable-mathmore --with-cern-libdir=$CERNLIB   

which has an output:

Configuring for macosx
Checking for libX11 ... /usr/X11R6/lib
Checking for X11/Xlib.h ... /usr/include
Checking for libXpm ... /usr/X11R6/lib
Checking for libpthread ... /usr/lib
Checking whether to build included libfreetype6 ... yes
Checking whether to build included libpcre ... yes
Checking whether to build included zlib ... yes
Checking for GL/gl.h ... /usr/X11R6/include
Checking for libGL, or libMesaGL ... /usr/X11R6/lib
Checking for libGLU, or libMesaGLU ... /usr/X11R6/lib
Checking for mysql_config ... not found
Checking for mysql.h ... no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no
Checking for occi.h ... no
Checking for libclntsh, or oci ... no
Checking for libocci, or oraocci10 ... no
Checking for libpq-fe.h ... no
Checking for libpq ... no
Checking for sql.h ... no
Checking for libsqlod ... no
Checking for sqlext.h ... /usr/include
Checking for libiodbc, libodbc, or odbc32 ... /usr/lib
Checking for rfio_api.h ... no
Checking for stager_api.h ... no
Checking for libshift, shiftmd, or shift ... no
Checking for gfal_api.h ... no
Checking for libgfal ... no
Checking for ApMon.h ... no
Checking for libapmoncpp ... no
Checking for monalisawsclient.h ... no
Checking for libmonalisawsclient ... no
Checking for fftw3.h ... /usr/local/include
Checking for libfftw3, or libfftw3-3 ... /usr/local/lib
Checking for libpacklib_noshift, libpacklib, packmd, or packlib ... /cern/2005/lib/
Checking for libkernlib_noshift, libkernlib, kernmd, or kernlib ... /cern/2005/lib/
Checking for rfio in /cern/2005/lib//libpacklib.a ... no
Checking for libPythia6 ... no
Checking for libVenus ... no
Checking for dcap.h ... no
Checking for libdcap ... no
Checking for chirp_client.h ... no
Checking for libchirp_client ... no
Checking for gapiUI.h ... no
Checking for libgapiUI ... no
Checking for jpeglib.h ... no
Checking for png.h ... /usr/local/include
Checking for tiffio.h ... no
Checking for gif_lib.h ... no
Checking for libjpeg ... no
Checking for libtiff ... no
Checking for libz ... /usr/lib
Checking for libpng ... /usr/local/lib
Checking whether to build included libAfterImage ... yes
Checking for ldap.h ... /usr/include
Checking for libldap ... /usr/lib
Checking for liblber ... /usr/lib
Checking for Python.h ... /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
Checking for libpython2.5, libpython2.4, libpython2.3, libpython2.2, python25, python24, python23, or Python ... /System/Library/Frameworks/Python.framework/Versions/2.3
Checking for xml2-config ... /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x ... ok
Checking whether to build xrootd ... yes
Checking for for globusdir ... no
Checking for GLOBUS_LOCATION ... no
Checking for libssl ... /usr/lib
Checking for libcrypto ... /usr/lib
Checking for openssl/bio.h ... /usr/include
Checking for openssl/blowfish.h ... /usr/include
Checking for openssl/err.h ... /usr/include
Checking for openssl/pem.h ... /usr/include
Checking for openssl/rand.h ... /usr/include
Checking for openssl/rsa.h ... /usr/include
Checking for t_server.h ... no
Checking for libsrp ... no
Checking for libgmp ... /usr/local/lib
Checking for libmisc ... no
Checking for pwauth.h ... no
Checking for krb5.h ... /usr/include
Checking for libk5crypto ... /usr/lib
Checking whether we're using MIT Kerberos ... yes
Checking for libkrb5 ... /usr/lib
Checking for libcrypto ... /usr/lib
Checking for kinit ... /usr/bin/kinit
Checking for libcom_err ... /usr/lib
Checking for shadow passwords ... no
Checking whether to build libMathmore ... no
Checking whether to build libMathCore ... yes
Checking whether to build libCintex ... yes
Checking whether to build libReflex ... yes
Checking whether to build libRooFit ... no
Checking whether to build libMinuit2 ... no
Checking whether to build libTable ... no
Checking for Clarens support ... no
Checking for PEAC support ... no
Generating cint dictionaries.
Writing config/Makefile.config ... done
Writing include/config.h ... done
Writing bin/root-config ... done
Writing etc/system.rootrc ... done
Writing etc/system.rootauthrc ... done
Writing etc/system.rootdaemonrc ... done
Writing etc/root.mimes ... done
Writing etc/daemons/rootd.rc.d ... done
Writing etc/daemons/rootd.xinetd ... done
Writing etc/daemons/proofd.rc.d ... done
Writing etc/daemons/proofd.xinetd ... done
Writing etc/daemons/xrootd.rc.d ... done
Writing etc/daemons/olbd.rc.d ... done
Writing bin/memprobe ... done
Writing build/misc/root-help.el ... done
Writing macros/html.C ... done
Writing config.status ... done

Enabled support for asimage, astiff, builtin_afterimage, builtin_freetype, builtin_pcre, builtin_zlib, cern, cintex, exceptions, fftw3, krb5, ldap, mathcore, odbc, opengl, pch, python, reflex, shared, ssl, thread, xml, xrootd.

To build ROOT type:

   make
   make install  

Any clues?

Well, I had to make the changes stated above.
The site managers also used softlinks to create a “noshift” cern area:

kordosky> ls -lh /usr/local/cern/noshift/
total 4.0K
lrwxrwxrwx 1 root root 14 Oct 2 17:55 bin -> /cern/pro/bin//
lrwxrwxrwx 1 root root 18 Oct 2 17:55 include -> /cern/pro/include//
drwxr-xr-x 2 root root 4.0K Oct 2 17:57 lib/
lrwxrwxrwx 1 root root 14 Oct 2 17:55 src -> /cern/pro/src//

in which
kordosky> ls -lh /usr/local/cern/noshift/lib/
.
.
.
lrwxrwxrwx 1 root root 20 Oct 2 17:57 libkernlib.a -> libkernlib_noshift.a
.
.
.
lrwxrwxrwx 1 root root 20 Oct 2 17:57 libpacklib.a -> libpacklib_noshift.a
.
.
.

I think this ought to allow h2root to build with the default root configuration scripts but haven’t tried it yet.