Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gps build no longer finding system includes for Ubuntu LTS (latest/Focal) #112

Closed
steve-cs opened this issue Dec 8, 2020 · 5 comments
Closed

Comments

@steve-cs
Copy link

steve-cs commented Dec 8, 2020

A recent change in the last 12-36 hours seems to have broken the gps build for me. It seems to be looking for python system includes in /usr/include/ when it has and should be looking in /usr/include/python3.8/. Builds of langkit and libadalang still work, so I don't think I trashed the python environment. But just to make sure I installed a fresh VM and I'm still seeing the problem. Might this be TB09-023 related?

Compile
   [Ada]          gps-main.adb
   [C]            python_support_gtk.c
In file included from /home/steve/gnat-builder/gps-build/gnatcoll_extras/src/python_support_gtk.c:19:
/usr/include/pygobject-3.0/pygobject.h:5:10: fatal error: Python.h: No such file or directory
    5 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.

If I create a link in /usr/include then this specific error goes away, but it immediately fails on another include.

Only one version of python is installed:

steve@steve-virtual-machine:/usr/include$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       7 Apr 15  2020 /usr/bin/python -> python3
lrwxrwxrwx 1 root root       9 Dec  7 22:30 /usr/bin/python3 -> python3.8
-rwxr-xr-x 1 root root 5486352 Jul 28 05:59 /usr/bin/python3.8
lrwxrwxrwx 1 root root      33 Jul 28 05:59 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config
lrwxrwxrwx 1 root root      16 Mar 13  2020 /usr/bin/python3-config -> python3.8-config
steve@steve-virtual-machine:/usr/include$ 

Configure seems to be finding python in the right place:

Checking for python... /usr/bin/python
checking for python version... 3.8
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.8/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.8/site-packages
checking for python3.8... (cached) /usr/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python3.8
checking for Python library path... -L/usr/lib -lpython3.8
checking for Python site-packages path... /usr/lib/python3/dist-packages
checking python extra libraries... -lcrypt -lpthread -ldl  -lutil -lm -lm
checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
@steve-cs
Copy link
Author

steve-cs commented Dec 9, 2020

Three recent commits of TB09-023 have been reverted fixing this issue for now. Closing.

@steve-cs steve-cs closed this as completed Dec 9, 2020
@setton
Copy link
Member

setton commented Dec 9, 2020

Thank you @steve-cs for reporting this, and for confirming that it works again.

@steve-cs
Copy link
Author

@setton, I could use a reality check. Should GPS build and run with Python3 now or is that still just on the roadmap? If current, I assume that I should be using the gnatcoll-bindings python3 module.

Rather embarrassingly shortly after reporting above that it was working I realized that it did build, but crashed at run time shortly after the splash screen and I never really had a Python3 only system working. I since reverted back to Python2 and things actually run again for me. A few more details are at: steve-cs/gnat-builder#33 if you're curious.

I can stick with Python2, but if you/Adacore have already moved to Python3, I'd like to update my builds to match.

@steve-cs steve-cs reopened this Feb 23, 2021
@setton
Copy link
Member

setton commented Feb 23, 2021

Hello @steve-cs - right now we're still with Python 2. We're hard at work on Python3, hopefully it'll land on the main branch in a few weeks.

@steve-cs
Copy link
Author

@setton, I'll give it another shot when you're ready. Thanks.

adacore-bot pushed a commit that referenced this issue Nov 17, 2023
adacore-bot pushed a commit that referenced this issue Nov 17, 2023
#112 Open main file in gdb-mi mode

Closes #112

See merge request eng/ide/gnatstudio!279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants