More compile problems & fixes for CVS
Simon Josefsson
jas@extundo.com
Mon, 07 Jul 2003 05:14:26 +0200
Several platforms due to this. Perhaps the ld is too old? It would
be good if this could be detected, and the version script not used, in
that case.
/usr/bin/ld -r -o .libs/libgcrypt.la-3.o .libs/sexp.o .libs/libgcrypt.la-2.o
/usr/bin/ld -r -o .libs/libgcrypt.la-4.o .libs/stdmem.o .libs/libgcrypt.la-3.o
/usr/bin/ld -r -o .libs/libgcrypt.la-5.o .libs/secmem.o .libs/libgcrypt.la-4.o
/usr/bin/ld -r -o .libs/libgcrypt.la-6.o .libs/missing-string.o .libs/libgcrypt.la-5.o
/usr/bin/ld -r -o .libs/libgcrypt.la-7.o .libs/module.o .libs/libgcrypt.la-6.o
/usr/bin/ld -r -o .libs/libgcrypt.la-8.o .libs/ath.o .libs/libgcrypt.la-7.o
/usr/bin/ld -r -o .libs/libgcrypt.la-9.o .libs/ath-pthread.o .libs/libgcrypt.la-8.o
gcc -shared .libs/libgcrypt.la-9.o -Wl,--whole-archive ../cipher/.libs/libcipher.a ../mpi/.libs/libmpi.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/tmp/jas/shishi-0.0.1/errcrypto/src/.libs -Wl,--rpath -Wl,/tmp/jas/lib -L/tmp/jas/shishi-0.0.1/errcrypto/src -L/tmp/jas/lib /tmp/jas/shishi-0.0.1/errcrypto/src/.libs/libgpg-error.so -lnsl -Wl,--version-script=./libgcrypt.vers -Wl,-soname -Wl,libgcrypt.so.1 -o .libs/libgcrypt.so.1.5.1
/usr/bin/ld:./libgcrypt.vers:23: parse error in VERSION script
collect2: ld returned 1 exit status
make[2]: *** [libgcrypt.la] Error 1
make[2]: Leaving directory `/tmp/jas/shishi-0.0.1/crypto/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/jas/shishi-0.0.1/crypto'
make: *** [install-recursive] Error 1
spe166> ../../config.guess
ia64-unknown-linux-gnu
spe166> cat libgcrypt.vers
# libgcrypt.vers - What symbols to export
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# This file is part of Libgcrypt.
#
# Libgcrypt is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser general Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# Libgcrypt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# WARNING: _gcry_generate_elg_prime is only a temporary solution for
# GNUTLS and should not be used by any otehr program. A new interface
# for prime generation will be available RSN (wk 2003-01-02)
{
global: gcry*; _gcry_generate_elg_prime;
local: *;
};
spe166> ../../config.guess
ia64-unknown-linux-gnu
spe166> gcc --version
3.0
spe166> /usr/bin/ld --version
GNU ld 2.11.90.0.8
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
Supported emulations:
elf64_ia64
spe166>
On ia64, one of the self tests crashes:
bash-2.05a$ libtool gdb ac
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ia64-linux"...
(gdb) r --verbose --debug
Starting program: /tmp/jas/shishi-0.0.1/crypto/tests/.libs/lt-ac --verbose --debug
[New Thread 1024 (LWP 12341)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 12341)]
0x200000000009bed1 in _gcry_mpi_normalize (a=0x6000000000003d70)
at mpi-bit.c:58
58 if( mpi_is_opaque(a) )
(gdb) bt full
#0 0x200000000009bed1 in _gcry_mpi_normalize (a=0x6000000000003d70)
at mpi-bit.c:58
No locals.
#1 0x200000000009bfb0 in gcry_mpi_get_nbits (a=0x6000000000003d70)
at mpi-bit.c:72
n = 0
#2 0x20000000000a2db0 in gcry_mpi_print (format=GCRYMPI_FMT_STD, buffer=0x0,
nbytes=0x60000fffffffbc50, a=0x6000000000003d70) at mpicoder.c:460
nbits = 0
len = 13835058055282167199
#3 0x20000000000548e0 in sexp_sscan (retsexp=0x60000fffffffbc70,
erroff=0x60000fffffffbc48,
buffer=0x6000000000003d60 "(sig-val(flags)(RSA(s%m)))", length=4,
argflag=1, arg_ptr=0x0, arg_list=0x6000000000003d40) at sexp.c:1045
m = (struct gcry_mpi *) 0x6000000000003d70
nm = 0
tokenchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-./_:*+="
p = 0x6000000000003d76 "m)))"
n = 4
digptr = 0x0
quoted = 0x0
tokenp = 0x0
hexfmt = 0x0
base64 = 0x0
disphint = 0x0
percent = 0x6000000000003d75 "%m)))"
hexcount = 0
quoted_esc = 0
datalen = 15728
dummy_erroff = 65515
c = {sexp = 0x6000000000003d90, allocated = 40,
pos = 0x6000000000003db1 ""}
arg_counter = 1
#4 0x2000000000054f40 in gcry_sexp_build_array (retsexp=0x60000fffffffbc70,
erroff=0x0, format=0x6000000000003d60 "(sig-val(flags)(RSA(s%m)))",
arg_list=0x6000000000003d40) at sexp.c:1219
dummy_arg_ptr = (void * volatile) 0x0
#5 0x2000000000064fc0 in gcry_ac_data_construct (
identifier=0x20000000000c8290 "\230?\n", flags=0,
algorithm=0x20000000000b3bf0 "RSA", data=0x60000000000042b0,
data_sexp=0x60000fffffffbc80) at ac.c:446
err = 701768
arg_list = (void **) 0x6000000000003d40
data_sexp_new = (struct gcry_sexp *) 0x0
data_format_n = 6917529027641097568
---Type <return> to continue, or q <return> to quit---
data_format = 0x6000000000003d60 "(sig-val(flags)(RSA(s%m)))"
i = 1
#6 0x2000000000067400 in gcry_ac_data_verify (handle=0x6000000000002c20,
key=0x6000000000002cd0, data=0x6000000000002c50,
data_signature=0x20000000000cc820) at ac.c:1196
err = GPG_ERR_NO_ERROR
sexp_request = (struct gcry_sexp *) 0x0
sexp_data = (struct gcry_sexp *) 0x0
#7 0x4000000000001770 in check_run () at ac.c:99
handle = (struct gcry_ac_handle *) 0x6000000000002c20
key_pair = (struct gcry_ac_key_pair *) 0x6000000000002c90
key_sec = (struct gcry_ac_key *) 0x6000000000002cb0
key_pub = (struct gcry_ac_key *) 0x6000000000002cd0
err = 0
x = (struct gcry_mpi *) 0x6000000000002c50
x2 = (struct gcry_mpi *) 0x6000000000004060
data = (struct gcry_ac_data *) 0x60000000000042b0
rsa_spec = {e = 0x6000000000002be0}
#8 0x40000000000018e0 in main (argc=7896, argv=0x60000fffffffbcd8) at ac.c:125
debug = 0
i = 0
(gdb)
Index: Makefile.am
===================================================================
RCS file: /cvs/gnupg/libgcrypt/cipher/Makefile.am,v
retrieving revision 1.76
diff -u -p -u -w -r1.76 Makefile.am
--- Makefile.am 2 Jul 2003 15:39:43 -0000 1.76
+++ Makefile.am 7 Jul 2003 02:57:36 -0000
@@ -50,9 +50,11 @@ md5.c \
rijndael.c \
rmd160.c \
rndegd.c \
-endunix.c \
-rndnw32.c \
+rndlinux.c \
+rndunix.c \
+rndw32.c \
rsa.c \
+sha1.c \
sha256.c \
sha512.c \
tiger.c \
--- sexp.c.~1.33.~ Mon Jun 23 00:58:15 2003
+++ sexp.c Mon Jul 7 04:52:48 2003
@@ -1210,9 +1210,14 @@
{
gpg_error_t rc;
+ /* We don't need the va_list because it is controlled by the
+ following flag, however we have to pass it but can't initialize
+ it as there is no portable way to do so. volatile is needed to
+ suppress the compiler warning */
+ volatile va_list dummy_arg_ptr;
rc = sexp_sscan (retsexp, erroff, format, strlen(format), 1,
- NULL, arg_list);
+ dummy_arg_ptr, arg_list);
return rc;
}
Thanks.