[Distutils] problems building Python 2.1a1 on QNX 4.25
Goodger, David
dgoodger@atsautomation.com
Fri Jan 26 17:00:01 2001
[Already sent to python-dev; forwarding it at Guido's suggestion.]
[CC'ing to Armin Steinhoff, who maintains pyqnx on SourceForge.]
I'm having trouble building Python 2.1a1 on QNX 4.25. Caveat: my C is very
rusty (long live Python!), I don't know my way around configure, and am not
familiar with Python's Makefile. Python 2.0 compiled fine (with a couple of
tweaks), but I'm getting caught by the new way of building things. Please
help if you can! Many thanks in advance.
Here's an excerpt of my efforts:
# cd /tmp/py
# gunzip -c < python-2.1a1.tgz | tar -rf -
# cd Python-2.1a1
# ./configure 2>&1 | tee ../configure.1
# make 2>&1 | tee ../make.1
...
./python //5/tmp/py/Python-2.1a1/setup.py build
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "//5/tmp/py/Python-2.1a1/setup.py", line 4, in ?
import sys, os, string, getopt
ImportError: No module named string
Running ./python results in stack overflow. The old QNX instructions in
README recommend editing Modules/Makefile:
LDFLAGS= -N 64k
# make 2>&1 | tee ../make.2
Same error as first make. But now the stack doesn't overflow.
# python
'import site' failed; use -v for traceback
Python 2.1a1 (#2, Jan 26 2001, 11:38:55) [C] on qnxJ
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python', '/home/dgoodger/lib/python',
'/5/tmp/py/Python-2.1a1/Lib', '/5/tmp/py/Python-2.1a1/Lib/plat-qnxJ',
'/tmp/py/Python-2.1a1/Modules']
>>> ^D
# fullpath .
. is //5/tmp/py/Python-2.1a1
The QNX node number prefix '//5' (machine or host number, equivalent to a
'hostname:' prefix for network paths) is being reduced somehow (path
normalization?) to '/5', so paths don't resolve. 2 slashes ('//') are
required at the head of the path. Is this something that can be fixed?
I added a prefix (QNX virtual-to-real path mapping on the filesystem tree)
to correct this:
# prefix -A /5=//5
Now /5 points to //5, similar to a link.
# make 2>&1 | tee ../make.3
...
./python //5/tmp/py/Python-2.1a1/setup.py build
unable to execute ld: No such file or directory
running build
running build_ext
building 'struct' extension
creating build
creating build/temp.qnx-J-PCI-2.1
cc -O -I. -I/5/tmp/py/Python-2.1a1/./Include -IInclude/
-I/usr/local/include -c /5/tmp/py/Python-2.1a1/Modules/structmodule.c -o
build/temp.qnx-J-PCI-2.1/structmodule.o
creating build/lib.qnx-J-PCI-2.1
ld build/temp.qnx-J-PCI-2.1/structmodule.o -L/usr/local/lib -o
build/lib.qnx-J-PCI-2.1/struct.so
error: command 'ld' failed with exit status 1
make: *** [sharedmods] Error 1
QNX doesn't have an 'ld' command. Is configure not getting its info to
setup.py? (Is it supposed to?)
What should I check? I have logs of each of the configure & make runs.
Should I submit this as a bug on SourceForge?
Hope to hear from somebody soon.
David Goodger
Systems Administrator & Programmer, Advanced Systems
Automation Tooling Systems Inc., Automation Systems Division
direct: (519) 653-4483 ext. 7121 fax: (519) 650-6695
e-mail: dgoodger@atsautomation.com