Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

./python: symbol lookup error: ./python: undefined symbol: __gcov_indirect_call_profiler when compiling python

Tags:

python-3.x

I am compiling python with the following options...

./configure --prefix="$PREFIX" --enable-optimizations --enable-shared LDFLAGS="-Wl,--rpath=$PREFIX/lib"

and got the following error:

./python: undefined symbol: __gcov_indirect_call_profiler 

It compiled fine the first time, but when I started changing options and recompiling later, I got this error. Changing the options back to the original options didn't help.

What is causing this?

like image 636
rrauenza Avatar asked Aug 09 '26 20:08

rrauenza


1 Answers

This error is also mentioned here, https://bugs.python.org/issue29712

What is happening is that if you've already done a compilation and installed into $PREFIX, then during a second compile, a step in the makefile will dynamically load the .so library from $PRFEFIX/lib rather than the build environment.

If you rm -rf $PREFIX prior to compiling, you should get a clean build.

I think this has to do with the profile based optimization step of the build and the installed library is missing some expected symbols for that.

like image 95
rrauenza Avatar answered Aug 14 '26 11:08

rrauenza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!