[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cfengine 2.0.2: compile problem on HPUX [update 1]
From: |
Erich Waelde |
Subject: |
cfengine 2.0.2: compile problem on HPUX [update 1] |
Date: |
Wed, 26 Jun 2002 14:33:59 +0200 |
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