Mailing List Archive

Undefined symbols libgcrypt-1.2.0/tests/ac.c (Solaris 2.7)
Hello libgrypt-team,

the following error appears during the build of libgcrypt-1.2.0 on Solaris
(with non-gnu linker). It seems to me, that the listed symbols are not in
libgcrypt.so but they appear in libgcrypt.a. --disable-ld-version-script
does not help. The created config.log is attached.

Making all in tests
make[2]: Entering directory `/home/stamer/src/libgcrypt-1.2.0/tests'
/bin/ksh ../libtool --mode=link gcc -I/home/stamer/include -O3 -msupersparc
-DSYSV -DSVR4 -I/usr/openwin/include -I/usr/dt/include -I/usr/local/include
-Wall -L/usr/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/local/lib
-L/home/stamer/lib -o ac ac.o ../src/libgcrypt.la -lnsl -lsocket
gcc -I/home/stamer/include -O3 -msupersparc -DSYSV -DSVR4
-I/usr/openwin/include -I/usr/dt/include -I/usr/local/include -Wall
-o .libs/ac ac.o -L/usr/lib -L/usr/openwin/lib -L/usr/dt/lib
-L/usr/local/lib -L/home/stamer/lib ../src/.libs/libgcrypt.so
/home/stamer/lib/libgpg-error.so -lnsl -lsocket -R/home/stamer/lib
Undefined first referenced
symbol in file
gcry_ac_key_data_get ac.o
gcry_ac_data_destroy ac.o
gcry_ac_key_init ac.o
gcry_ac_data_copy ac.o
gcry_ac_open ac.o
gcry_ac_data_get_index ac.o
gcry_ac_data_decrypt ac.o
gcry_ac_close ac.o
gcry_ac_key_pair_extract ac.o
gcry_ac_data_sign ac.o
gcry_ac_data_encrypt ac.o
gcry_ac_data_verify ac.o
gcry_ac_key_pair_generate ac.o
ld: fatal: Symbol referencing errors. No output written to .libs/ac
collect2: ld returned 1 exit status
make[2]: *** [ac] Error 1
make[2]: Leaving directory `/home/stamer/src/libgcrypt-1.2.0/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/stamer/src/libgcrypt-1.2.0'
make: *** [all] Error 2

Nevertheless the library works if installed, since only /tests is
affected. If you need a detailed report, please contact me.

Regards,
--
Heiko Stamer <stamer@theory.informatik.uni-kassel.de>
Re: Undefined symbols libgcrypt-1.2.0/tests/ac.c (Solaris 2.7) [ In reply to ]
On Fri, Dec 10, 2004 at 09:51:24AM +0100, Heiko Stamer wrote:

Hello,

> the following error appears during the build of libgcrypt-1.2.0 on
> Solaris (with non-gnu linker)

This is really strange. Could you please send a tarball containing
your Libgcrypt build tree to me?

Thanks,
Moritz
Re: Undefined symbols libgcrypt-1.2.0/tests/ac.c (Solaris 2.7) [ In reply to ]
On 10 Dec 2004, stamer@flower.theory.informatik.uni-kassel.de wrote:

>
> Hello libgrypt-team,
>
> the following error appears during the build of libgcrypt-1.2.0 on
> Solaris (with non-gnu linker). It seems to me, that the listed
> symbols are not in libgcrypt.so but they appear in
> libgcrypt.a. --disable-ld-version-script does not help. The created
> config.log is attached.
>
> .... (dropped)

I can confirm the build error under Sun Sparc Solaris 2.9 (non-gnu
linker). I still get a very similar error with the new libgcrypt
version 1.2.1 (see below).

Best regards, Adrian.


Making all in tests

make[2]: Entering directory
`/scratch/gnu-downloads/libgcrypt/libgcrypt-1.2.1/tests'

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I/scratch/gcc/include
-I/scratch/apps/include -I/scratch/apps/include/ncurses
-I/scratch/apps/include/readline -I/usr/include -I/usr/openwin/include
-I/scratch/apps/include -g -O2 -Wall -MT prime.o -MD -MP -MF
".deps/prime.Tpo" -c -o prime.o prime.c; \ then mv -f
".deps/prime.Tpo" ".deps/prime.Po"; else rm -f ".deps/prime.Tpo"; exit
1; fi

/bin/bash ../libtool --tag=CC --mode=link gcc -I/scratch/apps/include
-g -O2 -Wall -L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure
-L/usr/lib -L/usr/openwin/lib -o prime prime.o ../src/libgcrypt.la
-lnsl -lsocket

mkdir .libs

gcc -I/scratch/apps/include -g -O2 -Wall -o .libs/prime prime.o
-L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure -L/usr/lib
-L/usr/openwin/lib ../src/.libs/libgcrypt.so
/scratch/apps/lib/libgpg-error.so /scratch/apps/lib/libintl.so
/scratch/apps/lib/libiconv.so -lc -lnsl -lsocket -R/scratch/apps/lib

creating prime

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I/scratch/gcc/include
-I/scratch/apps/include -I/scratch/apps/include/ncurses
-I/scratch/apps/include/readline -I/usr/include -I/usr/openwin/include
-I/scratch/apps/include -g -O2 -Wall -MT register.o -MD -MP -MF
".deps/register.Tpo" -c -o register.o register.c; \ then mv -f
".deps/register.Tpo" ".deps/register.Po"; else rm -f
".deps/register.Tpo"; exit 1; fi

/bin/bash ../libtool --tag=CC --mode=link gcc -I/scratch/apps/include
-g -O2 -Wall -L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure
-L/usr/lib -L/usr/openwin/lib -o register register.o
../src/libgcrypt.la -lnsl -lsocket

gcc -I/scratch/apps/include -g -O2 -Wall -o .libs/register register.o
-L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure -L/usr/lib
-L/usr/openwin/lib ../src/.libs/libgcrypt.so
/scratch/apps/lib/libgpg-error.so /scratch/apps/lib/libintl.so
/scratch/apps/lib/libiconv.so -lc -lnsl -lsocket -R/scratch/apps/lib

creating register

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I/scratch/gcc/include
-I/scratch/apps/include -I/scratch/apps/include/ncurses
-I/scratch/apps/include/readline -I/usr/include -I/usr/openwin/include
-I/scratch/apps/include -g -O2 -Wall -MT ac.o -MD -MP -MF
".deps/ac.Tpo" -c -o ac.o ac.c; \ then mv -f ".deps/ac.Tpo"
".deps/ac.Po"; else rm -f ".deps/ac.Tpo"; exit 1; fi

/bin/bash ../libtool --tag=CC --mode=link gcc -I/scratch/apps/include
-g -O2 -Wall -L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure
-L/usr/lib -L/usr/openwin/lib -o ac ac.o ../src/libgcrypt.la -lnsl
-lsocket

gcc -I/scratch/apps/include -g -O2 -Wall -o .libs/ac ac.o
-L/scratch/gcc/lib -L/scratch/apps/lib -L/usr/lib/secure -L/usr/lib
-L/usr/openwin/lib ../src/.libs/libgcrypt.so
/scratch/apps/lib/libgpg-error.so /scratch/apps/lib/libintl.so
/scratch/apps/lib/libiconv.so -lc -lnsl -lsocket -R/scratch/apps/lib

Undefined first referenced
symbol in file
gcry_ac_data_verify ac.o
gcry_ac_open ac.o
gcry_ac_key_init ac.o
gcry_ac_data_encrypt ac.o
gcry_ac_data_decrypt ac.o
gcry_ac_data_destroy ac.o
gcry_ac_close ac.o
gcry_ac_key_data_get ac.o
gcry_ac_key_pair_generate ac.o
gcry_ac_key_pair_extract ac.o
gcry_ac_data_sign ac.o
gcry_ac_data_copy ac.o
gcry_ac_data_get_index ac.o

ld: fatal: Symbol referencing errors. No output written to .libs/ac

collect2: ld returned 1 exit status

make[2]: *** [ac] Error 1

make[2]: Leaving directory
`/scratch/gnu-downloads/libgcrypt/libgcrypt-1.2.1/tests'
Re: Undefined symbols libgcrypt-1.2.0/tests/ac.c (Solaris 2.7) [ In reply to ]
<lanz <at> wsl.ch> writes:

>
> On 10 Dec 2004, stamer <at> flower.theory.informatik.uni-kassel.de wrote:
>
> >
> > Hello libgrypt-team,
> >
> > the following error appears during the build of libgcrypt-1.2.0 on
> > Solaris (with non-gnu linker). It seems to me, that the listed
> > symbols are not in libgcrypt.so but they appear in
> > libgcrypt.a. --disable-ld-version-script does not help. The created
> > config.log is attached.
> >
> > .... (dropped)
>
> I can confirm the build error under Sun Sparc Solaris 2.9 (non-gnu
> linker). I still get a very similar error with the new libgcrypt
> version 1.2.1 (see below).
>
>

I have same problem with 1.2.1 on Solaris 10(non-gnu linker). Have you figured
out this? If so, would you please let me know how to solve this?

Many thanks,
Henry
Re: Undefined symbols libgcrypt-1.2.0/tests/ac.c (Solaris 2.7) [ In reply to ]
I have the same problem on solaris 2.6, I think it is about the linker or
libtool. On Solaris with non-gnu linker, libtool generate this command for
the shared library:

gcc -shared -Wl,-h -Wl,libgcrypt.so.11 -o .libs/libgcrypt.so.11.2.0
.libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o
.libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-stdmem.o
.libs/libgcrypt_la-secmem.o .libs/libgcrypt_la-missing-string.o
.libs/libgcrypt_la-module.o .libs/libgcrypt_la-ath.o -z allextract
../cipher/.libs/libcipher.a ../mpi/.libs/libmpi.a -z defaultextract
-R/usr/local/lib -R/usr/local/lib -L/usr/local/lib
/usr/local/lib/libgpg-error.so -lnsl -lsocket -lc

It seems that the linker can not extract all symbols from libcipher.a
because "allextract" does not work fine at all, I solved the problem with
the gnu linker, just rename the path of the non-gnu linker so gcc or cc
will take the gnu-linker commonly installed in /usr/local/bin. With gnu
linker the command looks like this :

gcc -shared .libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o
.libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-stdmem.o
.libs/libgcrypt_la-secmem.o .libs/libgcrypt_la-missing-string.o
.libs/libgcrypt_la-module.o .libs/libgcrypt_la-ath.o -Wl,--whole-archive
../cipher/.libs/libcipher.a ../mpi/.libs/libmpi.a -Wl,--no-whole-archive
-Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
-L/usr/local/lib /usr/local/lib/libgpg-error.so -lnsl
-Wl,--version-script=./libgcrypt.vers -Wl,-soname -Wl,libgcrypt.so.11 -o
.libs/libgcrypt.so.11.2.0

--whole-archive instead allextract

Hope this help

Regards
Eduardo Espejo





Henry Jen
<slowhog@jxta.org
> Para
Enviado por: gcrypt-devel@gnupg.org
gcrypt-devel-boun cc
ces@gnupg.org
Asunto
Re: Undefined symbols
13/04/2005 21:15 libgcrypt-1.2.0/tests/ac.c (Solaris
2.7)










<lanz <at> wsl.ch> writes:

>
> On 10 Dec 2004, stamer <at> flower.theory.informatik.uni-kassel.de wrote:
>
> >
> > Hello libgrypt-team,
> >
> > the following error appears during the build of libgcrypt-1.2.0 on
> > Solaris (with non-gnu linker). It seems to me, that the listed
> > symbols are not in libgcrypt.so but they appear in
> > libgcrypt.a. --disable-ld-version-script does not help. The created
> > config.log is attached.
> >
> > .... (dropped)
>
> I can confirm the build error under Sun Sparc Solaris 2.9 (non-gnu
> linker). I still get a very similar error with the new libgcrypt
> version 1.2.1 (see below).
>
>

I have same problem with 1.2.1 on Solaris 10(non-gnu linker). Have you
figured
out this? If so, would you please let me know how to solve this?

Many thanks,
Henry



_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

ForwardSourceID:NT000114EA