aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.72k stars 280 forks source link

undefined reference to symbol 'tgetnum' - during compilation of vdhcoapp's lame in Gentoo #101

Closed sedimentation-fault closed 1 year ago

sedimentation-fault commented 3 years ago

/bin/sh ../libtool --tag=CC --mode=link gcc -O3 -ffast-math -funroll-loops -Wall -pipe -static -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o ../libmp3lame/libmp3lame.la -lncurses -lm libtool: link: gcc -O3 -ffast-math -funroll-loops -Wall -pipe -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o ../libmp3lame/.libs/libmp3lame.a -lncurses -lm /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: console.o: undefined reference to symbol 'tgetnum' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [Makefile:358: lame] Error 1 make[2]: Leaving directory '/usr/src/vdhcoapp-1.6.3/converter/src-build/linux/64/lame/frontend' make[1]: [Makefile:349: all-recursive] Error 1 make[1]: Leaving directory '/usr/src/vdhcoapp-1.6.3/converter/src-build/linux/64/lame' make: *** [Makefile:276: all] Error 2

Reason

It seems that if tinfo library is optionally built out from libncurses source tree, then it will contain parts of it, so it must be included in the linker command, otherwise some symbols will be missing. See here: https://sourceforge.net/p/lame/bugs/436/

There is also a patch there,

https://sourceforge.net/p/lame/bugs/_discuss/thread/89e5b2f5/4fdb/attachment/lame-3.99.5-tinfo.patch

but even though I managed to apply it, it does not resolve the issue (I guess because -lncurses is not enough and it needs -ltinfo too...). But I guess with this information you will be able to sort it out.

paulrouget commented 1 year ago

The new static build system of ffmpeg solves this issue.