FWIW I also get the same error on macOS - been trying for days to hunt down 
problem but so far no answer. 

Looking at the ./configure code but am boggled by it and struggling to zone in 
on the correct area,
I work in Xcode so no idea what to use to dynamically debug/trace in Terminal

Gandalf:trunk pteeson$ ./configure --with-python
…..

configure:    ---- SUMMARY OF TESTS (please include in error reports) ----

    DEVELOP_WANTED:              no
    ASSERT_LEVEL_WANTED:         1
    DYNAMIC_LOG_WANTED:          no
    PERFORMANCE_COUNTERS_WANTED: no
    VALUE_CHECK_WANTED:          no
    VALUE_HISTORY_WANTED:        no

    apl_MAINTAINER_MODE:         no
    apl_missing_headers:         3
    apl_missing_functions:       0
    apl_FFT:                     no     (affects: ⎕FFT)
    apl_PCRE:                           (affects: ⎕RE)
    apl_PNG:                     yes    (affects: ⎕PNG)
    apl_POSTGRES:                no     (may affect: ⎕SQL)
    apl_SQLITE3:                 yes    (may affect: ⎕SQL)
    apl_SQL                      yes    (affects:    ⎕SQL)
    apl_X11 (libxcb):            no     (fallback for               ⎕PLOT)
    apl_GTK3:                    no     (affects: ⎕PNG, ⎕GTK, maybe ⎕PLOT)
    apl_GUI:                     no     (affects: ⎕PNG, ⎕GTK,       ⎕PLOT)

=============From the Make log===========
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -I 
/Volumes/Data/GNUAPL-on-Mac-WS/GNUapl/trunk -I/usr/include -DNDEBUG 
-D_FORTIFY_SOURCE=2 -fwrapv -fPIC -fstack-protector --param=ssp-buffer-size=4 
-I/usr/include/python3.6m -I/usr/include/python3.8 -g -O2 -I 
/Volumes/Data/GNUAPL-on-Mac-WS/GNUapl/trunk -MT lib_gnu_apl_la-python_apl.lo 
-MD -MP -MF .deps/lib_gnu_apl_la-python_apl.Tpo -c python_apl.cc  -fno-common 
-DPIC -o .libs/lib_gnu_apl_la-python_apl.o
python_apl.cc:3:10: fatal error: 'Python.h' file not found
#include <Python.h>
         ^~~~~~~~~~
1 error generated.
make[1]: *** [lib_gnu_apl_la-python_apl.lo] Error 1
make: *** [all-recursive] Error 1

======== tracking down python3.8 ---------
../../Library/Frameworks/Python.framework/Versions/3.8/include/python3.8
../../Library/Frameworks/Python.framework/Headers 

> On May 24, 2023, at 4:45 PM, Emmanuel Charpentier <emm.charpent...@free.fr> 
> wrote:
> 
> Dear Jürgen,
> 
> TL,DR : I tried to recompile gnu-apl with the Python library, but got a 
> compilation error :
> 
> ../../src/python_apl.cc:3:10: fatal error: Python.h: Aucun fichier ou dossier 
> de ce type
>     3 | #include <Python.h>
>       |          ^~~~~~~~~~
> compilation terminated.
> Some details :
> 
> In a fresh VPATH directory I did :
> 
> ../configure --with-sqlite3 --with-gtk3 --with-python
> which ended with :
> 
> configure:    ---- SUMMARY OF TESTS (please include in error reports) ----
> 
>     DEVELOP_WANTED:              no
>     ASSERT_LEVEL_WANTED:         1
>     DYNAMIC_LOG_WANTED:          no
>     PERFORMANCE_COUNTERS_WANTED: no
>     VALUE_CHECK_WANTED:          no
>     VALUE_HISTORY_WANTED:        no
> 
>     apl_MAINTAINER_MODE:         no
>     apl_missing_headers:         0
>     apl_missing_functions:       0
>     apl_FFT:                     yes  (affects: ⎕FFT)
>     apl_PCRE:                    yes  (affects: ⎕RE)
>     apl_PNG:                     yes  (affects: ⎕PNG)
>     apl_POSTGRES:                yes  (may affect: ⎕SQL)
>     apl_SQLITE3:                 yes  (may affect: ⎕SQL)
>     apl_SQL                      yes  (affects:    ⎕SQL)
>     apl_X11 (libxcb):            yes  (fallback for               ⎕PLOT)
>     apl_GTK3:                    yes  (affects: ⎕PNG, ⎕GTK, maybe ⎕PLOT)
>     apl_GUI:                     yes  (affects: ⎕PNG, ⎕GTK,       ⎕PLOT)
> but a compilation, launched by
> 
> time make -j8 2>&1 | tee compilation.log
> failed. The error seems to be :
> 
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src -I.. -Wall 
> -Wno-parentheses -I sql -I /home/charpent/Dev/apl/trunk/obj/.. 
> -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz 
> -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount 
> -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo 
> -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 
> -I/usr/include/x86_64-linux-gnu -I/usr/include/gio-unix-2.0 
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 
> -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread -I/usr/include 
> -I/usr/include/postgresql -DNDEBUG -D_FORTIFY_SOURCE=2 -fwrapv -fPIC 
> -fstack-protector --param=ssp-buffer-size=4 -I/usr/include/python3.6m 
> -I/usr/include/python3.8 -g -O2 -I /home/charpent/Dev/apl/trunk/obj -MT 
> lib_gnu_apl_la-python_apl.lo -MD -MP -MF .deps/lib_gnu_apl_la-python_apl.Tpo 
> -c ../../src/python_apl.cc  -fPIC -DPIC -o .libs/lib_gnu_apl_la-python_apl.o
> ../../src/python_apl.cc:3:10: fatal error: Python.h: Aucun fichier ou dossier 
> de ce type
>     3 | #include <Python.h>
>       |          ^~~~~~~~~~
> compilation terminated.
> make[3]: *** [Makefile:2779 : lib_gnu_apl_la-python_apl.lo] Erreur 1
> make[3]: *** Attente des tâches non terminées....
> The curious thing is that Python.h is present on my system :
> 
> charpent@zen-book-flip:~/Dev/apl/trunk/obj$ locate Python.h
> locate: warning: database ‘/var/cache/locate/locatedb’ is more than 8 jours 
> old (actual age is 30,1 jours)
> /usr/include/python3.11/Python.h
> /usr/share/doc/Macaulay2/Python/html/_to__Python.html
> charpent@zen-book-flip:~/Dev/apl/trunk/obj$ ls -l 
> /usr/include/python3.11/Python.h
> -rw-r--r-- 1 root root 2854 13 mars  13:18 /usr/include/python3.11/Python.h
> I might have to specify some library in an option to ../configure, but can't 
> figure out which.
> 
> My setup is Debian testing, used fairly often for development (I'm more or 
> less in the Sagemath development group), with as little non-Debian software I 
> can manage (two notorious exceptions : Zotero, which is a sine qua non of my 
> work) and, of course, Sagemath (built from my local git clone). And an 
> armfull of R packages, which are probably quite irrelevant.
> 
> Logs attached (I hope).
> 
> --
> Emmanuel Charpentier
> 
> <compilation.log><config.log><config.status>

Reply via email to