helpGnuTLS - Support: sr #106543, gnutls-2.6.0 openpgp selftest...

 
 

sr #106543: gnutls-2.6.0 openpgp selftest failure (test programs uses system library rather than built one)

Submitted by:  Daniel Black <danielblack>
Submitted on:  Tue 04 Nov 2008 12:38:13 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: Done
Privacy: PublicAssigned to: Simon Josefsson <jas>
Open/Closed: ClosedOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 04 Jun 2009 09:12:56 AM UTC, comment #9:

This should be fixed in latest stable 2.8.0, closing.

Simon Josefsson <jas>
Project AdministratorIn charge of this item.
Thu 16 Apr 2009 11:34:43 PM UTC, comment #8:

It didn't make the 2.6.4 or 2.6.5 release, but it IS in the git gnutls_2_6_x branch now. I am sorry for missing this..

The patch was slightly incorrect though, an additional ../ was needed for the libgnutls/libgnutls-extra .la's. If that patch worked for you, did you really run 'make check'?

/Simon

Simon Josefsson <jas>
Project AdministratorIn charge of this item.
Sat 10 Jan 2009 12:29:00 AM UTC, comment #7:

correct - not currently fixed in 2.6.x as per snapshot.

the fix is moderately important. though selftests are not used enabled by the majority of users I will get a bug report eventually if it is not fixed.

short of disabling the test or massively hacking LD_LIBRARY_PATH I couldn't see a workaround.

I applied your patch there and it work great. Looking forward to seeing it in the 2.6.4 release.

Daniel Black <danielblack>
Fri 09 Jan 2009 12:06:46 PM UTC, comment #6:

Thanks. I guess it has not been fixed in 2.6.x though? Please test:

http://daily.josefsson.org/gnutls-2.6/gnutls-2.6-20090109.tar.gz

We are going to release it as 2.6.3 soon. Is it important to fix this for you, or do you know of an easy workaround? I think the proper fix is something like this in tests/openpgp/Makefile.am:

-LDADD = -L$(top_builddir)/libextra -lgnutls-extra \
- -L$(top_builddir)/lib -lgnutls \
- -L$(top_builddir)/tests -lutils
+LDADD = ../lib/libgnutls.la ../lib/libgnutls-extra.la ../libutils.la

Although it needs some testing.

If you want, and can test an updated daily snapshot, I can apply the fix, and then wait for your to test it before releasing 2.6.3.

Thanks,
Simon

Simon Josefsson <jas>
Project AdministratorIn charge of this item.
Sun 04 Jan 2009 01:27:09 AM UTC, comment #5:

2.7.3 works as expected. thankyou.

2| PGP: keyring import format 'raw'
2| new stream `[temp]'
2| new stream fd=4
2| ASSERT: stream.c:1000
2| ASSERT: keydb.c:1037
2| ASSERT: keydb.c:1425
2| PGP: key not found 00000000
2| cache: add entry off=0 type=4
2| ASSERT: stream.c:1000
2| cache: add entry off=555 type=4
done
2| close stream ref=0 `[temp]'
2| close stream fd=4
2| ASSERT: stream.c:513
Self test `./openpgp-keyring' finished with 0 errors

Daniel Black <danielblack>
Mon 15 Dec 2008 03:16:50 PM UTC, comment #4:

In gnutls 2.7.x the tests/openpgp/ directory is gone, and the test moved to tests/openpgp-keyring.c. The problem seems to be an *.la ordering issue, so I think it has been fixed. Could you test 2.7.3?

Simon Josefsson <jas>
Project AdministratorIn charge of this item.
Thu 06 Nov 2008 08:36:52 PM UTC, comment #3:

the libtool generated tests/openpgp/keyring contains
LD_LIBRARY_PATH="/var/tmp/portage/net-libs/gnutls-2.6.0/work/gnutls-2.6.0/libextra/.libs:/usr/lib64:/var/tmp/portage/net-libs/gnutls-2.6.0/work/gnutls-2.6.0/lib/.libs:$LD_LIBRARY_PATH"

the middle /usr/lib64 shouldn't be there. I just need to workout where its added from.

Daniel Black <danielblack>
Thu 06 Nov 2008 12:44:28 PM UTC, comment #2:

curl does something like:
--- tests/openpgp/Makefile.am.orig 2008-11-06 21:14:59.000000000 +1100
+++ tests/openpgp/Makefile.am 2008-11-06 21:21:12.000000000 +1100
@@ -30,9 +30,9 @@

AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes \
-I$(top_srcdir)/tests
-LDADD = -L$(top_builddir)/libextra -lgnutls-extra \
- -L$(top_builddir)/lib -lgnutls \
- -L$(top_builddir)/tests -lutils
+LIBDIR = $(top_builddir)/lib $(top_builddir)/libextra $(top_builddir)/tests
+LDADD = $(top_builddir)/libextra/libgnutls-extra.la $(top_builddir)/lib/libgnutls.la $(top_builddir)/tests/libutils.la
+DEPEND= $(LDADD)

else

However the keyring does seem to do the LD_LIBRARY_PATH correctly for me.
You'll need a gnutls version less that the build one to notice the error.

Daniel Black <danielblack>
Tue 04 Nov 2008 02:33:23 PM UTC, comment #1:

i think the tests/openpgp/Makefile.am needs to refer the libraries by the .la file with path for linking.

Daniel Black <danielblack>
Tue 04 Nov 2008 12:38:13 PM UTC, original submission:

./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-zlib --disable-nls --disable-guile --disable-cxx --disable-gtk-doc --with-lzo --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu

config.log
#define PACKAGE_NAME "GnuTLS"
#define PACKAGE_TARNAME "gnutls"
#define PACKAGE_VERSION "2.6.0"
#define PACKAGE_STRING "GnuTLS 2.6.0"
#define PACKAGE_BUGREPORT "bug-gnutls@gnu.org"
#define PACKAGE "gnutls"
#define VERSION "2.6.0"
#define GNUTLS_GCRYPT_VERSION "1:1.2.4"
#define GNUTLS_LIBTASN1_VERSION "0.3.4"

make[2]: Entering directory `/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/openpgp'
make keyring
make[3]: Entering directory `/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/openpgp'
x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../includes -I../../includes -I../../tests -pipe -ggdb -O2 -Wno-pointer-sign -MT keyring.o -MD -MP -MF .deps/keyring.Tpo -c -o keyring.o keyring.c
mv -f .deps/keyring.Tpo .deps/keyring.Po
/bin/sh ../../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -std=gnu99 -pipe -ggdb -O2 -Wno-pointer-sign -Wl,--as-needed -o keyring keyring.o -L../../libextra -lgnutls-extra -L../../lib -lgnutls -L../../tests -lutils
libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -pipe -ggdb -O2 -Wno-pointer-sign -Wl,--as-needed -o .libs/keyring keyring.o -L/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/libextra /var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/libextra/.libs/libgnutls-extra.so -L/usr/lib64 /usr/lib64/liblzo2.so -L/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/lib /var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/lib/.libs/libgnutls.so /usr/lib64/libtasn1.so -lz /usr/lib64/libgcrypt.so /usr/lib64/libgpg-error.so -L/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests /var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/.libs/libutils.a
make[3]: Leaving directory `/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/openpgp'
make check-TESTS
make[3]: Entering directory `/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/openpgp'

extra-init -83
2| PGP: keyring import format 'raw'
2| PGP: key not found 00000000
done
Self test `/var/tmp/portage/net-libs/gnutls-2.6.0/work/gnutls-2.6.0/tests/openpgp/.libs/keyring' finished with 1 errors
FAIL: keyring
===================================
1 of 1 tests failed
Please report to -unavailable-
===================================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-libs/gnutls-2.6.0/work/gnutls-2.6.0/tests/openpgp'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/var/tmp/portage/net-libs/gnutls-2.6.0/work/gnutls-2.6.0/tests/openpgp'
make[1]: *** [check-recursive] Error 1

updated to libgcrypt-1.4.3 and libtasn1-1.5 without effect

GNUTLS_E_LIBRARY_VERSION_MISMATCH -83

/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/tests/openpgp $ strace -fe trace=open ./keyring --verbose
..
open("/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/libextra/.libs/libgnutls-extra.so.26", O_RDONLY) = 3
..
open("/usr/lib64/libgnutls.so.26", O_RDONLY) = 3

build system looks for the gnutls library off the installed system which is still at the previous version.

fudging paths with LD_LIBRARY_PATH
$ LD_LIBRARY_PATH=/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/lib/.libs/:/var/tmp/portage/net-libs/gnutls-2.5.9/work/gnutls-2.5.9/libextra/.libs/ ./.libs/keyring --verbose
2| PGP: keyring import format 'raw'
2| new stream `[temp]'
2| new stream fd=4
2| ASSERT: stream.c:1000
2| ASSERT: keydb.c:1037
2| ASSERT: keydb.c:1425
2| PGP: key not found 00000000
2| cache: add entry off=0 type=4
2| ASSERT: stream.c:1000
2| cache: add entry off=555 type=4
done
2| close stream ref=0 `[temp]'
2| close stream fd=4
2| ASSERT: stream.c:513
Self test `./.libs/keyring' finished with 0 errors

(forgive the switching between 2.5.9 and 2.6.0 - both generated teh same results)

Daniel Black <danielblack>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jas (Posted a comment)
  • -unavailable- added by danielblack (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 04 Jun 2009 09:12:56 AM UTCjasStatusIn Progress=>Done
      Open/ClosedOpen=>Closed
    Thu 16 Apr 2009 11:34:43 PM UTCjasStatusNone=>In Progress
    Fri 09 Jan 2009 12:06:46 PM UTCjasAssigned toNone=>jas

    Back to the top


    Powered by Savane 3.1-cleanup