lysdr icon indicating copy to clipboard operation
lysdr copied to clipboard

still wouldn't build on Ubuntu 13.04

Open recri opened this issue 11 years ago • 2 comments

I don't know how you persuaded it to build to close the last issue, it stil crashes in link phase for me using 64bit 13.04 with:

[8/8] cprogram: build/lysdr.c.0.o build/sdr.c.0.o build/filter.c.0.o build/audio_jack.c.0.o build/gui.c.0.o build/smeter.c.0.o build/waterfall.c.0.o -> build/lysdr lysdr.c.0.o: In function main': lysdr.c:(.text+0x244): undefined reference tog_thread_supported' lysdr.c:(.text+0x257): undefined reference to g_thread_init' collect2: error: ld returned 1 exit status Waf: Leaving directory/common/common/Home/Sources/Radio/lysdr/build' Build failed -> task failed (exit status 1): {task 29087440: cprogram lysdr.c.0.o,sdr.c.0.o,filter.c.0.o,audio_jack.c.0.o,gui.c.0.o,smeter.c.0.o,waterfall.c.0.o -> lysdr}

['/usr/bin/gcc', 'lysdr.c.0.o', 'sdr.c.0.o', 'filter.c.0.o', 'audio_jack.c.0.o', 'gui.c.0.o', 'smeter.c.0.o', 'waterfall.c.0.o', '-o', '/common/common/Home/Sources/Radio/lysdr/build/lysdr', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-ljack', '-lfftw3', '-lm', '-pthread']

In any case, this is caused by using a deprecated glib threading API. After failing to figure out what include was missing, I simply removed the deprecated calls:

rec@elf12:~/Sources/Radio/lysdr$ git diff lysdr.c diff --git a/lysdr.c b/lysdr.c index 8655114..95f440e 100644 --- a/lysdr.c +++ b/lysdr.c @@ -107,9 +107,11 @@ int main(int argc, char *argv[]) {

printf("lysdr starting\n");

+#if 0 /* deprecated */ // get the Gtk threads support going if(!g_thread_supported()) g_thread_init(NULL); +#endif

gdk_threads_init();
gdk_threads_enter();

and all compiles and links without complaint.

recri avatar May 16 '13 17:05 recri

I suspect you've already done this, but did you do a ./waf clean, or check out a clean tree? Just wanting to double check...

kylegordon avatar May 20 '13 07:05 kylegordon

Ignore my last! Yes, it breaks. @gordonjcp are you happy with the provided fix?

kylegordon avatar May 20 '13 07:05 kylegordon