Please help me with linking libraries on Solaris 10 sparc

Discussion in 'Python' started by idev, May 1, 2008.

  1. idev

    idev Guest

    Hi all,
    Please help me with my stuff.

    I downloaded python 2.5.1 package from http://blastwave.org it was
    compiled using Sun Studio 11 for Solaris 8 sparc.

    My system is Solaris 10 sparc and I compiled using SunStudio 11
    psycopg2 python binding for PostgreSQL 8.3.1.

    Compilation was OK, but when I am trying to import psycopg2 I am
    getting this error:

    $ python
    Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:52) [C] 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/python/site-packages/psycopg2/__init__.py", line
    60, in <module>
    from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
    ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/
    lib/python/site-packages/psycopg2/_psycopg.so: symbol round:
    referenced symbol not found

    Any suggestions or help will be appreciated.
     
    idev, May 1, 2008
    #1
    1. Advertising

  2. idev schrieb:
    > Hi all,
    > Please help me with my stuff.
    >
    > I downloaded python 2.5.1 package from http://blastwave.org it was
    > compiled using Sun Studio 11 for Solaris 8 sparc.
    >
    > My system is Solaris 10 sparc and I compiled using SunStudio 11
    > psycopg2 python binding for PostgreSQL 8.3.1.
    >
    > Compilation was OK, but when I am trying to import psycopg2 I am
    > getting this error:
    >
    > $ python
    > Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:52) [C] 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/python/site-packages/psycopg2/__init__.py", line
    > 60, in <module>
    > from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
    > ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/
    > lib/python/site-packages/psycopg2/_psycopg.so: symbol round:
    > referenced symbol not found
    >
    > Any suggestions or help will be appreciated.


    Hi,

    maybe a stupid question - but why don't you want to use the "official"
    package? You can download it here:
    http://sunfreeware.mirrors.tds.net/indexsparc10.html

    Regards,
    Ralf
     
    Ralf Schönian, May 1, 2008
    #2
    1. Advertising


  3. > lib/python/site-packages/psycopg2/_psycopg.so: symbol round:
    > referenced symbol not found


    You need to link _psycopg.so with the math library, -lm.

    Regards,
    Martin
     
    Martin v. Löwis, May 1, 2008
    #3
  4. idev

    idev Guest

    On May 1, 10:17 am, Ralf Schönian <> wrote:
    > idev schrieb:
    >
    >
    >
    > > Hi all,
    > > Please help me with my stuff.

    >
    > > I downloaded python 2.5.1 package fromhttp://blastwave.orgit was
    > > compiled using Sun Studio 11 for Solaris 8 sparc.

    >
    > > My system is Solaris 10 sparc and I compiled using SunStudio 11
    > > psycopg2 python binding for PostgreSQL 8.3.1.

    >
    > > Compilation was OK, but when I am trying to import psycopg2 I am
    > > getting this error:

    >
    > > $ python
    > > Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:52) [C] 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/python/site-packages/psycopg2/__init__.py", line
    > > 60, in <module>
    > > from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
    > > ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/
    > > lib/python/site-packages/psycopg2/_psycopg.so: symbol round:
    > > referenced symbol not found

    >
    > > Any suggestions or help will be appreciated.

    >
    > Hi,
    >
    > maybe a stupid question - but why don't you want to use the "official"
    > package? You can download it here:http://sunfreeware.mirrors.tds.net/indexsparc10.html
    >
    > Regards,
    > Ralf


    I am trying to deploy Django env (apache2.x prefork MPM; mod_python
    3.3.1; python 2.5.1; postgresql 8.3.x; psycopg2-2.0.7; subversion
    1.4.5.x; openssl 0.98;) on Solaris 10 sparc box.
    You are right they have pretty much everything what I need except
    mod_python and psycopg2. So the first problem was PostgreSQL. It was
    compiled without (--with-thread-safety) just ./configure. I compiled
    psycopg2 by myself using gcc but I couldn't compile mod_pyhon by some
    reasons. That is why I switched to blastwave.org they have everything
    what I need except psycopg2. I compiled it by my self. And now I am
    having the ld problems and I don't know how to resolve it.
     
    idev, May 1, 2008
    #4
  5. idev

    idev Guest

    On May 1, 10:30 am, "Martin v. Löwis" <> wrote:
    > > lib/python/site-packages/psycopg2/_psycopg.so: symbol round:
    > > referenced symbol not found

    >
    > You need to link _psycopg.so with the math library, -lm.
    >
    > Regards,
    > Martin


    Martin, could you please tell me how to do this, I am pretty new in
    Solaris.
     
    idev, May 1, 2008
    #5
  6. > Martin, could you please tell me how to do this, I am pretty new in
    > Solaris.


    It's fairly complicated, so I'm not sure I can give you the full
    tutorial in a Usenet message.

    In essence, you need to spot the linker line in the build process,
    (e.g. by the -o option to the compiler), and add -lm to it.

    If you cannot do this on your own, I recommend you hire somebody
    who can.

    Regards,
    Martin
     
    Martin v. Löwis, May 1, 2008
    #6
  7. idev

    idev Guest

    On May 1, 11:41 am, "Martin v. Löwis" <> wrote:
    > > Martin, could you please tell me how to do this, I am pretty new in
    > > Solaris.

    >
    > It's fairly complicated, so I'm not sure I can give you the full
    > tutorial in a Usenet message.
    >
    > In essence, you need to spot the linker line in the build process,
    > (e.g. by the -o option to the compiler), and add -lm to it.
    >
    > If you cannot do this on your own, I recommend you hire somebody
    > who can.
    >
    > Regards,
    > Martin


    Thanks Martin,
    For sure I am not maintainer :).

    Thanks for the help and explanations.
     
    idev, May 1, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zsolt Koppany
    Replies:
    2
    Views:
    387
    Zsolt Koppany
    Oct 30, 2003
  2. Bruce
    Replies:
    4
    Views:
    1,452
    Gordon Beaton
    Mar 13, 2006
  3. Ganesh Tiwari
    Replies:
    1
    Views:
    445
    Victor Bazarov
    Aug 10, 2004
  4. Alec Wysoker
    Replies:
    8
    Views:
    481
    Alec Wysoker
    Mar 9, 2005
  5. Trent Mick
    Replies:
    0
    Views:
    425
    Trent Mick
    Jun 28, 2005
Loading...

Share This Page