[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to force linking to an archive?

From: Jeffrey Walton
Subject: How to force linking to an archive?
Date: Thu, 21 Nov 2013 09:26:11 -0500

I'm trying to evaluate a third party library based on autotools. The
evaluation includes some basic dynamic analysis using Clang 3.3 (the
analysis is provided by the sanitzers).

`make check` is failing due to missing symbols:

libjpeg.a(jmemmgr.o): In function `do_sarray_io':
/home/jwalton/Desktop/jpeg-6b/jmemmgr.c:695: undefined reference to
/home/jwalton/Desktop/jpeg-6b/jmemmgr.c:695: undefined reference to
/home/jwalton/Desktop/jpeg-6b/jmemmgr.c:696: undefined reference to

However, I'm including the required clang library through LDLIBS:

export LDLIBS="/usr/local/lib/clang/lib/linux/3.3/libclang_rt.full-x86_64.a
export CC=/usr/local/bin/clang
export CXX=/usr/local/bin/clang++
export CFLAGS="-g3 -fsanitize=address -fsanitize=undefined"
export CXXFLAGS="-g3 -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr"

The missing functions are part of the libs specified in LDLIBS:

$ nm --defined libclang_rt.ubsan-x86_64.a | grep -i __ubsan_handle_type_mismatch
0000000000000000 T __ubsan_handle_type_mismatch
0000000000000740 T __ubsan_handle_type_mismatch_abort

How does one force the incusion of a library when using autotools?

Thanks in advance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]