HP-UX is GNU unfriendly

I'm trying to install a reasonable young rrdtool onto a HP-UX 11.11, but I'm almost giving up in despair : there's a HP-UX depot in the contribute section of the rrdtool downloads, but that's a very old version. There are very few sites which offer prebuild HP-UX GNU binaries, but the HP-UX porting and archive center is the most well-known. Unfortunately, there are three current versions of HP-UX, spread over 2 architectures, which means that the archive is rather thin. A prebuild recent rrdtool version is unavailable, which implies I get the pleasure of building the thing.

HP-UX carries the css cc compiler, which dislikes rrdtool (or the other way around), so configure is barfing out the following :

configure: error:
Your Compiler does not do proper IEEE math ...

Time to install gcc, but that means installing its dependancies too : libiconv, libgcc and zlib; after a successful gcc installation, time for a new configure run :

# export CC=gcc
# ./configure
[...]
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

Hmmm, that's weird, let's check out gcc :

# gcc
/usr/lib/dld.sl: Can't open shared library: /usr/local/lib/libintl.sl
/usr/lib/dld.sl: No such file or directory
Abort

That's even weirder; why's gcc linked to this library ? Let's double check :

# ldd `which gcc`
        /usr/lib/libc.2 =>      /usr/lib/libc.2
        /usr/lib/libdld.2 =>    /usr/lib/libdld.2
        /usr/lib/libc.2 =>      /usr/lib/libc.2
        /usr/local/lib/libiconv.sl =>   /usr/local/lib/libiconv.sl
        /usr/lib/libc.2 =>      /usr/lib/libc.2
/usr/lib/dld.sl: Can't open shared library: /usr/local/lib/libintl.sl
/usr/lib/dld.sl: No such file or directory

But there's a libintl.sl lib in the /opt/gnome/lib dir, hopefully that one can be used :

# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gnome/lib
sh: LD_LIBRARY_PATH: Parameter not set.
# gcc
/usr/lib/dld.sl: Can't open shared library: /usr/local/lib/libintl.sl
/usr/lib/dld.sl: No such file or directory
Abort

Damned, HP-UX won't accept the $LD_LIBRARY_PATH or $SHLIB parameter; maybe this dirty hack will work :

# ln -s /opt/gnome/lib/libintl.sl /usr/local/lib/libintl.sl
# gcc                                                      
/usr/lib/dld.sl: Unresolved symbol: libintl_bindtextdomain (code)  from gcc
Abort

/me kicks the server. Bah.
We coped with this crap on Linux 10 years ago. Maybe I'm with the ignorant, but does anyone knows a way out of this mess ? Sun is giving away companion CD's with GNU tools on it, maybe HP does the same ?

Wouter Verhelst Wed, 03/26/2008 - 19:22

HP-UX comes with a C compiler that is not ANSI-compatible. There is a package for an ANSI-compatible compiler, but that requires you to pay an extra license. Also, if you want to compile and run GCC on HP-UX, you need that ANSI compiler package to be able to properly do so.

Yeah, HP is GNU unfriendly. OTOH, HP is a big supporter of Linux... and Linux runs on both ia64 and PA-RISC machines, thanks in part due to the help HP gave those efforts...

Emmanuel Mon, 06/02/2008 - 10:23

libintl.sl is part of gettext
get it from hpux.connect.org.uk and install it with swinstall

Anonymous Mon, 01/16/2012 - 20:38

In reply to by Emmanuel

I had the same problem.
This worked for me, thanks a lot.

Nigel Reed Wed, 01/21/2009 - 17:31

Try using su without the - to get to root or set the variable and compile as a regular user and then su to root to install it. When you su - on HPUX, you cannot set LD_LIBRARY_PATH but you can as a regular user.

RuBiCK Wed, 10/21/2009 - 12:53

Hello,

Did you resolved this issue? I have the same issue with wget in 11.11:

# /usr/local/bin/wget
/usr/lib/dld.sl: Unresolved symbol: libintl_bindtextdomain (code) from /usr/local/bin/wget
Abort(coredump)

Thanks!

John Fri, 05/21/2010 - 10:02

This site (http://www.filibeto.org/~aduritz/truetrue/rrdtool/) gives more info about compiling rrdtool on HP-UX. Your error should be resolved while using --with-libintl-prefix=/usr/local as an argument for configure. You might also apply the patches which are provided...