New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pycopg2 import issue on solaris 10 #532

Closed
justin-wf opened this Issue Mar 17, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@justin-wf

justin-wf commented Mar 17, 2017

I have installed pycopg2 through pip3, not during import, I got an error. what is the issue?

# /opt/csw/bin/pip3 install psycopg2  

Collecting psycopg2
  Downloading psycopg2-2.7.1.tar.gz (421kB)
    100% |################################| 430kB 1.2MB/s 
Installing collected packages: psycopg2
  Running setup.py install for psycopg2 ... done
Successfully installed psycopg2-2.7.1
# python3
Python 3.3.6 (default, Mar 18 2016, 14:34:49) 
[GCC 5.2.0] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/csw/lib/python3.3/site-packages/psycopg2/__init__.py", line 50, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: ld.so.1: python3.3: fatal: relocation error: file /opt/csw/lib/python3.3/site-packages/psycopg2/_psycopg.so: symbol timeradd: referenced symbol not found
@dvarrazzo

This comment has been minimized.

Member

dvarrazzo commented Mar 17, 2017

I guess:

symbol timeradd: referenced symbol not found

which some rapid googling finds you solaris is missing that function.

That function is missing from windows too: it is redefined in win32_support.c

So I guess what you can do is provide a patch with the proper ifdefs or adding a solaris_support.c, because I have no access to solaris. If you do it will be merged and released in psycopg 2.7.2. Thank you.

@psycopg psycopg deleted a comment from qwexvf Jun 8, 2017

@psycopg psycopg deleted a comment from qwexvf Jun 8, 2017

@psycopg psycopg deleted a comment from qwexvf Jun 8, 2017

@mykarlsson

This comment has been minimized.

Contributor

mykarlsson commented Oct 26, 2017

Hi. I'm able to reproduce this issue on Solaris 10 and have a made a PR that attempts to address it here: #606

@dvarrazzo dvarrazzo added this to the psycopg 2.7.4 milestone Nov 13, 2017

@dvarrazzo dvarrazzo closed this in a1831ef Nov 28, 2017

@manmeetsaini

This comment has been minimized.

manmeetsaini commented Sep 13, 2018

@dvarrazzo : I'm also experiencing a similar issue with missing symbol for PQlibVersion with Solaris 10 and psycopg2 2.7.5. I have also installed this module via pip. Do you have any recommendation on how to resolve this?

import psycopg2
Traceback (most recent call last):
File "", line 1, in
File "/export/home/python3/lib/python3.6/site-packages/psycopg2/init.py", line 50, in
from psycopg2._psycopg import ( # noqa
ImportError: ld.so.1: python3.6: fatal: relocation error: file /export/home/python3/lib/python3.6/site-packages/psycopg2/_psycopg.so: symbol PQlibVersion: referenced symbol not found

@dvarrazzo

This comment has been minimized.

Member

dvarrazzo commented Sep 15, 2018

@manmeetsaini smells like you are building with a version of libpq and linking dynamically with a different one but I can't be sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment