when I compile the program with ‘-fsanitize=address’ flag, link error occurred。It seems like ‘libasan.so’ could not be found.
You can try the procedure below on WP76 R13.3 to get the library:
open ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc and add the following line:
IMAGE_INSTALL_append = " libasan"
- make the yocto image by “make”
owner@CNHKG-EX-001367:~/Yocto/WP76/R13.3/yocto$ find ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/gcc-sanitizers/7.3.0-r0/image/usr/ -name “libasan*”
It works！Thank you very much
There is another question to ask you. After compile the package with the configuration IMAGE_INSTALL_append = " libasan", I got “libasan.so” and “libubsan.so” in the lib folder. But “libtsan.so” and " liblsan.so" can not be found in the same folder.
I tried to add IMAGE_INSTALL_append = " libtsan" and make it, the compilation ended with an error of which shows "Couldn’t find anything to satisfy ‘libtsan’ ".
Could you give me some advice. Thanks
it seems libtsan is for x86 platform only: