473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Numeric compiling problem under QNX 4.25

ZMY
Dear all,

I am a real newbie for both python and QNX, but I am still trying to
compile Numeric-24.2 under QNX4.25 with python 2.2. I got following
error message:
$ sudo python setup.py install
Password:
running install
....
building '_numpy' extension
skipping Src/_numpymodule.c (build/temp.qnx-O-PCI-2.2/_numpymodule.o
up-to-date)
skipping Src/arrayobject.c (build/temp.qnx-O-PCI-2.2/arrayobject.o up-
to-date)
skipping Src/ufuncobject.c (build/temp.qnx-O-PCI-2.2/ufuncobject.o up-
to-date)
ld build/temp.qnx-O-PCI-2.2/_numpymodule.o build/temp.qnx-O-PCI-2.2/
arrayobject.o build/temp.qnx-O-PCI-2.2/ufuncobject.o -o build/lib.qnx-
O-PCI-2.2/_numpy.so
unable to execute ld: No such file or directory
error: command 'ld' failed with exit status 1

I looked at directory /build/temp.qnx-O-PCI-2.2/ and found following
object files:

_numpymodule.o, arrayobject.o, ufuncobject.o

So it looks that ld got all files before linking them - or is it??

Thanks a lot for any suggestions,

- ZMY

Apr 3 '07 #1
11 2528
Hi,

unfortunately I don't have a solution. However, if you're not forced
to use Python2.2 and Numeric you should use Numpy (the successor for
both, Numeric and Numarray). Numpy requires Python2.3, though.

Bernhard
On Apr 3, 7:32 am, "ZMY" <zhonghua.m.y...@gmail.comwrote:
Dear all,

I am a real newbie for both python and QNX, but I am still trying to
compile Numeric-24.2 under QNX4.25 with python 2.2. I got following
error message:

$ sudo python setup.py install
Password:
running install
...
building '_numpy' extension
skipping Src/_numpymodule.c (build/temp.qnx-O-PCI-2.2/_numpymodule.o
up-to-date)
skipping Src/arrayobject.c (build/temp.qnx-O-PCI-2.2/arrayobject.o up-
to-date)
skipping Src/ufuncobject.c (build/temp.qnx-O-PCI-2.2/ufuncobject.o up-
to-date)
ld build/temp.qnx-O-PCI-2.2/_numpymodule.o build/temp.qnx-O-PCI-2.2/
arrayobject.o build/temp.qnx-O-PCI-2.2/ufuncobject.o -o build/lib.qnx-
O-PCI-2.2/_numpy.so
unable to execute ld: No such file or directory
error: command 'ld' failed with exit status 1

I looked at directory /build/temp.qnx-O-PCI-2.2/ and found following
object files:

_numpymodule.o, arrayobject.o, ufuncobject.o

So it looks that ld got all files before linking them - or is it??

Thanks a lot for any suggestions,

- ZMY

Apr 3 '07 #2
be************@gmail.com wrote:
Hi,

unfortunately I don't have a solution. However, if you're not forced
to use Python2.2 and Numeric you should use Numpy (the successor for
both, Numeric and Numarray). Numpy requires Python2.3, though.
He's already asked about numpy. He is stuck with 2.2.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Apr 3 '07 #3
ZMY wrote:
Dear all,

I am a real newbie for both python and QNX, but I am still trying to
compile Numeric-24.2 under QNX4.25 with python 2.2. I got following
error message:
$ sudo python setup.py install
Password:
running install
...
building '_numpy' extension
skipping Src/_numpymodule.c (build/temp.qnx-O-PCI-2.2/_numpymodule.o
up-to-date)
skipping Src/arrayobject.c (build/temp.qnx-O-PCI-2.2/arrayobject.o up-
to-date)
skipping Src/ufuncobject.c (build/temp.qnx-O-PCI-2.2/ufuncobject.o up-
to-date)
ld build/temp.qnx-O-PCI-2.2/_numpymodule.o build/temp.qnx-O-PCI-2.2/
arrayobject.o build/temp.qnx-O-PCI-2.2/ufuncobject.o -o build/lib.qnx-
O-PCI-2.2/_numpy.so
unable to execute ld: No such file or directory
error: command 'ld' failed with exit status 1
It looks like it can't find the command ld. Can you compile any other extension
modules?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Apr 3 '07 #4
ZMY
On Apr 3, 10:22 am, Robert Kern <robert.k...@gmail.comwrote:
ZMY wrote:
Dear all,
I am a real newbie for both python and QNX, but I am still trying to
compile Numeric-24.2 under QNX4.25 with python 2.2. I got following
error message:
$ sudo python setup.py install
Password:
running install
...
building '_numpy' extension
skipping Src/_numpymodule.c (build/temp.qnx-O-PCI-2.2/_numpymodule.o
up-to-date)
skipping Src/arrayobject.c (build/temp.qnx-O-PCI-2.2/arrayobject.o up-
to-date)
skipping Src/ufuncobject.c (build/temp.qnx-O-PCI-2.2/ufuncobject.o up-
to-date)
ld build/temp.qnx-O-PCI-2.2/_numpymodule.o build/temp.qnx-O-PCI-2.2/
arrayobject.o build/temp.qnx-O-PCI-2.2/ufuncobject.o -o build/lib.qnx-
O-PCI-2.2/_numpy.so
unable to execute ld: No such file or directory
error: command 'ld' failed with exit status 1

It looks like it can't find the command ld. Can you compile any other extension
modules?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
Is "ld" part of make command? I am not familiar with compiling with
make in general.

Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.

Thanks a lot to all of you.

-ZMY

Apr 3 '07 #5
ZMY wrote:
Is "ld" part of make command? I am not familiar with compiling with
make in general.
No, it's the linker. I takes the object files (.o) which are generated by the
compiler (cc, I imagine) and links them together into the shared library (.so).
make is a program that can automate builds given instructions, but Numeric
doesn't use it, nor do most other Python packages.
Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.
No, I was wondering if you could build any other third-party extension modules.
Did you install Python from source? When building extension modules, Python uses
whatever linker was used to build itself.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Apr 3 '07 #6
ZMY wrote:
Dear all,

I am a real newbie for both python and QNX, but I am still trying to
compile Numeric-24.2 under QNX4.25 with python 2.2.
If you're new to QNX, why are you running QNX 4? That's for legacy
systems only. Move up to QNX 6, which has been out for ten years now.

John Nagle
Apr 3 '07 #7
ZMY
On Apr 3, 10:51 am, Robert Kern <robert.k...@gmail.comwrote:
ZMY wrote:
Is "ld" part of make command? I am not familiar with compiling with
make in general.

No, it's the linker. I takes the object files (.o) which are generated by the
compiler (cc, I imagine) and links them together into the shared library (.so).
make is a program that can automate builds given instructions, but Numeric
doesn't use it, nor do most other Python packages.
Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.

No, I was wondering if you could build any other third-party extension modules.
Did you install Python from source? When building extension modules, Python uses
whatever linker was used to build itself.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto E
Dear Robert,

Looks like you are right. Here is what I got when I compile the
Python2.2 from source (or I believe so):

$ sudo make SHELL=/usr/local/bin/bash
Password:
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py build;; \
esac
running build
running build_ext
building 'regex' extension
skipping //6/openqnx/Python-2.2/Modules/regexmodule.c (build/temp.qnx-
O-PCI-2.2/regexmodule.o up-to-date)
skipping //6/openqnx/Python-2.2/Modules/regexpr.c (build/temp.qnx-O-
PCI-2.2/regexpr.o up-to-date)
ld build/temp.qnx-O-PCI-2.2/regexmodule.o build/temp.qnx-O-PCI-2.2/
regexpr.o -L/usr/local/lib -o build/lib.qnx-O-PCI-2.2/regex.so
unable to execute ld: No such file or directory
.....

If there is no 'ld' linker, what should be used instead??

BTW, the reason I am still using QNX4.25 is because I was trying to
install python on this legacy system. We can't move to QNX6 unless we
want to redo all other code as well, which took 3 years of a good
programmer :-(

- ZMY

Apr 3 '07 #8
ZMY
On Apr 3, 1:33 pm, "ZMY" <zhonghua.m.y...@gmail.comwrote:
On Apr 3, 10:51 am, Robert Kern <robert.k...@gmail.comwrote:
ZMYwrote:
Is "ld" part of make command? I am not familiar with compiling with
make in general.
No, it's the linker. I takes the object files (.o) which are generated by the
compiler (cc, I imagine) and links them together into the shared library (.so).
make is a program that can automate builds given instructions, but Numeric
doesn't use it, nor do most other Python packages.
Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.
No, I was wondering if you could build any other third-party extension modules.
Did you install Python from source? When building extension modules, Python uses
whatever linker was used to build itself.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto E

Dear Robert,

Looks like you are right. Here is what I got when I compile the
Python2.2 from source (or I believe so):

$ sudo make SHELL=/usr/local/bin/bash
Password:
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py build;; \
esac
running build
running build_ext
building 'regex' extension
skipping //6/openqnx/Python-2.2/Modules/regexmodule.c (build/temp.qnx-
O-PCI-2.2/regexmodule.o up-to-date)
skipping //6/openqnx/Python-2.2/Modules/regexpr.c (build/temp.qnx-O-
PCI-2.2/regexpr.o up-to-date)
ld build/temp.qnx-O-PCI-2.2/regexmodule.o build/temp.qnx-O-PCI-2.2/
regexpr.o -L/usr/local/lib -o build/lib.qnx-O-PCI-2.2/regex.so
unable to execute ld: No such file or directory
....

If there is no 'ld' linker, what should be used instead??

BTW, the reason I am still using QNX4.25 is because I was trying to
install python on this legacy system. We can't move to QNX6 unless we
want to redo all other code as well, which took 3 years of a good
programmer :-(

-ZMY
I have tried to use Watcom linker 'wlink' in QNX instead of the 'ld'
linker, but I still got problem with _numpymodule.o

Do you have any experience with this??

....
building '_numpy' extension
cc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/usr/local/include/python2.2 -c Src/_numpymodule.c -o build/temp.qnx-
O-PCI-2.2/_numpymodule.o
/usr/watcom/10.6/bin/wcc386 -zq -d+ -dNDEBUG -oil -i=Include -
i=Packages/FFT/Include -i=Packages/RNG/Include -i=/usr/local/include/
python2.2 -ms -fo=build/temp.qnx-O-PCI-2.2/_numpymodule.o -4r -i=/usr/
watcom/10.6/usr/include -i=/usr/include Src/_numpymodule.c
cc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/usr/local/include/python2.2 -c Src/arrayobject.c -o build/temp.qnx-
O-PCI-2.2/arrayobject.o
/usr/watcom/10.6/bin/wcc386 -zq -d+ -dNDEBUG -oil -i=Include -
i=Packages/FFT/Include -i=Packages/RNG/Include -i=/usr/local/include/
python2.2 -ms -fo=build/temp.qnx-O-PCI-2.2/arrayobject.o -4r -i=/usr/
watcom/10.6/usr/include -i=/usr/include Src/arrayobject.c
Src/arrayobject.c(527): Warning! W124: Comparison result always 0
cc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/usr/local/include/python2.2 -c Src/ufuncobject.c -o build/temp.qnx-
O-PCI-2.2/ufuncobject.o
/usr/watcom/10.6/bin/wcc386 -zq -d+ -dNDEBUG -oil -i=Include -
i=Packages/FFT/Include -i=Packages/RNG/Include -i=/usr/local/include/
python2.2 -ms -fo=build/temp.qnx-O-PCI-2.2/ufuncobject.o -4r -i=/usr/
watcom/10.6/usr/include -i=/usr/include Src/ufuncobject.c
wlink build/temp.qnx-O-PCI-2.2/_numpymodule.o build/temp.qnx-O-PCI-2.2/
arrayobject.o build/temp.qnx-O-PCI-2.2/ufuncobject.o -o build/lib.qnx-
O-PCI-2.2/_numpy.so
WATCOM Linker Version 10.6
Copyright by WATCOM International Corp. 1985, 1996. All rights
reserved.
WATCOM is a trademark of WATCOM International Corp.
Error(3033): directive error near 'build/temp.qnx-O-PCI-2.2/
_numpymodule.o'
error: command 'wlink' failed with exit status 1
Apr 3 '07 #9
ZMY wrote:
On Apr 3, 10:51 am, Robert Kern <robert.k...@gmail.comwrote:
>ZMY wrote:
>>Is "ld" part of make command? I am not familiar with compiling with
make in general.
No, it's the linker. I takes the object files (.o) which are generated by the
compiler (cc, I imagine) and links them together into the shared library (.so).
make is a program that can automate builds given instructions, but Numeric
doesn't use it, nor do most other Python packages.
>>Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.
No, I was wondering if you could build any other third-party extension modules.
Did you install Python from source? When building extension modules, Python uses
whatever linker was used to build itself.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto E

Dear Robert,

Looks like you are right. Here is what I got when I compile the
Python2.2 from source (or I believe so):

$ sudo make SHELL=/usr/local/bin/bash
Password:
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py build;; \
esac
running build
running build_ext
building 'regex' extension
skipping //6/openqnx/Python-2.2/Modules/regexmodule.c (build/temp.qnx-
O-PCI-2.2/regexmodule.o up-to-date)
skipping //6/openqnx/Python-2.2/Modules/regexpr.c (build/temp.qnx-O-
PCI-2.2/regexpr.o up-to-date)
ld build/temp.qnx-O-PCI-2.2/regexmodule.o build/temp.qnx-O-PCI-2.2/
regexpr.o -L/usr/local/lib -o build/lib.qnx-O-PCI-2.2/regex.so
unable to execute ld: No such file or directory
....

If there is no 'ld' linker, what should be used instead??
I don't know. I've never used QNX. It looks like the Python binaries were built
with a linker that you don't have on your system. Usually, you have to use the
same compiler/linker combination to build extension modules that you used to
build Python itself.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Apr 3 '07 #10
ZMY
On Apr 3, 2:52 pm, Robert Kern <robert.k...@gmail.comwrote:
ZMY wrote:
On Apr 3, 10:51 am, Robert Kern <robert.k...@gmail.comwrote:
ZMY wrote:
Is "ld" part of make command? I am not familiar with compiling with
make in general.
No, it's the linker. I takes the object files (.o) which are generated by the
compiler (cc, I imagine) and links them together into the shared library (.so).
make is a program that can automate builds given instructions, but Numeric
doesn't use it, nor do most other Python packages.
>Most other extensions (including math, os, struct, cPickle) from
Python 2.2 works when I install python on QNX.
No, I was wondering if you could build any other third-party extension modules.
Did you install Python from source? When building extension modules, Python uses
whatever linker was used to build itself.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto E
Dear Robert,
Looks like you are right. Here is what I got when I compile the
Python2.2 from source (or I believe so):
$ sudo make SHELL=/usr/local/bin/bash
Password:
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E //6/openqnx/
Python-2.2/setup.py build;; \
esac
running build
running build_ext
building 'regex' extension
skipping //6/openqnx/Python-2.2/Modules/regexmodule.c (build/temp.qnx-
O-PCI-2.2/regexmodule.o up-to-date)
skipping //6/openqnx/Python-2.2/Modules/regexpr.c (build/temp.qnx-O-
PCI-2.2/regexpr.o up-to-date)
ld build/temp.qnx-O-PCI-2.2/regexmodule.o build/temp.qnx-O-PCI-2.2/
regexpr.o -L/usr/local/lib -o build/lib.qnx-O-PCI-2.2/regex.so
unable to execute ld: No such file or directory
....
If there is no 'ld' linker, what should be used instead??

I don't know. I've never used QNX. It looks like the Python binaries were built
with a linker that you don't have on your system. Usually, you have to use the
same compiler/linker combination to build extension modules that you used to
build Python itself.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
Dear All,

I finally figured out how to install Numeric Python on QNX4. To my
understanding of a QNX programmer's lecture, the problem of QNX4 is
that it doesn't support dynamic linking, so the linker can't link the
new compiled object files with existing python binary. The new module
must be built together with python itself.

What I did was:

1) copy every file in /Lib, /Src, /Include from Numeric/ into the
corresponding directories in /openqnx/Python2.2/ (I put *object files
in /Object)

2) change Modules/Setup to include following (ranlib and arraytypes
don't work, but I got modules I need)

_numpy _numpymodule.c arrayobject.c ufuncobject.c
#ranlib ranlibmodule.c ranlib.c
umath umathmodule.c
multiarray multiarraymodule.c
# arraytypes arraytypes.c
arrayfns arrayfnsmodule.c

3) install from source by make
Thanks a lot for all your help again!

Apr 4 '07 #11
ZMY wrote:
I finally figured out how to install Numeric Python on QNX4. To my
understanding of a QNX programmer's lecture, the problem of QNX4 is
that it doesn't support dynamic linking, so the linker can't link the
new compiled object files with existing python binary. The new module
must be built together with python itself.
Ouch! Well, I'm glad you found a way to get going. If you have more problems,
please join us on numpy-discussion, where you will find more people who have
experience with Numeric than here. Just be sure to state up front that you need
to use Numeric because you are on Python 2.2 to hold off the inevitable, "you
should really migrate to numpy," spiel.

http://www.scipy.org/Mailing_Lists

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Apr 4 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
1
by: Philippe Grosse | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
0
by: Travis Oliphant | last post by:
Numarray is making great progress and is quite usable for many purposes. An idea that was championed by some is that the Numeric code base would stay static and be replaced entirely by Numarray. ...
2
by: Johannes Nix |Johannes.Nix | last post by:
Hi, I have a tricky problem with Numeric. Some time ago, I have generated a huge and complex data structure, and stored it using the cPickle module. Now I want to evaluate it quickly again on a...
1
by: Mike Hutton | last post by:
I need some help. I am trying to set up our development environment so as to make life easy for my fellow developers (none of whom have used ASP.NET or VS.NET before). We are developing our...
1
by: utab | last post by:
Dear all, I am new to python however not new to programming world, I have got the Numeric package I think because the output seems OK >>> from Numeric import * >>> seems OK but when I try...
10
by: Bryan | last post by:
hi, what is the difference among numeric, numpy and numarray? i'm going to start using matplotlib soon and i'm not sure which one i should use. this page says, "Numarray is a...
2
by: metaperl | last post by:
I've tried both Python 2.4.4 and Python 2.5. I'm trying to build from source and install under a local directory Swarm since OpenSwarm requires builds of Postgres and Python under it's control. ...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.