Mailing List Archive

Many Problems Building GnuPG
Hi,

Wanting to free myself of PGP (and most especially: NAI!), I
thought I'd take a look at GnuPG. But it's not going well at
all :-(.

First, the specs: Sun Sparc Solaris 2.4 (yes 2.4), GCC 2.8.1,
GNU make, GnuPG 0.9.2.

After multiple tries, I finally got the package to compile with
the following options and by adding a hack:

CFLAGS="-DPRE_551_SUNOS -UHAVE_GETRUSAGE" \
LDFLAGS="-lsocket -lnsl" ./configure --with-included-gettext \
--disable-dev-random

I think config needs some work. For example: configure fails to
find either "getrusage()" or "getpagesize()", but the build acts
as if they're there anyway. (2.5.1 has them. I imagine 2.5 does
as well, but I don't have access to a 2.5 system.) And with Sun
Solaris boxen you need those two libs for "socket", "gethostbyname",
"shutdown", and "connect".

So the "DPRE_551_SUNOS" goes with this hack:

*** rndunix.c-orig Wed Feb 10 19:10:16 1999
--- rndunix.c Wed Feb 10 19:12:12 1999
***************
*** 402,408 ****
#if defined( __hpux )
size_t maxFD = 0;
int pageSize = 4096; /* PHUX doesn't have getpagesize() */
! #elif defined( _M_XENIX ) || defined( __aux )
int maxFD = 0, pageSize = 4096;/* Nor do others, but they get fd right */
#else
int maxFD = 0, pageSize = getpagesize();
--- 402,408 ----
#if defined( __hpux )
size_t maxFD = 0;
int pageSize = 4096; /* PHUX doesn't have getpagesize() */
! #elif defined( _M_XENIX ) || defined( __aux ) || defined(PRE_551_SUNOS)
int maxFD = 0, pageSize = 4096;/* Nor do others, but they get fd right */
#else
int maxFD = 0, pageSize = getpagesize();

I don't know if I got that hack quite right.

After getting it to build, I tried "make check". Results:

$ make check
.
.
.
Supported algorithms:
Cipher: 3DES, CAST5, BLOWFISH, BLOWFISH160
Pubkey: ELG-E, DSA, ELG
Hash: MD5, SHA1, RIPEMD160, TIGER
PASS: version.test
Bus Error - core dumped
(../g10/gpgm --homedir . -v --print-mds) failed
FAIL: mds.test

$ cd checks
$ gdb ../g10/gpgm core
GNU gdb 4.17
.
.
.
Reading symbols from /home/jseymour/exp/gpg/gnupg-0.9.2/checks/../cipher/tiger...done.
#0 0xef5e0a70 in tiger_init ()
(gdb) bt
#0 0xef5e0a70 in tiger_init ()
#1 0x4a324 in md_enable ()
#2 0x48018 in print_mds ()
#3 0x477e8 in main ()
(gdb) quit
$

If allowed to continue, "make check" carries on until (I put some
debug statements in the shell script)...

.
.
.
PASS: decrypt-dsa.test
for i in $plain_files $data_files; do
i==plain-1
i==plain-2

During whatever's happening after that point, CPU usage goes to
100%, load starts climbing (up to 16 before I kill the thing),
and the console window starts emitting "ksyms: too many open
references" at increasing frequency the longer I let it run.

As regards the bus error in tiger_init(): excuse my ignorance,
but I noticed several of these in tiger.c. How can a function
be defined to take an argument, as in "TIGER_CONTEXT *hd" yet
none of the calls to these routines pass them anything??? I've
been coding C for a few years now and I have to admit that this
is a new one on me!

I also tried building the package at work today (on Sparc Solaris
2.5.1 systems), but that hasn't gone well so far, either. Nothing
is set up to handle the Sun commercial development system. And
I'm hampered by being quite "configure-clueless" :-(.

Should I pursue this or am I hopelessly out-of-date and/or
out-of-touch/clueless?

Regards,
Jim
--
Jim Seymour | PGP Public Key available at:
jseymour@jimsun.LinxNet.com | http://www.uk.pgp.net/pgpnet/pks-commands.html
http://home.msen.com/~jimsun | http://www.trustcenter.de/cgi-bin/SearchCert.cgi
Re: Many Problems Building GnuPG [ In reply to ]
Jim Seymour <jseymour@jimsun.LinxNet.com> writes:

> After multiple tries, I finally got the package to compile with
> the following options and by adding a hack:
>
> CFLAGS="-DPRE_551_SUNOS -UHAVE_GETRUSAGE" \
> LDFLAGS="-lsocket -lnsl" ./configure --with-included-gettext \
> --disable-dev-random

I know about -lsocket and -lnsl. The other problems are
in rndunix.c which is quite different from the other source files and
will be replaced by a client for the Entropy Gatherer Daemon (EGD)

> During whatever's happening after that point, CPU usage goes to
> 100%, load starts climbing (up to 16 before I kill the thing),

The EGD will help.

> As regards the bus error in tiger_init(): excuse my ignorance,

Hmmm it works right even on the alpha but I check it again there.

> but I noticed several of these in tiger.c. How can a function
> be defined to take an argument, as in "TIGER_CONTEXT *hd" yet
> none of the calls to these routines pass them anything??? I've

It gets called by a fucntion pointer from md.c

> is set up to handle the Sun commercial development system. And
> I'm hampered by being quite "configure-clueless" :-(.

I did some fixes for these environment (include/types.h if I remember
correct) but there might be a problem with make. I have not yet figured
out what's the reason as automake should generate standard makefiles.
Maybe this gets fix with automake 1.4 which I installed yesterday.

Werner


--
ceterum censeo RSA esse delendam
Re: Many Problems Building GnuPG [ In reply to ]
> Date: Fri, 12 Feb 1999 12:41:25 +0100
> Message-ID: <19990212124125.E16155@frodo.isil.d.shuttle.de>
> From: Werner Koch <wk@isil.d.shuttle.de>
> Subject: Re: Many Problems Building GnuPG
>
> Jim Seymour <jseymour@jimsun.LinxNet.com> writes:
>
[snip]
>
> > During whatever's happening after that point, CPU usage goes to
> > 100%, load starts climbing (up to 16 before I kill the thing),
>
> The EGD will help.

Okay. Should I wait before trying further until this is in?

>
> > As regards the bus error in tiger_init(): excuse my ignorance,
>
> Hmmm it works right even on the alpha but I check it again there.

Perhaps I'll further-acquaint myself with the use of gdb and see
if I can't provide more definitive data on why it's bus-error'ing.

>
> > but I noticed several of these in tiger.c. How can a function
> > be defined to take an argument, as in "TIGER_CONTEXT *hd" yet
> > none of the calls to these routines pass them anything??? I've
>
> It gets called by a fucntion pointer from md.c

Doh. Perhaps if I read more of the code I would've figured that
out, eh?

>
> > is set up to handle the Sun commercial development system. And
> > I'm hampered by being quite "configure-clueless" :-(.
>
> I did some fixes for these environment (include/types.h if I remember
> correct) but there might be a problem with make. I have not yet figured
> out what's the reason as automake should generate standard makefiles.
> Maybe this gets fix with automake 1.4 which I installed yesterday.

I wonder if part of the problem is this: for whatever reason (I no
longer remember) a co-admin of mine had a problem with GNU make and
renamed it to gmake. So when I run "make", I actually have to run
"gmake" if I want the GNU make. But that doesn't *appear* to be the
major problem. I run into things like problems with "-O2" and "-Wall",
which the Sun devsys compiler doesn't accept.

I'll stay subscribed to the list to watch developments. But other than
maybe taking a shot at seeing if I can't debug the bus error problem on
the system here at home, I'll suspend further attempts until some of
the new stuff you've mentioned here is in place.

Guess I'm stuck with PGP for a while. <shrug>

Thanks for the follow-up.


Regards,
Jim
--
Jim Seymour | PGP Public Key available at:
jseymour@jimsun.LinxNet.com | http://www.uk.pgp.net/pgpnet/pks-commands.html
http://home.msen.com/~jimsun | http://www.trustcenter.de/cgi-bin/SearchCert.cgi
Re: Many Problems Building GnuPG [ In reply to ]
Jim Seymour <jseymour@jimsun.LinxNet.com> writes:

> Okay. Should I wait before trying further until this is in?

Next week or so - we are here in the 5th season (carnival) :-)

> Perhaps I'll further-acquaint myself with the use of gdb and see
> if I can't provide more definitive data on why it's bus-error'ing.

I'd appreciate this.

> "gmake" if I want the GNU make. But that doesn't *appear* to be the
> major problem. I run into things like problems with "-O2" and "-Wall",
> which the Sun devsys compiler doesn't accept.

Someone lese already noticed this problem this morning and have
already fixed it here. -Wall was hard coded in zlib/Makefile.am and
I replace -O2 by just -O for non-gcc.

Helau,

Werner


--
ceterum censeo RSA esse delendam