#7387: gnutls not building on OpenSolaris (x86)
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: new
Priority: major | Milestone: sage-4.2.1
Component: solaris | Keywords:
Work_issues: | Author:
Reviewer: | Merged:
------------------------+---------------------------------------------------
There is an issue with the gnutls when trying to build 2
.2.1.p4 on OpenSolaris. Strangely, the same problem does not occur on
Solaris 10 on SPARC. The linker is finding two copies of the ''gcrypt''
and ''gpg-error'' libraries. One set are from Sun and reside in /usr/lib
and the second set are in the SAGE_LOCAL/lib, and are included in Sage.
== What does work - building gnutils independent of Sage ==
It's important to note that if that .spkg file is built outside of Sage
directory structure, with none of the Sage environment variables set, so
it builds fine except SAGE_LOCAL to something that is not empty (just to
stop the spkg-install script exiting). The following will work:
{{{
$ cp gnutls-2.2.1.p4.spkg /tmp
$ cd /tmp
$ gtar xfj gnutls-2.2.1.p4.spkg
$ cd gnutls-2.2.1.p4
$ export SAGE_LOCAL=/tmp
$ ./spkg-install
$ ls /tmp/lib
libgnutls-extra.la libgnutls-openssl.so.26
libgnutls-extra.so libgnutls-openssl.so.26.1.2
libgnutls-extra.so.26 libgnutls.so
libgnutls-extra.so.26.1.2 libgnutls.so.26
libgnutls.la libgnutls.so.26.1.2
libgnutls-openssl.la pkgconfig
libgnutls-openssl.so
}}}
In this case, gnutls is using all the libraries supplied by Sun, and none
included in Sage. If 'ldd' is used to find the dependances of the
libraries built in /tmp/lib, one finds many libraries, but which include
these two:
* /usr/lib/libgcrypt.so.11
* /usr/lib/libgpg-error.so.0
The gcrypt and gpg-error libraries are included in Sage too, but are not
used in this in the above example.
== What will not work (building as part of Sage) ==
When one attempts to build gnutls inside the Sage source tree, with all
the environment variables set, so it all goes wrong. The lines in bold
show the most important hint as to what is wrong.
'''ld: fatal: recording name conflict: file
`/export/home/drkirkby/sage-4.2/local/lib/libgpg-error.so' and file
`/usr/lib/libgpg-error.so' provide identical dependency names: libgpg-
error.so.0 (possible multiple inclusion of the same file)'''
Here is a larger section of the error message. I've attached 'config.log'
{{{
gcc -std=gnu99 -shared -Wl,-h -Wl,libgnutls.so.26 -o
.libs/libgnutls.so.26.1.2
.libs/gnutls_record.o .libs/gnutls_compress.o .libs/debug.o
.libs/gnutls_cip
her.o .libs/gnutls_buffers.o .libs/gnutls_handshake.o .libs/gnutls_num.o
.libs
/gnutls_errors.o .libs/gnutls_algorithms.o .libs/gnutls_dh.o
.libs/gnutls_kx.o
.libs/gnutls_priority.o .libs/gnutls_hash_int.o .libs/gnutls_cipher_int.o
.li
bs/gnutls_compress_int.o .libs/gnutls_session.o .libs/gnutls_db.o
.libs/x509_b
64.o .libs/auth_anon.o .libs/gnutls_extensions.o .libs/gnutls_auth.o
.libs/gnu
tls_v2_compat.o .libs/gnutls_datum.o .libs/auth_rsa.o
.libs/gnutls_session_pac
k.o .libs/gnutls_mpi.o .libs/gnutls_pk.o .libs/gnutls_cert.o
.libs/gnutls_glob
al.o .libs/gnutls_constate.o .libs/gnutls_anon_cred.o
.libs/pkix_asn1_tab.o .l
ibs/gnutls_asn1_tab.o .libs/gnutls_mem.o .libs/auth_cert.o
.libs/gnutls_ui.o .
libs/gnutls_sig.o .libs/auth_dhe.o .libs/gnutls_dh_primes.o
.libs/ext_max_reco
rd.o .libs/gnutls_alert.o .libs/gnutls_str.o .libs/gnutls_state.o
.libs/gnutls
_x509.o .libs/ext_cert_type.o .libs/gnutls_rsa_export.o
.libs/auth_rsa_export.
o .libs/ext_server_name.o .libs/auth_dh_common.o .libs/gnutls_helper.o
.libs/e
xt_inner_application.o .libs/gnutls_extra_hooks.o
.libs/gnutls_supplemental.o
.libs/ext_srp.o .libs/gnutls_srp.o .libs/auth_srp.o
.libs/auth_srp_passwd.o .l
ibs/auth_srp_sb64.o .libs/auth_srp_rsa.o .libs/auth_psk.o
.libs/auth_psk_passw
d.o .libs/gnutls_psk.o .libs/auth_dhe_psk.o -Wl,-z -Wl,allextract
../lgl/.libs
/liblgnu.a x509/.libs/libgnutls_x509.a -Wl,-z -Wl,defaultextract
-R/export/ho
me/drkirkby/sage-4.2/local/lib -R/export/home/drkirkby/sage-4.2/local/lib
-L/u
sr/lib -ltasn1 -L/export/home/drkirkby/sage-4.2/local/lib
/export/home/drkirkb
y/sage-4.2/local/lib/libgcrypt.so
/export/home/drkirkby/sage-4.2/local/lib/lib
gpg-error.so -lz -lgcrypt -lgpg-error -lnsl -lsocket -lc
ld: fatal: recording name conflict: file
`/export/home/drkirkby/sage-4.2/local
/lib/libgcrypt.so' and file `/usr/lib/libgcrypt.so' provide identical
dependen
cy names: libgcrypt.so.11 (possible multiple inclusion of the same file)
ld: fatal: recording name conflict: file
`/export/home/drkirkby/sage-4.2/local
/lib/libgpg-error.so' and file `/usr/lib/libgpg-error.so' provide
identical de
pendency names: libgpg-error.so.0 (possible multiple inclusion of the
same fi
le)
ld: fatal: file processing errors. No output written to
.libs/libgnutls.so.26.
1.2
collect2: ld returned 1 exit status
make[5]: *** [libgnutls.la] Error 1
make[5]: Leaving directory
`/export/home/drkirkby/sage-4.2/spkg/build/gnutls-2
.2.1.p4/src/lib'
}}}
== A hack that will work ==
I expect this would cause other problems, and is certainly not the right
way to address this, but if the following files are removed
* SAGE_LOCAL/include/gcrypt-module.h
* SAGE_LOCAL/include/gpg-error.h
* SAGE_LOCAL/include/gcrypt.h
* SAGE_LOCAL/lib/libgcrypt*
* SAGE_LOCAL/lib/libgpg*
before one attempts to build gnutls, so the build will work.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7387>
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
-~----------~----~----~----~------~----~------~--~---