gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnutls] gnutls-2.8.6 build comments


From: Nelson H. F. Beebe
Subject: [bug-gnutls] gnutls-2.8.6 build comments
Date: Fri, 30 Apr 2010 08:33:30 -0600 (MDT)

A build attempt for gnutls-2.8.6 fails on Red Hat 4 AMD64 for two
reasons: incorrect handling of libraries at configure time, and a C++
error in the doc/examples/ex-cxx.cpp file.

The library problem arises because the gnutls configure script erroneously
inserts explicit paths to shared libraries, instead of relying on the normal
shared library search mechanism, and the setting of LDFLAGS.

On both Red Hat and OpenSuSE GNU/Linux on AMD64, the default world is a 64-bit
one, and 64-bit libraries go into /usr/lib64 and /usr/local/lib64.  The /usr/lib
and /usr/local/lib directories are reserved for 32-bit libraries.  
Unfortunately,
the configure puts /usr/local/lib in front of shared library names.

I was able to resolve that problem by temporarily renaming several shared
and static libraries in /usr/local/lib, but that was possible only because
the system on which I did that is a single-user machine over which I have
complete control; it would not be possible on most of our GNU/Linux systems
that are accessible to thousands of our users.

Recommendation: do not insert explicit directory paths for libraries, but
instead, use the LDFLAGS settings to guide the loader to their proper location.

With the above changes, I was able to get most of the compilations to succeed,
but I'm stymied by a C++ compilation error in doc/examples/ex-cxx.cpp.  I have
dozens of versions of the gcc family installed in my environment, and I tried
g++ (4.3.0 20070209), g++-4.3.4, g++-4.4.1, g++-4.5.0, and g++-4.6.0, each
time doing the build in a clean freshly-unpacked gnutls-2.8.6 directory.

Here is an example of the failures that I see:

libtool: link: g++-4.6 -g -O2 -Wl,-rpath -Wl,/usr/local/lib64 -o
        ex-cxx ex-cxx.o -L/usr/local/lib64 ./.libs/libexamples.a
        ../../lib/.libs/libgnutls.so
        ../../libextra/.libs/libgnutls-extra.so
        ../../gl/.libs/libgnu.a ../../lib/.libs/libgnutlsxx.so
        -Wl,-rpath -Wl,/local/build/bare/gnutls-2.8.6/lib/.libs
        -Wl,-rpath -Wl,/local/build/bare/gnutls-2.8.6/libextra/.libs
        -Wl,-rpath -Wl,/usr/local/lib

ex-cxx.o(.text+0xa9): In function `main':

/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:513:
        undefined reference to `std::basic_ostream<char,
        std::char_traits<char> >& std::__ostream_insert<char,
        std::char_traits<char> >(std::basic_ostream<char,
        std::char_traits<char> >&, char const*, long)'

ex-cxx.o(.text+0x135):/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:513:
        undefined reference to `std::basic_ostream<char,
        std::char_traits<char> >& std::__ostream_insert<char,
        std::char_traits<char> >(std::basic_ostream<char,
        std::char_traits<char> >&, char const*, long)'

ex-cxx.o(.text+0x157):/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:513:
        undefined reference to `std::basic_ostream<char,
        std::char_traits<char> >& std::__ostream_insert<char,
        std::char_traits<char> >(std::basic_ostream<char,
        std::char_traits<char> >&, char const*, long)'

ex-cxx.o(.text+0x25c): In function `main':

/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/locale_facets.h:868:
        undefined reference to `std::ctype<char>::_M_widen_init()
        const'

ex-cxx.o(.text+0x2bc): In function `main':

/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/basic_string.h:232:
        undefined reference to `std::basic_string<char,
        std::char_traits<char>, std::allocator<char>
        >::_Rep::_S_empty_rep_storage'

ex-cxx.o(.text+0x324):/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/basic_string.h:232:
        undefined reference to `std::basic_string<char,
        std::char_traits<char>, std::allocator<char>
        >::_Rep::_S_empty_rep_storage'

ex-cxx.o(.text+0x344): In function `main':

/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/locale_facets.h:868:
        undefined reference to `std::ctype<char>::_M_widen_init()
        const'

ex-cxx.o(.text+0x364):/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/locale_facets.h:868:
        undefined reference to `std::ctype<char>::_M_widen_init()
        const'

ex-cxx.o(.text+0x3c9): In function `main':

/usr/local/ashare/x86_64-linux/gcc-4.6-20100416/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/basic_string.h:232:
        undefined reference to `std::basic_string<char,
        std::char_traits<char>, std::allocator<char>
        >::_Rep::_S_empty_rep_storage'

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]