help-cfengine
[Top][All Lists]
Advanced

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

Re: Cfengine for HP-UX on IA64


From: Chia Yew Lee
Subject: Re: Cfengine for HP-UX on IA64
Date: Fri, 20 Feb 2004 10:32:21 +0800
User-agent: Mutt/1.4i

Hi Tod,

        I did managed to overcome the "I don't understand what architecture 
this is!" error message. I went thru the source code and figured that a number 
of changes were required - in fact, I added a new class. The attached patches 
are for cfengine 2.1.0p1. The last test I did was on cfengine 2.0.8. Back then, 
we had a Itanium loaner box from HP where I can do my testing. Anyway, standard 
disclaimer applies. :)

        It's kind of hard to talk about the PA-RISC architectures and OS in a 
simple email so before I bored everyone out, drop me an email for more info.  
*:D

        What we have done was to compile cfengine on a HPUX 11.00 K420 box 
(PA-RISC 1.1/PA7200 32-bit 120Mhz processor). The compiler option used was 
"+DAportable". This generate a single binary for PA-RISC 32-bits and 64 bits 
processors. That would not give you the best computing performance but I don't 
think we need that on cfengine at this moment. And we saw what HP means by 
binary compatibility, the binary actually executes on the Itanium running HPUX 
11i v1.5 and give similar output as to what we have seen on the other PA-RISCs 
boxes.

        As for the shared/static library, I did it the lazy way. Shared 
libraries on HPUX has a .sl suffix while static library has a .a suffix. I 
simply renamed the .sl so that the configuration and compilation process will 
never get to find a shared library to use. Of course, that will end up with a 
fatter binary because all the functions calls (BerkeleyDB, openssl, flex) are 
now "bundled".

        Hope this helps. :)

Chia Yew Lee
IT/Enterprise Hosting, 
Unix Competency Center
Agilent Technologies

On Thu, Feb 19, 2004 at 05:01:32PM -0800, Tod Oace wrote:
> 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>
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cfengine
> 

Attachment: cf.defs.h.patch
Description: Text document

Attachment: classes.c.patch
Description: Text document


reply via email to

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