Wrong includes in cpython/pystate.h

Bug #1877831 reported by Thorsten Wagner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.8 (Ubuntu)
New
Undecided
Unassigned

Bug Description

While trying to compile GXSM3 (see gxsm.sf.net and my ppa thorwag/gxsm) on a Ubuntu 20.04 I ran into some unexpected problems, which are related to the package libpython3.8-dev (3.8.2-1ubuntu1.1). To make the story short: Please change in /usr/include/python3.8/cpython/pystate.h line 9 from #include "cpython/initconfig.h" to #include "initconfig.h". Initconfig.h is in the same folder as pystate.h which might cause the problem.

Obviously files have been rearranged between python3.7 (available from deadsnakes ppa) and the recent release for Ubuntu as I was able to compile GXSM3 with the older library (and with Ubuntu 18.04)

Without changing this line, gcc is not finding definitions like Py_single_input and so on. autoconf.sh (of GXSM3) give as output:
checking for main in -lpython3.8... yes
checking python3.8/Python.h usability... no
checking python3.8/Python.h presence... no
checking for python3.8/Python.h... no
checking for main in -lpython3.8m... no
checking python3.8m/Python.h usability... no
checking python3.8m/Python.h presence... no
checking for python3.8m/Python.h... no

After applying the patch it reports:
checking for main in -lpython3.8... yes
checking python3.8/Python.h usability... yes
checking python3.8/Python.h presence... yes
checking for python3.8/Python.h... yes
checking for main in -lpython3.8m... no
checking python3.8m/Python.h usability... no
checking python3.8m/Python.h presence... no
checking for python3.8m/Python.h... no
and the compiler can do the job without any error.

The long story is found here: https://sourceforge.net/p/gxsm/discussion/40919/thread/0b0a1a54c1/?limit=25#752b

With kind regards, Thorsten :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.