Bug 15158

Summary: Incorrect libfame-config --libs output
Product: Sisyphus Reporter: Konstantin A Lepikhov (L.A. Kostis) <lakostis>
Component: libfameAssignee: Valery Inozemtsev <shrek>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: shrek
Version: unstableKeywords: relnote
Hardware: all   
OS: Linux   

Description Konstantin A Lepikhov (L.A. Kostis) 2008-03-30 18:02:58 MSD
[builder@lks ~]$ rpm -q libfame-devel
libfame-devel-0.9.1-alt3

[builder@lks SPECS]$ libfame-config --libs
-Wl,-rpath, -lfame

По логике, вывод должен быть вида -L/usr/lib -lfame, т.к. какой смысл передавать
пустой rpath в .la, если это сразу же сломает сборку программ, зависимых от этой
библиотеки. Например, export_fame.so из transcode:

/bin/sh ../libtool --tag=CC   --mode=compile i586-alt-linux-gcc -DHAVE_CONFIG_H
-I. -I..  -D_REENTRANT -DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src
-I../import -I../libac3 -I../avilib  -I/usr/include -I../libvo -I../libioaux
-I../libxio  -I/usr/include -I/usr/include/lqt -I/usr/include/mjpegtools
-I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex  
-I/usr/include -I/usr/include    -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Wall -O2 -march=i586 -mtune=i686 -c -o
export_fame.lo export_fame.c
 i586-alt-linux-gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT
-DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src -I../import -I../libac3
-I../avilib -I/usr/include -I../libvo -I../libioaux -I../libxio -I/usr/include
-I/usr/include/lqt -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc
-I/usr/include/mjpegtools/mplex -I/usr/include -I/usr/include -Wall
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -O2
-march=i586 -mtune=i686 -c export_fame.c  -fPIC -DPIC -o .libs/export_fame.o
export_fame.c: In function 'read_stats':
export_fame.c:70: warning: dereferencing type-punned pointer will break
strict-aliasing rules
export_fame.c:64: warning: ignoring return value of 'fscanf', declared with
attribute warn_unused_result
export_fame.c: In function 'export_fame_init':
export_fame.c:213: warning: ignoring return value of 'fscanf', declared with
attribute warn_unused_result
export_fame.c: In function 'export_fame_encode':
export_fame.c:266: warning: pointer targets in assignment differ in signedness
export_fame.c:290: warning: pointer targets in passing argument 2 of
'AVI_write_frame' differ in signedness
/bin/sh ../libtool --tag=CC   --mode=link i586-alt-linux-gcc  -Wall
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -O2
-march=i586 -mtune=i686 -module -avoid-version  -o export_fame.la -rpath
/usr/lib/transcode export_fame.lo aud_aux.lo -L/usr/lib -lmp3lame  -lfame
-Wl,-rpath, ../libac3/libac3_tc.la -L/usr/lib -lavcodec -lavcodec -lavutil -lm
-lz -ldl 
i586-alt-linux-gcc -shared  .libs/export_fame.o .libs/aud_aux.o
-Wl,--whole-archive ../libac3/.libs/libac3_tc.a -Wl,--no-whole-archive 
-L/usr/lib -lmp3lame -lfame -lavcodec -lavutil -lm -lz -ldl  -march=i586
-mtune=i686 -Wl,-rpath -Wl,-soname -Wl,export_fame.so -o .libs/export_fame.so
/usr/bin/ld: export_fame.so: No such file: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [export_fame.la] Error 1
make[2]: Leaving directory `/usr/src/RPM/BUILD/transcode-1.0.5/export'

С исправленным --libs на -L/usr/lib -lfame:

$ make export_fame.la
/bin/sh ../libtool --tag=CC   --mode=compile i586-alt-linux-gcc -DHAVE_CONFIG_H
-I. -I..  -D_REENTRANT -DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src
-I../import -I../libac3 -I../avilib  -I/usr/include -I../libvo -I../libioaux
-I../libxio  -I/usr/include -I/usr/include/lqt -I/usr/include/mjpegtools
-I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex  
-I/usr/include -I/usr/include    -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Wall -O2 -march=i586 -mtune=i686 -c -o
export_fame.lo export_fame.c
mkdir .libs
 i586-alt-linux-gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT
-DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src -I../import -I../libac3
-I../avilib -I/usr/include -I../libvo -I../libioaux -I../libxio -I/usr/include
-I/usr/include/lqt -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc
-I/usr/include/mjpegtools/mplex -I/usr/include -I/usr/include -Wall
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -O2
-march=i586 -mtune=i686 -c export_fame.c  -fPIC -DPIC -o .libs/export_fame.o
export_fame.c: In function 'read_stats':
export_fame.c:70: warning: dereferencing type-punned pointer will break
strict-aliasing rules
export_fame.c:64: warning: ignoring return value of 'fscanf', declared with
attribute warn_unused_result
export_fame.c: In function 'export_fame_init':
export_fame.c:213: warning: ignoring return value of 'fscanf', declared with
attribute warn_unused_result
export_fame.c: In function 'export_fame_encode':
export_fame.c:266: warning: pointer targets in assignment differ in signedness
export_fame.c:290: warning: pointer targets in passing argument 2 of
'AVI_write_frame' differ in signedness
/bin/sh ../libtool --tag=CC   --mode=compile i586-alt-linux-gcc -DHAVE_CONFIG_H
-I. -I..  -D_REENTRANT -DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src
-I../import -I../libac3 -I../avilib  -I/usr/include -I../libvo -I../libioaux
-I../libxio  -I/usr/include -I/usr/include/lqt -I/usr/include/mjpegtools
-I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex  
-I/usr/include -I/usr/include    -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Wall -O2 -march=i586 -mtune=i686 -c -o aud_aux.lo
aud_aux.c
 i586-alt-linux-gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT
-DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src -I../import -I../libac3
-I../avilib -I/usr/include -I../libvo -I../libioaux -I../libxio -I/usr/include
-I/usr/include/lqt -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc
-I/usr/include/mjpegtools/mplex -I/usr/include -I/usr/include -Wall
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -O2
-march=i586 -mtune=i686 -c aud_aux.c  -fPIC -DPIC -o .libs/aud_aux.o
aud_aux.c: In function 'audio_encode_mp3':
aud_aux.c:805: warning: pointer targets in passing argument 5 of
'lame_encode_buffer' differ in signedness
aud_aux.c:812: warning: pointer targets in passing argument 4 of
'lame_encode_buffer_interleaved' differ in signedness
aud_aux.c:853: warning: pointer targets in passing argument 1 of
'tc_get_mp3_header' differ in signedness
aud_aux.c: In function 'audio_close':
aud_aux.c:1062: warning: pointer targets in passing argument 2 of
'lame_encode_flush' differ in signedness
/bin/sh ../libtool --tag=CC   --mode=link i586-alt-linux-gcc  -Wall
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -O2
-march=i586 -mtune=i686 -module -avoid-version  -o export_fame.la -rpath
/usr/lib/transcode export_fame.lo aud_aux.lo -L/usr/lib -lmp3lame  -L/usr/lib
-lfame ../libac3/libac3_tc.la -L/usr/lib -lavcodec -lavcodec -lavutil -lm -lz -ldl 
i586-alt-linux-gcc -shared  .libs/export_fame.o .libs/aud_aux.o
-Wl,--whole-archive ../libac3/.libs/libac3_tc.a -Wl,--no-whole-archive 
-L/usr/lib -lmp3lame -lfame -lavcodec -lavutil -lm -lz -ldl  -march=i586
-mtune=i686 -Wl,-soname -Wl,export_fame.so -o .libs/export_fame.so
creating export_fame.la
(cd .libs && rm -f export_fame.la && ln -s ../export_fame.la export_fame.la)
Steps to Reproduce:
1. apt-get source transcode
2. hsh transcode..src.rpm
3. ...
Actual Results:  
make failed on export_fame.la target.

Expected Results:  
src.rpm must pass the rebuild/make target export_fame.la successfully.
Comment 1 Valery Inozemtsev 2008-10-27 23:35:39 MSK
libfame-0.9.1-alt4