1 |
ssuominen 14/06/21 08:49:55 |
2 |
|
3 |
Added: vorbis-tools-1.4.0-underlinking.patch |
4 |
Log: |
5 |
Fix bug 513942 |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-sound/vorbis-tools/files/vorbis-tools-1.4.0-underlinking.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/vorbis-tools/files/vorbis-tools-1.4.0-underlinking.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/vorbis-tools/files/vorbis-tools-1.4.0-underlinking.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: vorbis-tools-1.4.0-underlinking.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/513942 |
18 |
|
19 |
Fix building with `./configure --enable-ogg123 --without-flac --without-speex --without-kate` and `make`: |
20 |
|
21 |
libtool: link: gcc -Wall -ffast-math -fsigned-char -O2 -pipe -march=native -Wl,-O1 -Wl,--hash-style=gnu -o oggenc oggenc.o audio.o encode.o platform.o resample.o skeleton.o -Wl,--as-needed ../share/libutf8.a ../share/libgetopt.a -lvorbisenc -lvorbis -logg |
22 |
resample.o:resample.c:function res_init: error: undefined reference to 'sin' |
23 |
collect2: error: ld returned 1 exit status |
24 |
|
25 |
libtool: link: gcc -Wall -ffast-math -fsigned-char -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o ogg123 audio.o buffer.o callbacks.o cfgfile_options.o cmdline_options.o file_transport.o format.o http_transport.o ogg123.o oggvorbis_format.o playlist.o status.o remote.o transport.o vorbis_comments.o vgfilter.o ../share/libutf8.a ../share/libgetopt.a -lvorbisfile -lvorbis -logg -lao -lnsl -lcurl -lpthread |
26 |
vgfilter.o:vgfilter.c:function vg_init: error: undefined reference to '__pow_finite' |
27 |
vgfilter.o:vgfilter.c:function vg_init: error: undefined reference to '__pow_finite' |
28 |
vgfilter.o:vgfilter.c:function vg_filter: error: undefined reference to 'tanh' |
29 |
vgfilter.o:vgfilter.c:function vg_filter: error: undefined reference to 'tanh' |
30 |
collect2: error: ld returned 1 exit status |
31 |
|
32 |
This is using the new GNU gold linker: |
33 |
|
34 |
$ ld -v |
35 |
GNU gold (GNU Binutils 2.24) 1.11 |
36 |
|
37 |
Happens because -lm gets appended to the libraries list only with, for example, --with-flac but vgfilter.c and resample.c are always |
38 |
using functions from the mathlib. |
39 |
|
40 |
Therefore, always link to mathlib: |
41 |
|
42 |
--- ogg123/Makefile.am |
43 |
+++ ogg123/Makefile.am |
44 |
@@ -30,7 +30,7 @@ |
45 |
ogg123_LDADD = @SHARE_LIBS@ \ |
46 |
@VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \ |
47 |
@SOCKET_LIBS@ @LIBICONV@ @CURL_LIBS@ @PTHREAD_CFLAGS@ \ |
48 |
- @PTHREAD_LIBS@ @I18N_LIBS@ @FLAC_LIBS@ @SPEEX_LIBS@ |
49 |
+ @PTHREAD_LIBS@ @I18N_LIBS@ @FLAC_LIBS@ @SPEEX_LIBS@ -lm |
50 |
|
51 |
ogg123_DEPENDENCIES = @SHARE_LIBS@ |
52 |
ogg123_SOURCES = audio.c buffer.c callbacks.c \ |
53 |
--- oggenc/Makefile.am |
54 |
+++ oggenc/Makefile.am |
55 |
@@ -23,7 +23,7 @@ |
56 |
|
57 |
oggenc_LDADD = @SHARE_LIBS@ \ |
58 |
@VORBISENC_LIBS@ @VORBIS_LIBS@ @KATE_LIBS@ @OGG_LIBS@ \ |
59 |
- @LIBICONV@ @I18N_LIBS@ @FLAC_LIBS@ |
60 |
+ @LIBICONV@ @I18N_LIBS@ @FLAC_LIBS@ -lm |
61 |
|
62 |
oggenc_DEPENDENCIES = @SHARE_LIBS@ |