[Python-bugs-list] [Bug #117245] Python shared-library modules do not work on OpenBSD 2.7
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Oct 2000 15:09:57 -0700
Bug #117245, was updated on 2000-Oct-18 17:42
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: Python shared-library modules do not work on OpenBSD 2.7
Details: Python 2.0 compiles and works 100% fine with static modules. However, if I uncomment the '*shared*' line in Modules/Setup, then 'make test' will fail as follows:
cd Modules; make OPT="-g -O2 -Wall -Wstrict-prototypes" VERSION="2.0" prefix="/usr/local" exec_prefix="/usr/local" sharedmods
rm -f ./Lib/test/*.py[co]
PYTHONPATH= ./python -tt ./Lib/test/regrtest.py -l
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 39, in ?
import random
File "/tmp/Python-2.0/Lib/random.py", line 23, in ?
import whrandom
File "/tmp/Python-2.0/Lib/whrandom.py", line 134, in ?
_inst = whrandom()
File "/tmp/Python-2.0/Lib/whrandom.py", line 45, in __init__
self.seed(x, y, z)
File "/tmp/Python-2.0/Lib/whrandom.py", line 56, in seed
import time
ImportError: dynamic module does not define init function (inittime)
But the symbol does exist:
$ nm timemodule.so | fgrep init
000009d0 T _inittime
(I noticed this bug while trying to install third-party modules, specifically the MySQLdb one, and, after testing, found the problem was more generic.)
Follow-Ups:
Date: 2000-Oct-25 14:04
By: gvanrossum
Comment:
I think I may have a patch for this:
http://sourceforge.net/patch/?func=detailpatch&patch_id=102114&group_id=5470
Can you please test this patch and see if it solves the problem?
-------------------------------------------------------
Date: 2000-Oct-25 15:02
By: jribbens
Comment:
The patch worked, problem all solved - after I added the '#endif' that it's missing ;-)
-------------------------------------------------------
Date: 2000-Oct-25 15:09
By: gvanrossum
Comment:
Fixed by adding a leading underscore to the dlsym() lookup argument.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=117245&group_id=5470