1

I'm compiling my test executable in this way using gcc 4.8.3:

gcc -o test -g -L/lib64 -fsanitize=address -static-libasan

Result:

/usr/bin/ld: cannot find -lasan
collect2: error: ld returned 1 exit status

Libasan is installed and if I compile without the static option it works. How can I compile the library statically?

1 Answer 1

2

You need to install special package to get static GCC libraries. On Ubuntu you should do

$ sudo apt-get install libgcc-4.8-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.