Segfault-Inc / Multicorn

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

Can't install on CentOS 5.11 #99

Closed rossj-cargotel closed 9 years ago

rossj-cargotel commented 9 years ago

I, too, could use a clue as to how to install Multicorn on CentOS 5.11 with default python 2.4.

I've installed 2.7 in /usr/local but even when I symlink it in as the default python, make still shows python 2.4 as the default and errors out directly there after. I wish I could uninstall 2.4 but that breaks CentOS.

[rossj@server Multicorn]$ python -V Python 2.7.9 [rossj@server Multicorn]$ make Python version is 2.4 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/et -fpic -I. -I./ -I/usr/include/python2.4 -I. -I./ -I/usr/pgsql-9.4/include/server -I/usr/pgsql-9.4/include/internal -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o src/errors.o src/errors.c

I'd love to try this out to access informix.

rdunklau commented 9 years ago

Ok, I tried an installation on Centos 5 with Postgres 9.4 (installed from yum.postgresql.org) and python 2.7 (installed from source). This assumes that you unpacked Multicorn-1.1.0 and Python 2.7.9 in /usr/local/src.

yum install postgresql94-devel postgresql94 postgresql94-contrib
# zlib and openssl are needed for pip
yum install zlib-devel openssl-devel
export PATH=$PATH:/usr/pgsql-9.4/bin
cd /usr/local/src/Python-2.7.9
CFLAGS=-fPIC ./configure --prefix=/usr/local/
make
make install

Install pip et setup tools for this fresh install of python:

cd /usr/local/src/
wget https://bootstrap.pypa.io/ez_setup.py 
python ez_setup.py
wget  https://pypi.python.org/packages/source/p/pip/pip-7.0.1.tar.gz#md5=5627bb807cf3d898a2eba276685537aa
tar zxvf pip-7.0.1.tar.gz
cd pip-7.0.1
python setup.py install

Then, we can install Multicorn itself:

cd /usr/local/src/Multicorn-1.1.0
PYTHON_OVERRIDE=/usr/local/bin/python make install

Please let me know if you need additional info.

rossj-cargotel commented 9 years ago

Setting PYTHON_OVERRIDE did the trick--thanks!

Now to tackle the informix part.