Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
697 stars 145 forks source link

python3.4 make error #233

Closed qhq16 closed 4 years ago

qhq16 commented 4 years ago

ubuntu@i-9gzoo80x:~/Multicorn-master$ make Python version is 3.4 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fPIC -I. -I./ -I/opt/local/edb/languagepack-10/Python-3.4/include/python3.4m -I. -I./ -I/opt/pgsql/include/postgresql/server -I/opt/pgsql/include/postgresql/internal -I/opt/local/Current/include -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o src/errors.o src/errors.c In file included from src/errors.c:15:0: src/multicorn.h:1:20: fatal error: Python.h: No such file or directory compilation terminated.

: recipe for target 'src/errors.o' failed make: *** [src/errors.o] Error 1 But I have already installed the python3-dev, and even the python3.4-dev. This error existed however. My PG version is 10.9. Could you help me?
KAction commented 4 years ago

You have to provide more detailed information about your environment. But given you mentioned python3-dev I infer you are using Debian-based system. You may want to install libpython3-dev too and try again.

qhq16 commented 4 years ago

I used Ubuntu16.04 system. And I found the 'Python.h' under the dir '/usr/include/python3.4m'. But why did it can't be included in 'multicorn.h' or other files?

Jopie01 commented 4 years ago

Use PYTHON_OVERRIDE=python3 make. It did work for me.

qhq16 commented 4 years ago

Thanks, it worked!