Re: calling CERNLIB routine in a shared library

Rene Brun (Rene.Brun@cern.ch)
Thu, 20 Aug 1998 09:33:41 +0200


Ye Shuwei wrote:
>
> Hello,
>
> I have some experience of calling CERNLIB routine in a shared library.
> I used root to build a shared library, in which some hbook routines are
> invoked. There is no problem to create such a shared library at DEC-Alpha/OSF1
> IBM/AIX and Linux, but trouble at HP-UX(using CC -b). It complaied
>
> ld: Invalid loader fixup symbol "$00000011"
>
> I checked the CERNLIB mathlib, packlib and kernlib which are needed,
> there is symbol of "$00000011" inside. But what is wrong with it ?
>
> Any ideas to solve it ? Thanks.
>
> --Shuwei

The CERNLIB libraries such as libpacklib.a, libkernlib.a,etc
have been compiled under HP-UX without specifying the compiler option
+z or +Z (position independent code). As a result, one cannot link
CERNLIB routines on HP-UX in a shared lib.
We are receiving many complaints on this topic. Shared libs are
interesting (essential) in the development stage.
I can only suggest that enough users send a complaint(suggestion!)
to the current CERNLIB team to get:
- the archive libraries compiled by default with the option +Z.
- better have shared versions of the libraries.
We all know that the CERNLIB development/maintenance is now
at a very minimal level, but this is an important issue for HP-UX
users. The amount of work to implement the option 1 should not be more
than a few seconds.

Fortran routines can however be linked in your main program.
See http://root.cern.ch/root/HowtoCERNLIB.html

Rene Brun