Wrong use of -export-symbols in src/Makefile.am

LRN lrn1986 at gmail.com
Thu Mar 21 12:28:51 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21.03.2013 15:01, Werner Koch wrote:
> On Wed, 20 Mar 2013 17:20, lrn1986 at gmail.com said:
> 
>> -export-symbols is a libtool option. It expects to be given a
>> list of symbols to export. The list is a plain list, one symbol
>> name per line
> 
> Right and libtool allows to use a def file here.
OK, i might have been too hasty.
libtool does have some code to allow .def files to be used. However,
it doesn't really work as expected, see the output of `make' (attached).

The reason is, i believe, that EXPORTS is not on the first line. If
it's moved to the first line (above the comments), then libtool groks
it correctly.

libtool version:
macro_version=2.4.2
macro_revision=1.3337

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRSu7zAAoJEOs4Jb6SI2CwAH0H/AyEGf6ifBxiRf9fU+KaZnpZ
X0B36MITFM+Kbooo/zijriP9n+GJ1nb68JdCNNpSlmfnUp4YwzBP2bsUsFfpwMJl
z6AGkO88Yw5Mz9arZqRV5wzgJfcyVSmYcCK2HkgaHWHuS751LCx3OwsZSJQTUDZf
+XTPjvDdQxH0s41lOzDlqPP6H4bsOC6Sr5WyIducGhVA+zHYv9vzjGetdzRrqxc9
IzEIJDek4rfqXNoZB13hh3zx5Hz/62w9JutZ5ho6C6jMK88TzEB8sffQzALkI9fM
oyp+LNC7JW3X0SgMEOp2wxzks6Q/qi0agLh7Y0i/m5ex1E/nRmn3ah39ZJ1LX9s=
=ZvQk
-----END PGP SIGNATURE-----
-------------- next part --------------
libtool: link: /bin/nm -B  .libs/libgcrypt_la-visibility.o .libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o .libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-hwfeatures.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-fips.o .libs/libgcrypt_la-hmac256.o .libs/libgcrypt_la-context.o .libs/libgcrypt_la-ath.o .libs/versioninfo.o .libs/hwf-x86.o   ../cipher/.libs/libcipher.a ../random/.libs/librandom.a ../mpi/.libs/libmpi.a ../compat/.libs/libcompat.a | sed -n -e 's/^.*[	 ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[	 ][	 ]*_\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //' | sort | uniq > .libs/libgcrypt.exp
libtool: link: if test "x`/bin/sed 1q .libs/libgcrypt.def`" = xEXPORTS; then cp .libs/libgcrypt.def .libs/libgcrypt-20.dll.def; else echo EXPORTS > .libs/libgcrypt-20.dll.def; cat .libs/libgcrypt.def >> .libs/libgcrypt-20.dll.def; fi
libtool: link:  gcc -shared .libs/libgcrypt-20.dll.def  .libs/libgcrypt_la-visibility.o .libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o .libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-hwfeatures.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-fips.o .libs/libgcrypt_la-hmac256.o .libs/libgcrypt_la-context.o .libs/libgcrypt_la-ath.o .libs/versioninfo.o .libs/hwf-x86.o  -Wl,--whole-archive ../cipher/.libs/libcipher.a ../random/.libs/librandom.a ../mpi/.libs/libmpi.a ../compat/.libs/libcompat.a -Wl,--no-whole-archive  -L/mingw/lib -lgpg-error  -O2   -o .libs/libgcrypt-20.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgcrypt.dll.a
f:/sbuild.20/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: .libs/libgcrypt-20.dll.def:6: syntax error
f:/sbuild.20/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:.libs/libgcrypt-20.dll.def: file format not recognized; treating as linker script
f:/sbuild.20/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:.libs/libgcrypt-20.dll.def:2: syntax error
collect2.exe: error: ld returned 1 exit status
make[2]: *** [libgcrypt.la] Error 1


More information about the Gcrypt-devel mailing list