[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnutls-dev
Subject:    [bug-gnutls] gnutls-2.8.6 build comments
From:       "Nelson H. F. Beebe" <beebe () math ! utah ! edu>
Date:       2010-04-30 14:33:30
Message-ID: CMM.0.94.0.1272638010.beebe () sunburst ! math ! utah ! edu
[Download RAW message or body]

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/x \
86_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/x \
86_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: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gnutls-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic