Ticket #249 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

FTBFS with binutils-gold

Reported by: adi Assigned to:
Priority: minor Milestone: FFADO 2.1
Component: Version: FFADO 2.0.0
Keywords: Cc:
The device the bug applies to:

Description

Copied from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555176

Tried to build your package and it fails to build with GNU binutils-gold. The important difference is that --no-add-needed is the default behavior of of GNU binutils-gold. Please provide all needed libraries to the linker when building your executables.

It is propably better in your case that libffado.so gets linked against the needed libraries to fix that problem. You can use --no-undefined (or respective -Wl,--no-undefined when linking with g++ or gcc) to check your libraries if they still have symbols which doesn't get resolved by them.

dpkg-shlibdeps will also print warnings about unresolved symbols when it gets run in your debian/rules.

More informations can be found at

http://wiki.debian.org/qa.debian.org/FTBFS#A2009-11-02Packagesfailingbecausebinutils-gold.2BAC8-indirectlinking

g++ -o support/firmware/ffado-bridgeco-downloader support/firmware/downloader.o \
  support/firmware/bridgeco-downloader.o -Lsrc -lffado -lexpat -lm -lrt \
-liec61883 -lraw1394 -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 \
-lglib-2.0
/usr/bin/ld: src/libffado.so: error: undefined reference to 'sem_post'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_mutex_trylock'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'sem_init'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_create'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'sem_wait'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_join'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'sem_destroy'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_testcancel'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_cancel'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'sem_timedwait'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_mutexattr_init'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_mutexattr_settype'
/usr/bin/ld: src/libffado.so: error: undefined reference to 'pthread_mutexattr_destroy'
collect2: ld returned 1 exit status
scons: *** [support/firmware/ffado-bridgeco-downloader] Error 1

Attachments

binutils-fix.patch (1.8 kB) - added by adi on 01/04/10 07:34:38.
Apply this patch to make binutils-gold work on ffado

Change History

01/04/10 07:34:38 changed by adi

  • attachment binutils-fix.patch added.

Apply this patch to make binutils-gold work on ffado

01/04/10 07:37:19 changed by adi

I've added a patch against trunk. It fixes the bug for me.

To ease reproducing it:

$ export LDFLAGS="-Wl,--no-add-needed
$ scons

This should fail. After applying the patch, it must not fail anymore.

The patch does not affect non-binutils-gold LDs, so it's save to apply.

HTH

01/04/10 08:31:31 changed by arnonym

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r1777 and r1778 in trunk and 2.0-branch.