1.0.7 compile error - solaris 8 / gcc 3.0.4

Paul Southworth pauls at etext.org
Sat Jul 27 21:15:01 CEST 2002


I'm building 1.0.7 on Solaris 8 using gcc 3.0.4.  In this environment the
libstdc++.so and libgcc_s.so libraries are in a strange place since the
executables are shared among many systems that do not have the compiler
installed, so we make a package of the libraries and dist it around.

So (depending on the package) we set LDFLAGS or LDOPTS like:

-L/path/to/gcclibs -R/path/to/gcclibs

This generally works fine except that with gnupg, cipher/Makefile does not
use LDFLAGS when linking things like tiger, rndlinux, rndegd, and so
forth.  This results in an error like this:

../g10/gpg --homedir . --quiet --yes --import
../../gnupg-1.0.7/checks/pubdemo.asc
gpg: ../cipher/tiger: error loading extension: ld.so.1: ../g10/gpg: fatal:
libgcc_s.so.1: open failed: No such file or directory

$ ldd tiger
        libgcc_s.so.1 =>         (file not found)

In cipher/Makefile:

tiger$(EXEEXT): $(srcdir)/tiger.c
   `echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o tiger $(srcdir)/tiger.c | \
       sed -e 's/-O[2-9s]*/-O/g' `

It works properly if you do this:

tiger$(EXEEXT): $(srcdir)/tiger.c
   `echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o tiger $(srcdir)/tiger.c \
   $(LDFLAGS) | sed -e 's/-O[2-9s]*/-O/g' `

Or I suppose you could add the -L/-R options to DYNLINK_MOD_CFLAGS.
I see there is a DYNLINK_LDFLAGS variable in cipher/Makefile but it
doesn't appear to be used anywhere. (?)

Please email me if you know a better workaround.

--Paul





More information about the Gnupg-devel mailing list