Wind River Support Network

HomeDefectsLIN8-4656
Fixed

LIN8-4656 : Cannot use gcc-sanitizers, as installed libasan.la file is wrong

Created: Sep 8, 2016    Updated: Dec 3, 2018
Resolved Date: Oct 21, 2016
Found In Version: 8.0.0.4
Fix Version: 8.0.0.11
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: BSP, Build & Config

Description

Hi, 

WRL8, rcpl4 

Trying to add libasan to a package will fail to build due to gcc-sanitizers package installing a bad libasan.la file (the libubsan.la file is also bad). 
They are missing a '=' sign in the dependency_libs line, causing libtool to try to find the dependencies on the host instead of the sysroot. 

This prevents us to use libasan during development and trouble shooting. 
A quick workaround to get passed this would be very good to help us with current trouble shooting! 

Example: 
$ cat cryptsetup_1.6.7.bbappend 
DEPENDS += "gcc-sanitizers" 
CFLAGS_append += "-fsanitize=address" 
LDFLAGS_append += "-lasan" 

.... 
$ bitbake cryptsetup 
... 
../../arm-wrs-linux-gnueabi-libtool --tag=CC --mode=link arm-wrs-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -marm -mthumb-interwork -mtune=cortex-a15 --sysroot=/build/rcs-yocto_800.4/build/build_dusx2_rcs-rootfs/bitbake_build/tmp/sysroots/dusx2 -Wall -O2 -pipe -g -fsanitize=address -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lasan -o libcrypto_backend.la libcrypto_backend_la-crypto_cipher_kernel.lo libcrypto_backend_la-crypto_storage.lo libcrypto_backend_la-pbkdf_check.lo libcrypto_backend_la-crc32.lo libcrypto_backend_la-crypto_openssl.lo 
/bin/grep: /usr/lib/libstdc++.la: No such file or directory 
sed: can't read /usr/lib/libstdc++.la: No such file or directory 
arm-wrs-linux-gnueabi-libtool: error: '/usr/lib/libstdc++.la' is not a valid libtool archive 

... 
$ grep ^dependency_libs .../tmp/sysroots/.../usr/lib/libasan.la 
dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la '/usr/lib'/libstdc++.la' 

Other Downloads


Live chat
Online