HP-UX 10.20 g10_log_fatal et al unresolved references

Bob Proulx bob at proulx.com
Thu Jun 20 19:23:01 CEST 2002


> >   gcc -g -shared -o rndunix ./rndunix.o
> 
> The -shared allows for unresolved symbols under gcc.  From configure:
> 
>      hpux*)
> 	# if using the vendor (ANSI) compiler, arrange to have `-b' passed
> 	# to the linker.  If using gcc, it supports `-shared' to do the same.
>         if test -n "$GCC" ; then
>            DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC"
>         else
>            DYNLINK_MOD_CFLAGS='-Wl,-b'
>         fi
>         ;;

Aha!  And hmm...  Those DYNLINK_MOD_CFLAGS='-Wl,-b' flags are *not*
propagating on hpux.  I do not see those in the compile line.  That is
the crux of the problem.  I will figure that out and get back to you.

And an 'aha!' because now I see that you are building a dynamic
loadable module aka shared object, shared library, which was not
obvious to me previously.  I thought rndunix and tiger etc. were
standalone helper programs for gnupg and not dynamically loaded object
modules.  I should have deduced that from the shared flags but missed
that.  It was late.

It would have been more obvious if the resulting files were named
rndunix.so, tiger.so, etc. or some such instead.  Then I certainly
would not have thought that they were standalone program.  Please
consider the suggestion of naming them with a .so extension as that is
the common convention.

> I'd suggest to do a
> 
> ./configure --enabale-static-rnd=unix
> 
> so that it gets linked statically (or better use egd).  Ignore the
> errors when building the extension modules.

I have prngd installed and am using the egd compatible interface.  I
am aware of the potentials for entropy draining but this is the best
tradeoff for me.  Thanks for the egd suggestion however as hpux does
not have /dev/random and does need something.

I also found that if I include --disable-dynload in the configure that
it avoids this.  But dynamic loading should work fine under hpux.  I
use it in perl and other places routinely.  I think the Makefiles just
need to pass the right flags through and will respond more when I know
more.

For the archive, on HP-UX 10.20 with the native HP ANSI C compiler I
am able to build using the following configure invocation.

  ./configure --prefix=/usr --mandir=/usr/share/man \
    --enable-static-rnd=egd --with-egd-socket=/var/run/egd-pool \
    --disable-dev-random --disable-dynload

I was also using the --disable-asm flag but will try it again without
and report the results.

I was unsure about --disable-dev-random but unless I included it
configure really wanted to use /dev/random even though hpux does not
have one of those.  So I forced it.

> > All else on HP-UX 10.20 build went smoothly with no trouble.  The only
> > special thing I needed to do was to add --disable-asm since the
> 
> I'd suggest that you try without - it used to work on HPUX and it is
> really faster.

I will report the asm messages in a moment and perhaps someone can
interpret them for me.

Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : /pipermail/attachments/20020620/14766cb2/attachment.bin


More information about the Gnupg-devel mailing list