Skip to contentSkip to conversation

Fix DSO linking

PATCH In review Bastien Nocera 2 participants 2 messages Feb 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix DSO linking

We need to link explicitly against libm, to avoid the error mentioned in the patch.

Cheers

Quoted 1 line

From 6447181296e56e20c6b504978477d24cc55655e9 Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Mon, 15 Feb 2010 10:41:40 +0000
Subject: [PATCH] Fix DSO linking

Explicitely link against libm, to avoid linking problems:
CCLD sbc/sbctester
/usr/bin/ld: sbc/sbctester.o: undefined reference to symbol 'sqrt@@GLIBC_2.2.5'
/usr/bin/ld: note: 'sqrt@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation

https://bugzilla.redhat.com/show_bug.cgi?id=564799

---
 Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.am +1 -1
index 584b921..fc7b2c0 100644
@@ -81,7 +81,7 @@ sbc_sbcenc_LDADD = sbc/libsbc.la
 if SNDFILE
 noinst_PROGRAMS += sbc/sbctester
 
-sbc_sbctester_LDADD = @SNDFILE_LIBS@
+sbc_sbctester_LDADD = @SNDFILE_LIBS@ -lm
 sbc_sbctest_CFLAGS = @SNDFILE_CFLAGS@
 endif
 endif
Signature · 1 line
1.6.6
maintainer
#1 lore raw

Hi Bastien,

Quoted 2 lines

We need to link explicitly against libm, to avoid the error mentioned in the patch.

patch has been applied. Thanks.

Regards

Marcel