[gnutls-dev] Makefile fix for 1.7.2

Simon Josefsson simon at josefsson.org
Tue Jan 16 17:07:11 CET 2007


ludovic.courtes at laas.fr (Ludovic Courtès) writes:

> Hi,
>
> Simon Josefsson <simon at josefsson.org> writes:
>
>> ludovic.courtes at laas.fr (Ludovic Courtès) writes:
>
>>> Below is a tiny Makefile fix (without it, I get an undefined reference
>>> to `read_binary_file ()' when building the libgnutls-extra-dependent
>>> programs).
>>
>> I can't reproduce this:
>>
>> http://autobuild.josefsson.org/gnutls/log-200701160143145770000.txt
>>
>> Which platform are you on?  I actually got errors about double
>> definitions when I linked to both libraries -- libgnu.la does link to
>> liblgnu.la.  This was changed recently though, maybe you need to 'make
>> distclean' or similar?
>
> I'm using Debian GNU/Linux (sid).  `libgnutls-extra' is linked against
> `libgnutls' which does include `liblgnu' (and `read_binary_file ()').
> However, `libgnutls' does not export `read_binary_file ()':
>
>   $ objdump -T lib/.libs/libgnutls.so | grep read_binary_file
>   [ nothing ]
>
> Thus, it seems "logical" to me to also link `libgnutls-extra' against
> `liblgnu'.  Now, I can imagine that this might fail on some other
> platform...

Yeah, but libgnutls-extra should be linked to libgnu:

libgnutls_extra_la_LIBADD += ../gl/libgnu.la ../lib/libgnutls.la

And libgnu should be linked to liblgnu:

libgnu_la_LIBADD += ../lgl/liblgnu.la

And libgnu seem to contain read_binary_file:

jas at mocca:~/src/gnutls$ objdump -t gl/.libs/libgnu.a | grep read_binary_file
000001f8 g     F .text  00000034 read_binary_file
jas at mocca:~/src/gnutls$

So libgnutls-extra should pick it up.  But you'll have to re-link
libgnu if you don't build from a clean directory.

/Simon



More information about the Gnutls-dev mailing list