gabyx / ApproxMVBB

Fast algorithms to compute an approximation of the minimal volume oriented bounding box of a point cloud in 3D.
Mozilla Public License 2.0
441 stars 93 forks source link

example error #26

Closed RaymondZuo301 closed 5 years ago

RaymondZuo301 commented 6 years ago

when i run example/ApproxMVBBExample-MVBB i got this

==29054==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

i have to run export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libasan.so.2 every time before running the example to make it correct. ubuntu 16.04 gcc5.4

gabyx commented 6 years ago

hm... strange, it looks your gcc installation is somehow corrupt?. might be a defect gcc installation? Did you try to look at: https://github.com/google/sanitizers/issues/679

FWIW non-empty /etc/ld.so.preload was an exact reason why GCC 6 didn't work (ASan runtime indeed wasn't first in initial library list). GCC 4.9 works just because it's too old and doesn't have this sanity check.

I would recommend using clang6.0. Asan is only enabled in Debug builds...

RaymondZuo301 commented 6 years ago

thanks a lot, i will try clang6.0

gabyx commented 5 years ago

did it solve the problem?

sheikware commented 4 years ago

Just an FYI - I had a similar problem with WSL release build. Line 46 in SetTargetCompileOptions.cmake sets the link flags with -fsanitize=leak -fsanitize=address which causes the release library to also link to libasan. I think you want to use LINK_FLAGS_DEBUG, not LINK_FLAGS. I will make a pull request.