_psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length

From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: _psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
Date: 2017-10-18 14:10:51
Message-ID: CAF3N6oTW-oNAnYktDJZWYqz0qM-qkPs+ZJtMMfkaVfR+JeibqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

OS=CentOS Linux release 7.3.1611 (Core)
gcc=gcc version 6.4.0 (GCC)
python=3.6.3
postgreSQL=10.0
psycopg2=2.7.3.1

I am trying to build and install psycopg2 from source to a python 3.6.3
installation that has also been built and installed from source.
The "--pg-config" parameter points to PostgreSQL version 10.0 that I
installed from source.
The compilation and installation seems to complete successfully but the
error below is thrown when I try importing psycopg2.

[me(at)here 2017/10/18 16:59:51 +03]$ date;time
/somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;
Wed Oct 18 16:59:52 +03 2017
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/__init__.py",
line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError:
/somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/_
psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol:
ASN1_STRING_length

real 0m0.046s
user 0m0.024s
sys 0m0.009s
Wed Oct 18 16:59:52 +03 2017
[me(at)here 2017/10/18 16:59:52 +03]$
[me(at)here 2017/10/18 17:01:34 +03]$

Below are the commands I used in compiling and installing psycopy2.
export pg_home=/home/me/apps/postgreSQL/pgsql-10.0;
export PATH=${pg_home}/bin/:${PATH};
export LD_LIBRARY_PATH=${pg_home}/lib:${LD_LIBRARY_PATH};
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext
--pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs
${pg_home}/lib --include-dirs ${pg_home}/include build;date;
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext
--pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs
${pg_home}/lib --include-dirs ${pg_home}/include install;date;
date;time /somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;

Allan.

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2017-10-18 18:10:12 Re: _psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
Previous Message Karsten Hilbert 2017-10-01 13:50:18 Re: 2.7.2 still problem with readonly/autocommit, was: Changing set_session implementation