Bug 3674

Summary: libdca fails to build under rawhide
Product: Fedora Reporter: Marcin Juszkiewicz <mjuszkiewicz>
Component: libdcaAssignee: Dominik 'Rathann' Mierzejewski <dominik>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: unspecified   
Hardware: All   
OS: GNU/Linux   
namespace:

Description Marcin Juszkiewicz 2015-05-28 10:47:48 CEST
libdca fails with this under rawhide:

DIE_RPATH_DIE="/usr/lib64:$DIE_RPATH_DIE" gcc -Wall -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -O3 -fomit-frame-pointer -Wl,-z -Wl,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o .libs/dcadec dcadec.o getopt.o gettimeofday.o  ../libdca/.libs/libdca.so ../libao/.libs/libao.a
dcadec.o: In function `handle_args':
/builddir/build/BUILD/libdca-0.0.5/src/dcadec.c:220: undefined reference to `pow'
../libao/.libs/libao.a(audio_out_peak.o): In function `peak_close':
/builddir/build/BUILD/libdca-0.0.5/libao/audio_out_peak.c:57: undefined reference to `log'
../libdca/.libs/libdca.so: undefined reference to `sin'
../libdca/.libs/libdca.so: undefined reference to `cos'
collect2: error: ld returned 1 exit status
Makefile:256: recipe for target 'dcadec' failed
make[2]: Leaving directory '/builddir/build/BUILD/libdca-0.0.5/src'
make[2]: *** [dcadec] Error 1
Making all in test


Why? Because of this:

configure:18962: checking for cos in -lm
configure:18997: gcc -o conftest   -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c -lm   >&5
conftest.c:27:6: warning: conflicting types for built-in function 'cos'
 char cos ();
      ^
/usr/bin/ld: /tmp/ccWZshHb.o: relocation R_X86_64_PC32 against undefined symbol `cos@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status


Quick workaround I used was adding LIBS="-lm" to make call.
Comment 1 Nicolas Chauvet 2015-05-28 14:44:57 CEST
Fixed in cvs devel building for f22-free