compiling libpq without 'main'

From: Marco Vezzoli <marco(dot)vezzoli(at)st(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: compiling libpq without 'main'
Date: 2003-09-08 12:49:03
Message-ID: 3F5C7ABF.DFC7AE30@st.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I'm using

solaris 8
gcc 3.0.1
postgres 7.3.4
psycopg 1.1.2
apache 1.3.19
python 2.1.1
mod_python 2.7.8 compiled with DSO

Compilation and tests run good for all tools.
When I connect from a standalone python session (either a program or a
CGI) everything works fine.

But when I use either psycopg or pg modules from mod python the dynamic
loader complains about an unresolved 'main' symbol in libpq.so (error
messages below)

Using nm I've found that all mod_*.so libraries in apache modules do not
have any 'main' symbol but libpq.so does have one marked 'U'.

There is a way to recompile libpq without this symbol?
Thanks in advance for any help.
Marco

-----------------------------------
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/local/lib/python2.1/site-packages/mod_python/apache.py",
line 193, in Dispatch
result = object(req)

File "/usr/local/lib/python2.1/site-packages/mod_python/publisher.py",
line 128, in handler
module = apache.import_module(module_name, _req, [path])

File "/usr/local/lib/python2.1/site-packages/mod_python/apache.py",
line 335, in import_module
module = imp.load_module(mname, f, p, d)

File "/hype/cgi-bin/PyDataAnalysis/EWSSearchProcess.py", line 7, in ?
import EWS

File "/hype/cgi-bin/PyDataAnalysis/EWS.py", line 1, in ?
from psycopg import *

ImportError: ld.so.1: /HTTP-Server/build/apache/bin/httpd: fatal:
relocation error: file /usr/local/lib/libpq.so.2: symbol main:
referenced symbol not found
-----------------------------------
--
Marco Vezzoli tel. +39 039 603 6852
STMicroelectronics fax. +39 039 603 5055

Browse pgsql-general by date

  From Date Subject
Next Message Achilleus Mantzios 2003-09-08 12:55:59 Re: Conditional row grained replication with DBMirror
Previous Message George Weaver 2003-09-08 12:41:30 Re: [SQL] [GENERAL] plPGSQL bug in function creation