Segfault-Inc / Multicorn

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

Make install fails for Python 2.7 #208

Closed EOSIT closed 5 years ago

EOSIT commented 6 years ago

I am attempting to make && make install in a virtualenv on Ubuntu 16.04

I have installed the librariries recommended in #190 - now I get this error:

Python version is 2.7
[ -d sql ] || mkdir sql
[ -d src ] || mkdir src
touch directories.stamp
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/python2.7 -I. -I./ -I/usr/include/postgresql/9.5/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -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.
<builtin>: recipe for target 'src/errors.o' failed
make: *** [src/errors.o] Error 1
DrawDreams commented 6 years ago

For apt (Ubuntu, Debian...):

sudo apt-get install python-dev # for python2.x installs sudo apt-get install python3-dev # for python3.x installs For yum (CentOS, RHEL...):

sudo yum install python-devel # for python2.x installs sudo yum install python34-devel # for python3.4 installs

galuszkak commented 5 years ago

@EOSIT You have to get python headers to compile it as @curious1990 pointed out. Closing as it's not a bug.