help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cfengine for HP-UX on IA64


From: Tod Oace
Subject: Cfengine for HP-UX on IA64
Date: Thu, 19 Feb 2004 17:01:32 -0800

Has anyone else had the displeasure of compiling cfengine on an Itanium HP-UX system? I finally got it going but was getting an "I don't understand what architecture this is!" warning when I ran it. This was the same error I got when I tried running my PA-RISC binary (which IA64 HP-UX emulates). I modified the following and the error is gone but I'm not sure if this is the best solution:

# diff classes.c.orig classes.c
90c90
<    {"hp-ux","9000*","*"},        /* hpux */
---
>    {"hp-ux","*","*"},            /* hpux */

"uname -a" looks like:
HP-UX nwhpfs02 B.11.23 U ia64 0035364093 unlimited-user license

I may just go back and try recompiling the PA-RISC binary with the classes.c tweak. Compiling on HP-UX Itanium was definitely not fun. I had to install m4, bison and flex. Then it took me a while to figure out that openssl compiled 64 bit object files while other things did 32 bit. Setting CFLAGS and LDFLAGS to "+DD64" took care of that (might as well use the 64 bits, right?). I think I also had to toss in an "-L/usr/local/lib" on the LDFLAGS for cfengine.

I set LDOPTS to "-a archive_shared" so cfengine would pick up the static Bison and Flex libraries rather than skipping over them and trying to use the incompatible system yacc and lex libraries. You can stick the "-a ..." on the ld's command line but not on cc's. There's a man page for ld but not for cc, so I don't if there's an equivalent CFLAGS setting I can use. Maybe "cc +help" would've told me, but the HTML page it references doesn't exist. (sigh)

I couldn't figure out how to get a fully static binary, which is what I've tried to standardize on so I don't have to worry about all the right shared libraries being installed correctly on all systems in order for cfengine to run. ld has a "-noshared" option, but cc won't have it. Instead, cc wants "-minshared", but turning that on caused something else to fail. So I'll settle for just having openssl and BerkeleyDB statically linked in like I settled for on Solaris.

There were a bunch of cfengine compile warnings that I didn't look into. The Itanium HP-UX compiler doesn't like "-hreads", and there were lots of warnings about declarations in /usr/include/sys/vfs.h. No idea whether or not that's something cfengine should be concerned about, but I can spend some time digging into it if it should be fixed.

Anyway... I'd appreciate any feedback or advice on this. Thanks...

--
Tod Oace, Intel Corporation <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]