[xmlsec] xmlsec: compilation on IBM AIX 4.3 , core dump

non_given at msn.com non_given at msn.com
Thu May 29 09:56:28 PDT 2003


Hi, just wanted to add some additional information to this
topic. (having truble with email server, I hope you don't
get multiple copies of this).

I tried to compile xmlsec1-1.0.1 on AIX 5.1 using cc
(VisualAge v6.0.0.0 according to lslpp -l) and got the
following error:

        source='app.c' object='app.lo' libtool=yes 
depfile='.deps/app.Plo' tmpdepfile='.deps/app.TPlo' 
depmode=aix /bin/sh ../../depcomp  /bin/sh ../../libtool
--mode=compile cc -DHAVE_CONFIG_H -I. -I. -I../..  -I../..
 -I../../include  -DXMLSEC_NO_XSLT=1   
-I/usr/local/include    -I/usr/local/include/libxml2  -Wall
-ansi      -g  -DXMLSEC_NO_XSLT=1 -c -o app.lo `test -f
'app.c' || echo './'`app.c
mkdir .libs
cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include
-DXMLSEC_NO_XSLT=1 -I/usr/local/include
-I/usr/local/include/libxml2 -Wall -ansi -g
-DXMLSEC_NO_XSLT=1 -c -M app.c  -DPIC
cc: 1501-210 command option Wall contains an incorrect
subargument
make: 1254-004 The error code from the last command is 1.

The AIX compiler doesn't like the -Wall option in
src/openssl/Makefile
INCLUDES = \
        [...]
        $(LIBXML_CFLAGS) \
        -Wall -ansi \
        $(NULL)

If I remove the -Wall it does compile but I get some
warnings and all the tests done during "make check"
core dump.

        source='app.c' object='app.lo' libtool=yes 
depfile='.deps/app.Plo' tmpdepfile='.deps/app.TPlo' 
depmode=aix /bin/sh ../../depcomp  /bin/sh ../../libtool
--mode=compile cc -DHAVE_CONFIG_H -I. -I. -I../..  -I../..
 -I../../include  -DXMLSEC_NO_XSLT=1   
-I/usr/local/include    -I/usr/local/include/libxml2  -ansi
     -g  -DXMLSEC_NO_XSLT=1 -c -o app.lo `test -f 'app.c'
|| echo './'`app.c
rm -f .libs/app.lo
cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include
-DXMLSEC_NO_XSLT=1 -I/usr/local/include
-I/usr/local/include/libxml2 -ansi -g -DXMLSEC_NO_XSLT=1 -c
-M app.c  -DPIC
1506-755 (W) The -a option is not supported in this release.
mv -f app.o .libs/app.lo
mv -f .libs/app.lo app.o
(cd . && ln -s app.o app.lo)

make check
[...]
--- testKeys started (20030529_143130) ---
    Creating new keys                                   
./tests/testKeys.sh[27]: 23616 Segmentation fault(coredump)
 Fail
--- testKeys finished ---


Doing testkeys.sh manually:
 testKeys.sh . /usr/local/bin/xmlsec1
--- testKeys started (20030529_150846) ---
    Creating new keys                                   
testKeys.sh[27]: 18840 Segmentation fault(coredump)
 Fail
--- testKeys finished ---
--- detailed log is written to 
/tmp/testKeys.20030529_150846-23744.log ---

dbx /usr/local/bin/xmlsec1 core
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in glink.xmlSecError at 0xd23ddcc0 ($t1)
0xd23ddcc0 (xmlSecError+0x8) 800c0000        lwz   r0,0x0(r12)
(dbx) where
glink.xmlSecError() at 0xd23ddcc0
xmlSecOpenSSLAppLoadRANDFile(0x2ff223b0), line 839 in "app.c"
xmlSecOpenSSLAppInit(0x0), line 45 in "app.c"
xmlSecAppCryptoInit(0x0), line 25 in "crypto.c"
xmlSecAppInit(), line 1857 in "xmlsec.c"
main(argc = 17, argv = 0x2ff22960), line 795 in "xmlsec.c"
(dbx) quit

cat /tmp/testKeys.20030529_150846-23744.log
--- testKeys started (20030529_150846) ---
--- testKeys finished ---

I'm using OpenSSL 0.9.7b also built on this platform.

It looks like part of the problem might be some handling of
errors coming from openSSL.
I was able to determine that I was not getting and random
seed data. Although openssl 
appeared to pass all it's tests if I tried to do some
functions it failed.

openssl rand 5
unable to load 'random state'
This means that the random number generator has not been seeded
with much random data.
Consider setting the RANDFILE environment variable to point
at a file that
'random' data can be kept in (the file will be overwritten).
23638:error:24064064:random number
generator:SSLEAY_RAND_BYTES:PRNG not
seeded:md_rand.c:503:You need to read the OpenSSL FAQ,
http://www.openssl.org/support/faq.html

If I created a $HOME/.rnd file with some random data in it
openssl rand 5 works but the xmlsec test still core dumps.


 testKeys.sh . /usr/local/bin/xmlsec1
--- testKeys started (20030529_162506) ---
    Creating new keys                                   
testKeys.sh[27]: 23340 Segmentation fault(coredump)
 Fail
--- testKeys finished ---
--- detailed log is written to 
/tmp/testKeys.20030529_162506-23620.log ---


% dbx /usr/local/bin/xmlsec1 core
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in glink.xmlSecErrorsGetMsg at
0xd2736b80 ($t1)
0xd2736b80 (xmlSecErrorsGetMsg+0x8) 800c0000        lwz  
r0,0x0(r12)
(dbx) where
glink.xmlSecErrorsGetMsg() at 0xd2736b80
xmlSecOpenSSLErrorsInit(), line 202 in "crypto.c"
xmlSecOpenSSLInit(), line 38 in "crypto.c"
xmlSecAppCryptoInit(0x0), line 33 in "crypto.c"
xmlSecAppInit(), line 1857 in "xmlsec.c"
main(argc = 17, argv = 0x2ff22920), line 795 in "xmlsec.c"
(dbx) quit

>Hi, Matt!
>
>I have no idea why it does not compile on AIX. AFAIK, the
only thing 
>required is ANSI C.
>Do you have any compiler output?
>
>Aleksey
>
>
>Matt wrote:
>
>Hello,
>
>I have compiled and used xmlsec on Linux without any problem,
>but it doesn't compile under AIX 4.3 with cc.
>
>Do you know how to compile it successfully ?
>Is it necessary to use gcc?
>What changes should I apply to the Makefile?
>
>Thank you.
>
>Regards,
>Matt




More information about the xmlsec mailing list