hiwane / ganrac

Go language version QE tool for Real Algebraic Constraints
MIT License
0 stars 0 forks source link

Python.h: No such file or directory #44

Open hiwane opened 11 months ago

hiwane commented 11 months ago
% /usr/lib/go-1.18/bin/go build cmd/ganrac-sage/sagemain.go
go: downloading github.com/chzyer/readline v1.5.1
go: downloading github.com/hiwane/flagvar v0.0.0-20230427133652-22682d0d69ed
# github.com/hiwane/ganrac/cas/sage
cas/sage/python3.go:3:11: fatal error: Python.h: No such file or directory
    3 | // #include <Python.h>
      |           ^~~~~~~~~~
compilation terminated.
hiwane commented 11 months ago
% which python3
/usr/bin/python3
% find /usr -name Python.h
/usr/include/python3.8/Python.h
% env CGO_CFLAGS=-I/usr/include/python3.8 /usr/lib/go-1.18/bin/go build cmd/ganrac-sage/sagemain.go
# github.com/hiwane/ganrac/cas/sage
cas/sage/sage.go:324:8: could not determine kind of name for C.Py_CompileString
hiwane commented 9 months ago
> go build cmd/ganrac-sympy/sympymain.go
build constraints exclude all Go files in
> CGO_ENABLED=1
> go build cmd/ganrac-sympy/sympymain.go
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in
> CC=gcc
> go build cmd/ganrac-sympy/sympymain.go
 Python.h: No such file or directory
> CGO_CFLAGS=-I/boo/baa/Python.h