autoconf
[Top][All Lists]
Advanced

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

Re: How to force linking to an archive?


From: Christian Rössel
Subject: Re: How to force linking to an archive?
Date: Fri, 22 Nov 2013 12:53:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Jeffrey,

On 11/21/2013 03:26 PM, Jeffrey Walton wrote:
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
`__ubsan_handle_type_mismatch'
/home/jwalton/Desktop/jpeg-6b/jmemmgr.c:695: undefined reference to
`__ubsan_handle_type_mismatch'
/home/jwalton/Desktop/jpeg-6b/jmemmgr.c:696: undefined reference to
`__ubsan_handle_type_mismatch'
...

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
/usr/local/lib/clang/lib/linux/3.3/libclang_rt.ubsan-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:

it should be LIBS instead of LDLIBS, see the section 'Some influential environment variables' in the configure --help output. There is also no need to export variables as you can set them on the command line:
./configure [OPTION]... [VAR=VALUE]...

Hope that helps,
Christian

$ 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.

_______________________________________________
Autoconf mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/autoconf





reply via email to

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