Your message dated Wed, 15 Nov 2006 22:03:19 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#394153: Fwd: Bug#394153: twinkle: FTBFS: undefined 
reference to gsm_decode
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: twinkle
Version: 1:0.9-2
Severity: serious

Hi,

Your package is failing to build (on amd64) with the following error:
g++  -g -Wall -O2 -D_GNU_SOURCE -L /usr/lib  -o twinkle  main.o libtwinkle.a 
../src/parser/libsipparser.a ../src/sdp/libsdpparser.a 
../src/sockets/libsocket.a ../src/threads/libthread.a ../src/audio/libaudio.a 
../src/audits/libaudits.a ../src/stun/libstun.a -pthread -lccrtp1 -lccgnu2 -ldl 
-lrt   -lboost_regex -lzrtpcpp -lspeex -lasound -lgsm -lsndfile  -L/usr/lib 
-lccext2 -lccgnu2 -lz -ldl -lrt -pthread -lresolv -lsndfile -lboost_regex 
-lboost_regex -lzrtpcpp -lspeex -lasound -lgsm -lsndfile  -L/usr/lib -lccext2 
-lccgnu2 -lz -ldl -lrt -pthread
../src/audio/libaudio.a(audio_decoder.o): In function `t_gsm_audio_decoder::dec
ode(unsigned char*, unsigned short, short*, unsigned short)':
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:152: undefined reference
to `gsm_decode(gsm_state*, unsigned char*, short*)'
../src/audio/libaudio.a(audio_decoder.o): In function `~t_gsm_audio_decoder':
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:140: undefined reference
to `gsm_destroy(gsm_state*)'
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:140: undefined reference
to `gsm_destroy(gsm_state*)'
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:140: undefined reference
to `gsm_destroy(gsm_state*)'
../src/audio/libaudio.a(audio_decoder.o): In function `t_gsm_audio_decoder':
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:136: undefined reference
to `gsm_create()'
/build/buildd/twinkle-0.9/src/audio/audio_decoder.cpp:136: undefined reference
to `gsm_create()'
../src/audio/libaudio.a(audio_encoder.o): In function `t_gsm_audio_encoder::enc
ode(short*, unsigned short, unsigned char*, unsigned short, bool&)':
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:140: undefined reference
to `gsm_encode(gsm_state*, short*, unsigned char*)'
../src/audio/libaudio.a(audio_encoder.o): In function `~t_gsm_audio_encoder':
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:132: undefined reference
to `gsm_destroy(gsm_state*)'
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:132: undefined reference
to `gsm_destroy(gsm_state*)'
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:132: undefined reference
to `gsm_destroy(gsm_state*)'
../src/audio/libaudio.a(audio_encoder.o): In function `t_gsm_audio_encoder':
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:128: undefined reference
to `gsm_create()'
/build/buildd/twinkle-0.9/src/audio/audio_encoder.cpp:128: undefined reference
to `gsm_create()'
collect2: ld returned 1 exit status


This looks like it's expecting C++ linkage, but it's a C library.  It
shouldn't have the complete prototype for the function for a C library.


Kurt



--- End Message ---
--- Begin Message ---
On Wed, Nov 15, 2006 at 11:11:31AM +0000, Mark Purcell wrote:
> On Wednesday 15 November 2006 03:35, Julien Cristau wrote:
> > clone 394153 -1
> > reassign -1 libgsm
> > retitle -1 please add extern "C" declaration for use in c++ programs

> Julien, Kurt,

> libgsm1 does have an extern "C" declaration:

> /usr/include/gsm.h
> [...]
> #ifdef __cplusplus
> extern "C" {
> #endif

> I'm not sure why this is occurring...

Sure enough, this isn't a bug in libgsm.

#ifdef HAVE_GSM
#include <gsm/gsm.h>
#else
#include "gsm/inc/gsm.h"
#endif

this is the code in audio_encoder.h, and the HAVE_GSM check is failing --
which means the build is using a local copy of gsm in the src/audio/gsm
directory (bad) and the build is failing as a result (good :).

I don't know yet why this define isn't propagating; it seems to be part of
debian/patches/libgsm.patch though, and there's probably a race condition in
the autotools handling that's preventing it from getting where it needs to
be.  In a rebuild test on amd64, config.log looks right to me, yet it's not
*consistently* ending up in the generated src/twinkle_config.h, because
there's a race condition with whether src/twinkle_config.h gets regenerated
after autoheader is run.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/

--- End Message ---

Reply via email to