signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.49k stars 1.4k forks source link

Wrong python library name when compiling from the source #567

Open upcFrost opened 4 years ago

upcFrost commented 4 years ago

Hi,

I've tried compiling Freeswitch from the source the way it's described on https://freeswitch.org/confluence/display/FREESWITCH/Debian+10+Buster. The configuration script failed to find the python version suitable for use.

It seems that the reason behind it is this piece:

configure.ac:   PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"

It returns python3.7, which makes the lib name -l$PYTHON_LIB == -lpython3.7. As it can be seen from this post, python libs can have additional suffixes, in my case (Debian) it'd be libpython3.7m

Probably the correct lib name can be taken from python-config --libs

upcFrost commented 4 years ago

By the way, those clauses in Makefiles fail as well

libs/esl/python/Makefile:LOCAL_CFLAGS=`python ./python-config --includes`
libs/esl/python/Makefile:LOCAL_LDFLAGS=`python ./python-config --ldflags`

For python3 it should be python3-config --...

mochouinard commented 3 years ago

191 should fix this issue as well !