#9975: Update GnuTLS  and clean up the package
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |          Owner:  tbd         
       Type:  defect    |         Status:  needs_work  
   Priority:  major     |      Milestone:  sage-4.7.1  
  Component:  packages  |       Keywords:              
Work_issues:            |       Upstream:  N/A         
   Reviewer:            |         Author:  Mariah Lenox
     Merged:            |   Dependencies:              
------------------------+---------------------------------------------------

Comment(by leif):

 Replying to [comment:4 leif]:
 > The package apparently doesn't use (or even find) Sage's libgcrypt [...]

 Autocrap...

 According to `configure --help`, it also takes a `--with-libgcrypt-
 prefix=...` option, which -- sad enough -- requires in addition `--with-
 libgcrypt`, but apparently doesn't work (at least in `configure` itself to
 detect `libgcrypt`, as the corresponding `gcc` command for `conftest.c`
 doesn't have any `-I`s and `-L`s).

 Adding
 {{{
 #!sh
 CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
 CFLAGS="-I$SAGE_LOCAL/include $CFLAGS" # It's safer to add it here, too.
 LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS"
 }}}
 (which ''in general'' one should do to make sure Sage's version of
 whatsoever gets picked up first) cures this, at the same time making
 `--with-libgcrypt-prefix` superfluous.


 Regarding the test suite, I get nice warnings during compilation (''"cast
 to pointer from integer of different size"'') and the following:
 {{{
 ...
 All 34 tests passed
 ...
 All 50 tests passed
 (1 test was not run)
 ...
 vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x25 0xCA 0x48
 ==13210== valgrind: Unrecognised instruction at address 0x4e88206.
 ==13210== Your program just tried to execute an instruction that Valgrind
 ==13210== did not recognise.  There are two possible reasons for this.
 ==13210== 1. Your program has a bug and erroneously jumped to a non-code
 ==13210==    location.  If you are running Memcheck and you just saw a
 ==13210==    warning about a bad jump, it's probably your program's fault.
 ==13210== 2. The instruction is legitimate but Valgrind doesn't handle it,
 ==13210==    i.e. it's Valgrind's fault.  If you think this is the case or
 ==13210==    you are not sure, please let us know and we'll try to fix it.
 ==13210== Either way, Valgrind will now raise a SIGILL signal which will
 ==13210== probably kill your program.
 ==13210==
 ==13210== Process terminating with default action of signal 4 (SIGILL)
 ==13210==  Illegal opcode at address 0x4E88206
 ==13210==    at 0x4E88206: _gnutls_x509_time2gtime (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13210==    by 0x4E88DDE: _gnutls_x509_get_time (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13210==    by 0x4E99A55: gnutls_x509_crt_print (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13210==    by 0x400F79: doit (in
 /tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/tests/chainverify)
 ==13210==    by 0x401804: main (in
 /tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/tests/chainverify)
 /bin/bash: line 5: 13210 Illegal instruction
 PKCS12FILE=./pkcs12-decode/client.p12 PKCS12PASSWORD=foobar
 PKCS12FILE_2=./pkcs12-decode/pkcs12_2certs.p12 PKCS12PASSWORD_2="" EXEEXT=
 srcdir="." valgrind -q ${dir}$tst
 FAIL: chainverify
 ...
 vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x25 0xCA 0x48
 ==13258== valgrind: Unrecognised instruction at address 0x4e88206.
 ==13258== Your program just tried to execute an instruction that Valgrind
 ==13258== did not recognise.  There are two possible reasons for this.
 ==13258== 1. Your program has a bug and erroneously jumped to a non-code
 ==13258==    location.  If you are running Memcheck and you just saw a
 ==13258==    warning about a bad jump, it's probably your program's fault.
 ==13258== 2. The instruction is legitimate but Valgrind doesn't handle it,
 ==13258==    i.e. it's Valgrind's fault.  If you think this is the case or
 ==13258==    you are not sure, please let us know and we'll try to fix it.
 ==13258== Either way, Valgrind will now raise a SIGILL signal which will
 ==13258== probably kill your program.
 ==13258==
 ==13258== Process terminating with default action of signal 4 (SIGILL)
 ==13258==  Illegal opcode at address 0x4E88206
 ==13258==    at 0x4E88206: _gnutls_x509_time2gtime (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13258==    by 0x4E88DDE: _gnutls_x509_get_time (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13258==    by 0x4E99A55: gnutls_x509_crt_print (in
 
/tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/lib/.libs/libgnutls.so.26.18.11)
 ==13258==    by 0x400BB1: doit (in
 /tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/tests/dn2)
 ==13258==    by 0x401164: main (in
 /tmp/Sage/sage-4.7.1.rc0-8664/spkg/build/gnutls-2.12.3/src/tests/dn2)
 /bin/bash: line 5: 13258 Illegal instruction
 PKCS12FILE=./pkcs12-decode/client.p12 PKCS12PASSWORD=foobar
 PKCS12FILE_2=./pkcs12-decode/pkcs12_2certs.p12 PKCS12PASSWORD_2="" EXEEXT=
 srcdir="." valgrind -q ${dir}$tst
 FAIL: dn2
 ...
 2 of 44 tests failed
 Please report to [email protected]
 ...
 make: *** [check-recursive] Error 1
 An error occurred while testing GnuTLS
 *************************************
 Error testing package ** gnutls-2.12.3 **
 *************************************
 sage: An error occurred while testing gnutls-2.12.3
 ...
 }}}
 Haven't yet inspected that further. (This is with GCC 4.5.1 on a Core2,
 using `-march=native`).


 Btw., the attached spkg diff is not current.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9975#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to