By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

compiling libpq without 'main'

P: n/a
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 (error
messages below)

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

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

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

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

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

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

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

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

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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.