[libcamera-devel] [PATCH] test: threads: Fix link failure due to missing dependency

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Oct 5 14:22:25 CEST 2022


Hi Quentin,

On Wed, Oct 05, 2022 at 01:29:05PM +0200, Quentin Schulz wrote:
> On 10/5/22 12:56, Laurent Pinchart via libcamera-devel wrote:
> > Commit 036d26d6677e ("test: threads: Test thread cleanup upon abnormal
> > termination") added calls to functions provided by the pthread library
> > in the threads test, but didn't add the corresponding dependency. This
> > caused a link breakage on some platforms:
> > 
> > /usr/bin/ld: test/threads.p/threads.cpp.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.4'
> > /usr/bin/ld: /lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
> > collect2: error: ld returned 1 exit status
> > 
> > Fix it by adding the missing dependency.
> 
> Shouldn't the README.rst be updated to add this hard dependency too?

libpthread is part of glibc these days, I think we can rely on that
being present :-)

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list