invalid use of incomplete type ‘PyInterpreterState’

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Tooniis
Posts: 14
Joined: Sat Feb 17, 2018 7:29 am

invalid use of incomplete type ‘PyInterpreterState’

Post by Tooniis »

I got this trying to compile 0.18.4:

Code: Select all

src/Base/swigpyrun.inl:75:31: error: invalid use of incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
   75 |     PyObject *modules = interp->modules;
      |                               ^~
In file included from /usr/include/python3.8/genobject.h:11,
                 from /usr/include/python3.8/Python.h:121,
                 from /home/yassine/Code/Source/FreeCAD-0.18.4/src/Base/PyExport.h:42,
                 from /home/yassine/Code/Source/FreeCAD-0.18.4/src/Base/swigpyrun.cpp:25:
/usr/include/python3.8/pystate.h:20:8: note: forward declaration of ‘PyInterpreterState’ {aka ‘struct _is’}
   20 | struct _is;
      |        ^~~
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: invalid use of incomplete type ‘PyInterpreterState’

Post by Kunda1 »

Tooniis wrote: Tue Mar 24, 2020 3:23 am I got this trying to compile 0.18.4:

Code: Select all

src/Base/swigpyrun.inl:75:31: error: invalid use of incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
   75 |     PyObject *modules = interp->modules;
      |                               ^~
In file included from /usr/include/python3.8/genobject.h:11,
                 from /usr/include/python3.8/Python.h:121,
                 from /home/yassine/Code/Source/FreeCAD-0.18.4/src/Base/PyExport.h:42,
                 from /home/yassine/Code/Source/FreeCAD-0.18.4/src/Base/swigpyrun.cpp:25:
/usr/include/python3.8/pystate.h:20:8: note: forward declaration of ‘PyInterpreterState’ {aka ‘struct _is’}
   20 | struct _is;
      |        ^~~
Please please please get in the habit of posting more info about your system
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Tooniis
Posts: 14
Joined: Sat Feb 17, 2018 7:29 am

Re: invalid use of incomplete type ‘PyInterpreterState’

Post by Tooniis »

Kunda1 wrote: Tue Mar 24, 2020 2:15 pm Please please please get in the habit of posting more info about your system
I'm sorry, but what kind of system information would help here?

Here's some information:
Arch Linux
Python 3.8.2
CMake 3.17.0
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: invalid use of incomplete type ‘PyInterpreterState’

Post by sgrogan »

Tooniis wrote: Tue Mar 24, 2020 6:04 pm I'm sorry, but what kind of system information would help here?

Here's some information:
Arch Linux
Python 3.8.2
CMake 3.17.0
This helps, Thanks.

FreeCAD 0.18.4 was not ported to 3.8.2 and probably other newer libs (OCCT for example), because you are on ARCH you have the bleeding edge libs.
I suggest you try with the master branch.
We are in a feature freeze and hopefully will be releasing 0.19 next month. I also don't think I've seen CMake 3.17 yet.
"fight the good fight"
Tooniis
Posts: 14
Joined: Sat Feb 17, 2018 7:29 am

Re: invalid use of incomplete type ‘PyInterpreterState’

Post by Tooniis »

sgrogan wrote: Tue Mar 24, 2020 10:20 pm This helps, Thanks.

FreeCAD 0.18.4 was not ported to 3.8.2 and probably other newer libs (OCCT for example), because you are on ARCH you have the bleeding edge libs.
I suggest you try with the master branch.
We are in a feature freeze and hopefully will be releasing 0.19 next month. I also don't think I've seen CMake 3.17 yet.
Building master worked. Thanks.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: invalid use of incomplete type ‘PyInterpreterState’

Post by sgrogan »

Tooniis wrote: Wed Mar 25, 2020 7:45 am Building master worked. Thanks.
Great. Out of curiosity what version of QT5 do you have?
"fight the good fight"
Post Reply