help-cfengine
[Top][All Lists]
Advanced

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

Re: cfengine 2.0.2: compile problem on HPUX [update 2]


From: Erich Waelde
Subject: Re: cfengine 2.0.2: compile problem on HPUX [update 2]
Date: Thu, 27 Jun 2002 17:05:38 +0200

Hello all,

it looks like the HPUX stuff can be dealt with much simpler:

I managed to compile and install BerkeleyDB-4.0.14,
openssl-0.9.6c, and cfengine-2.0.3 with only one little
change. After configuring cfengine I edited src/Makefile
and added "-lc" BEFORE "-lPW". I left the line unchanged
otherwise. After that it compiled without complaints.

I have no idea, whether this change can be incorporated
in ./configure or otherwise.

Regards,
Erich


On Wed, Jun 26, 2002 at 02:33:59PM +0200, Erich Waelde wrote:
: Hello all,
: 
: update:
: 
: I have successfully compiled, installed and tested with a minimal
: cfagent.conf on 
: - HPUX 10.20_32
: - HPUX 11.00_32
: 
: using HP's Ansi-C compiler, lex, yacc. No GNU Tools were involved to
: my knowledge. Please note that I did not install into /usr/local,
: but /opt/{BerkeleyDB4.0,openssl-0.9.6c,cfengine-2.0.3}.
: 
: To get the HP Ansi-C compiler I have installed the bundle B3901BA.
: If you are low on space, you need the filesets
: B3901BA.C-ANSI-C
: B3901BA.DebugPrg
: 
: ------------------------------------------------------------
: When installing BerkeleyDB-4.0.14 from sleepycat.com on my systems,
: /opt/BerkeleyDB4.0/lib/libdb-4.0.sl is installed with permissions
: 444. This causes cfengine's ./configure to fail:
: 
:     ./configure --prefix=/opt/cfengine-2.0.3 
--with-openssl=/opt/openssl-0.9.6c --with-berkeleydb=/opt/BerkeleyDB.4.0
:     ...
:     checking for BerkeleyDB location... /opt/BerkeleyDB.4.0
:     checking Berkeley DB Version... configure: error: This release of 
cfengine requires BerkeleyDB 3.2 or later
: 
: then you find in config.log
: ...
:     configure:3305: checking for BerkeleyDB location
:     configure:3358: result: /opt/BerkeleyDB.4.0
:     configure:3377: checking Berkeley DB Version
:     configure:3401: cc -o conftest -Ae -I/opt/BerkeleyDB.4.0/include   
-L/opt/d
:     ce/lib -L/opt/BerkeleyDB.4.0/lib conftest.c -lm  -ldb >&5
:     configure:3404: $? = 0
:     configure:3406: ./conftest
:     /usr/lib/dld.sl: Call to mmap() failed - TEXT 
/opt/BerkeleyDB.4.0/lib/libdb-4.0.
:     sl
:     /usr/lib/dld.sl: Permission denied
:     ./configure[3407]: 14322 Abort(coredump)
:     configure:3409: $? = 134
:     configure: program exited with status 134
: 
: changing the permissions on the shared lib to 555 fixes this.
: ------------------------------------------------------------
: 
: openssl just takes a long time to compile, install, but seems
: to work immediately (make test)
: 
: ------------------------------------------------------------
: On HPUX 10.20_32:
: 
: 
: the configure run fails first with "ANSI feature" error :-)
: 
:     configure:3377: checking Berkeley DB Version
:     configure:3401: cc -o conftest -g -I/opt/BerkeleyDB.4.0/include   
-L/opt/dce/lib
:      -L/opt/BerkeleyDB.4.0/lib conftest.c -lm  -ldb >&5
:     + eval $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LI
:     BS >&5
:     + cc -o conftest -g -I/opt/BerkeleyDB.4.0/include -L/opt/dce/lib 
-L/opt/Berkeley
:     DB.4.0/lib conftest.c -lm -ldb
:     + 1>& 5
:     cc: "configure", line 3390: error 1705: Function prototypes are an ANSI 
feature.
:     configure:3404: $? = 1
:     configure: program exited with status 1
: 
: 
: adding CFLAGS="-Ae" to the configure line fixes that.
: 
: 
: ------------------------------------------------------------
: On both HPUX 10.20_32 and 11.00_32 
: 
: configure succeeds, make fails on
: 
:         cc -DHAVE_CONFIG_H -I. -I. -I. -I/opt/BerkeleyDB.4.0/include 
-I/opt/openssl-0.9.6c/include     -g   -c `test -f strategies.c || echo 
'./'`strategies.c
:         cc  -g    -L/opt/BerkeleyDB.4.0/lib -L/opt/openssl-0.9.6c/lib  
-L/opt/dce/lib -o cfagent  cfagent.o init.o do.o  wrapper.o report.o client.o  
ip.o process.o ifconf.o image.o  item.o item-ext.o item-file.o  2Dlist.o 
globals.o classes.o  misc.o parse.o functions.o  edittools.o patches.o 
install.o  link.o tidy.o filedir.o eval.o  modes.o chflags.o locks.o  mount.o 
macro.o filenames.o  varstring.o wildcard.o cfparse.o  comparray.o read.o 
checksums.o  proto.o filters.o copy.o  repository.o rotate.o errors.o  cflex.o 
net.o df.o log.o  crypto.o popen.o popen_def.o  sensible.o acl.o dce_acl.o  
nameinfo.o strategies.o -ll -ldb -lcrypto -lPW -lpthread -lm  -lc -L../pub -lpub
: /usr/ccs/bin/ld: Unsatisfied symbols:
:    Error (first referenced in /usr/lib/libPW.a(rename.o)) (data)
: *** Error exit code 1
: 
: Stop.
: 
: 
: We did some searching on the Web. It seems that libPW.a expects
: an integer "Error". So I just naively edited the following files:
: 
:     for F in globals.c cf.extern.h  cfenvgraph.c
:     > do
:     > echo "diff -e src/$F.dist src/$F"
:     > diff -e src/$F.dist src/$F
:     > echo "---"
:     > done
:     diff -e src/globals.c.dist src/globals.c
:     936a
:     /*ifdef hpux */
:     int Error;
:     /*endif */
:     .
:     ---
:     diff -e src/cf.extern.h.dist src/cf.extern.h
:     436a
:     
:     /*ifdef hpux */
:     extern int Error;
:     /*endif */
:     .
:     ---
:     diff -e src/cfenvgraph.c.dist src/cfenvgraph.c
:     54a
:     int Error; /* needed by hpux */
:     
:     .
:     ---
: This is a "brute force" attack, I'm sure there are more
: elegant ways to handle this case.
: 
: After that make succeeds. I have no positive confirmation that
: this is the way it should be. Nor have I any clues in which
: cases/functions this variable is used. Thus I cannot conclude
: that cfengine is working flawless. A test with a minimal
: cfagent.conf file shows that cfagent is behaving as expected
: so far. Maybe someone else can clarify this bit.
: 
: ------------------------------------------------------------
: on HPUX 11.00_64, 11.11_32, 11.11_64 I'm still working.
: I send out another update once I'm done.
: 
: ------------------------------------------------------------
: We found some references that say
: - use of libPW.a is deprecated in HPUX 10.30
: - do link libc _before_ libPW
: so it seems that libPW should completely go away some day.
: 
: 
: I wish to thank my colleage Robert Karlsson, who greatly
: helped researching this issue.
: 
: Erich
: 
: -- 
: Erich Waelde -- Agilent Technologies Germany
: 
: _______________________________________________
: Help-cfengine mailing list
: Help-cfengine@gnu.org
: http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 

Erich

-- 
Erich Waelde
Agilent Technologies Boeblingen         GIO Europe Unix Services
email erich_waelde@agilent.com  TN 778-2531 ph +49-7031-464-2531
-- 
The purpose of computing is insight  ---  not numbers.
        Richard Hamming 1962



reply via email to

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