Making all in examples make[2]: Entering directory '/var/tmp/portage/media-libs/libdc1394-2.2.1/work/libdc1394-2.2.1-abi_x86_64.amd64/examples' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/libdc1394-2.2.1/work/libdc1394-2.2.1/examples -I.. -I/var/tmp/portage/media-libs/libdc1394-2.2.1/work/libdc1394-2.2.1 -Wall -Wunused -std=gnu99 -O2 -pipe -march=native -frecord-gcc-switches -Wimplicit-function-declaration -c -o dc1394_reset_bus.o /var/tmp/portage/media-libs/libdc1394-2.2.1/work/libdc1394-2.2.1/examples/dc1394_reset_bus.c /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -Wall -Wunused -std=gnu99 -O2 -pipe -march=native -frecord-gcc-switches -Wimplicit-function-declaration -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o dc1394_reset_bus dc1394_reset_bus.o ../dc1394/libdc1394.la -lm libtool: link: x86_64-pc-linux-gnu-gcc -Wall -Wunused -std=gnu99 -O2 -pipe -march=native -frecord-gcc-switches -Wimplicit-function-declaration -Wl,-O1 -Wl,--hash-style=gnu -o .libs/dc1394_reset_bus dc1394_reset_bus.o -Wl,--as-needed ../dc1394/.libs/libdc1394.so -lraw1394 -lusb-1.0 -lm ../dc1394/.libs/libdc1394.so: error: undefined reference to 'pthread_join' ../dc1394/.libs/libdc1394.so: error: undefined reference to 'pthread_create' collect2: error: ld returned 1 exit status Makefile:585: recipe for target 'dc1394_reset_bus' failed make[2]: *** [dc1394_reset_bus] Error 1 make[2]: Leaving directory '/var/tmp/portage/media-libs/libdc1394-2.2.1/work/libdc1394-2.2.1-abi_x86_64.amd64/examples' Makefile:592: recipe for target 'all-recursive' failed
capture.c in dc1394/usb/ directory is using pthread, but never links to it --- libdc1394-2.2.1.orig/dc1394/usb/Makefile.am 2013-01-28 04:43:18.000000000 +0200 +++ libdc1394-2.2.1/dc1394/usb/Makefile.am 2014-06-20 15:44:07.852505248 +0300 @@ -8,7 +8,7 @@ endif AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/dc1394 $(LIBUSB_CFLAGS) -libdc1394_usb_la_LIBADD = $(LIBUSB_LIBS) +libdc1394_usb_la_LIBADD = $(LIBUSB_LIBS) -lpthread libdc1394_usb_la_SOURCES = \ control.c \ usb.h \
patch added to tree
for reference, this was with binutils's ld.gold, not ld.bfd, and using libusb-1.0.19 (which doesn't return -lpthread with pkg-config and --libs)