473,545 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pyrex Compile - Missing Symbols in Python

I'm trying to get a cross compiler working for arm-wince-pe. This is
the output for the primes Pyrex example. If I compile simple Hello,
World's etc, it works fine, but for some reason Python
libraries/headers seem to produce this. I have libpython2.3.a in
/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/
and /usr/lib/python2.3/config. I've checked it using
arm-wince-pe-objdump. I also extracted it with
arm-wince-pe-ar and it contains the symbols.

Below the following output, I've also pasted a debug output from the linker.

Any ideas?

$ python setup.py build_ext --inplace -c cygwin
running build_ext
building 'Primes' extension
creating build
creating build/temp.cygwin-1.5.11-i686-2.3
arm-wince-pe-gcc -O -Wall -I/usr/include/python2.3 -c primes.c -o build/temp.cyg
win-1.5.11-i686-2.3/primes.o
primes.c: In function `__pyx_f_6prime s_primes':
primes.c:137: warning: label `__pyx_L4' defined but not used
primes.c:108: warning: label `__pyx_L6' defined but not used
primes.c:98: warning: label `__pyx_L5' defined but not used
primes.c:89: warning: label `__pyx_L3' defined but not used
primes.c: At top level:
primes.c:12: warning: `__Pyx_UnpackIt em' declared `static' but never defined
primes.c:13: warning: `__Pyx_EndUnpac k' declared `static' but never defined
primes.c:14: warning: `__Pyx_PrintIte m' declared `static' but never defined
primes.c:15: warning: `__Pyx_PrintNew line' declared `static' but never defined
primes.c:16: warning: `__Pyx_Raise' declared `static' but never defined
primes.c:17: warning: `__Pyx_ReRaise' declared `static' but never defined
primes.c:18: warning: `__Pyx_Import' declared `static' but never defined
primes.c:19: warning: `__Pyx_GetExcVa lue' declared `static' but never defined
primes.c:20: warning: `__Pyx_ArgTypeT est' declared `static' but never defined
primes.c:21: warning: `__Pyx_TypeTest ' declared `static' but never defined
primes.c:22: warning: `__Pyx_GetStarA rgs' declared `static' but never defined
primes.c:23: warning: `__Pyx_WriteUnr aisable' declared `static' but never define
d
primes.c:25: warning: `__Pyx_ImportTy pe' declared `static' but never defined
primes.c:26: warning: `__Pyx_SetVtabl e' declared `static' but never defined
primes.c:27: warning: `__Pyx_GetVtabl e' declared `static' but never defined
primes.c:28: warning: `__Pyx_CreateCl ass' declared `static' but never defined
primes.c:30: warning: `__Pyx_InitStri ngs' declared `static' but never defined
primes.c:31: warning: `__Pyx_GetName' declared `static' but never defined
writing build/temp.cygwin-1.5.11-i686-2.3/Primes.def
arm-wince-pe-gcc -mdll -static -s build/temp.cygwin-1.5.11-i686-2.3/primes.o bui
ld/temp.cygwin-1.5.11-i686-2.3/Primes.def -L/usr/lib/python2.3/config -lpython2.
3 -o Primes.dll
Cannot export initPrimes (initPrimes): symbol not found
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x30):primes.c: undefined refer
ence to `PyArg_ParseTup leAndKeywords'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x54):primes.c: undefined refer
ence to `PyList_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x130):primes.c : undefined refe
rence to `PyObject_GetAt tr'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x144):primes.c : undefined refe
rence to `PyInt_FromLong '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x158):primes.c : undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x174):primes.c : undefined refe
rence to `PyObject_CallO bject'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x2d0):primes.c : undefined refe
rence to `_Py_NoneStruct '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x308):primes.c : undefined refe
rence to `Py_InitModule4 '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x320):primes.c : undefined refe
rence to `PyImport_AddMo dule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x348):primes.c : undefined refe
rence to `PyObject_SetAt trString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x3d4):primes.c : undefined refe
rence to `PyString_Inter nFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x430):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x444):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x45c):primes.c : undefined refe
rence to `PyModule_GetDi ct'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x470):primes.c : undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x484):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4d0):primes.c : undefined refe
rence to `PyCode_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4e0):primes.c : undefined refe
rence to `PyThreadState_ Get'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4f0):primes.c : undefined refe
rence to `PyFrame_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x508):primes.c : undefined refe
rence to `PyTraceBack_He re'
/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/crt0.o(.t
ext+0x6c): undefined reference to `WinMain'
collect2: ld returned 1 exit status
error: command 'arm-wince-pe-gcc' failed with exit status 1

=============== =============== =============== =============== =============== =====

$ arm-wince-pe-gcc -mdll -static -s build/temp.cygwin-1.5.11-i686-2.3/primes.o
build/temp.cygwin-1.5.11-i686-2.3/Primes.def -L/usr/lib/python2.3/config -lpythe
on2.3 -o Primes.dll -v -Wl,-debug
Reading specs from /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/specsundefined refe
Configured with: ./configure --enable-languages=c,c++ --target=arm-wince-pe : (r
econfigured) ./configure --target=arm-wince-pe --host=arm-wince-pe --enable-lang

uages=c,c++ --enable-multilib=no : (reconfigured) ./configure --target=arm-wince
-pe --host=arm-wince-pe --enable-languages=c,c++ --enable-multilib=no : (reconfi
gured) ./configure --target=arm-pe --enable-languages=c,c++ --enable-multilib=no
--with-newlib : (reconfigured) ./configure --target=arm-pe --enable-languages=c
,c++ --enable-multilib=no --with-newlib : (reconfigured) ./configure --target=ar
m-pe --enable-languages=c,c++ --enable-multilib=no --with-newlib : (reconfigured
) ./configure --target=arm-wince-pe --enable-languages=c,c++ --enable-multilib=n
o --with-newlib : (reconfigured) ./configure --target=arm-wince-pe --enable-lang
uages=c,c++ --enable-multilib=no --with-newlib
Thread model: single2.1
gcc version 3.3.3rned 1 exit status
/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/collect2.exe -X -o Primes.dll -s /usr
/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/crt0.o -L/usr
/lib/python2.3/config -L/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3 -L/usr/local/l
ib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib build/temp.cygwin-1.5
..11-i686-2.3/primes.o build/temp.cygwin-1.5.11-i686-2.3/Primes.def -lpython2.3 -
debug -lcdll -lcdllimp -lcoredll
Convert string '/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-li
b/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/arm-wince-pe/:/usr/lib/gcc/arm-winc
e-pe/3.3.3/:/usr/lib/gcc/arm-wince-pe/:/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3
/../../../../arm-wince-pe/bin/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/arm-win
ce-pe/3.3.3/../../../../arm-wince-pe/bin/' into prefixes, separator = ':'
- add prefix: /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/
- add prefix: /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/
- add prefix: /usr/local/lib/gcc-lib/arm-wince-pe/
- add prefix: /usr/lib/gcc/arm-wince-pe/3.3.3/
- add prefix: /usr/lib/gcc/arm-wince-pe/
- add prefix: /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-
pe/bin/arm-wince-pe/3.3.3/
- add prefix: /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-
pe/bin/
Convert string '/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/
system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Progr
am Files/ATI Technologies/ATI Control Panel' into prefixes, separator = ':'
- add prefix: /usr/local/bin/
- add prefix: /usr/bin/
- add prefix: /bin/
- add prefix: /usr/X11R6/bin/
- add prefix: /cygdrive/c/WINDOWS/system32/
- add prefix: /cygdrive/c/WINDOWS/
- add prefix: /cygdrive/c/WINDOWS/System32/Wbem/
- add prefix: /cygdrive/c/Program Files/ATI Technologies/ATI Control Panel/
Looking for 'real-ld'
Looking for 'collect-ld'
Looking for 'ld'
Looking for 'gnm'
Looking for 'arm-wince-pe-gnm'
Looking for 'nm'
Looking for 'gstrip'
Looking for 'arm-wince-pe-gstrip'
Looking for 'strip'
Looking for 'arm-wince-pe-gcc'
Looking for 'arm-wince-pe-gcc'
collect2 version 3.3.3 (ARM/pe)
ld_file_name = /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-
wince-pe/bin/ld
c_file_name = /usr/local/bin/arm-wince-pe-gcc
nm_file_name = /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-
wince-pe/bin/nm
strip_file_name = /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-
wince-pe/bin/strip
c_file = /cygdrive/c/DOCUME~1/adam/LOCALS~1/Temp/ccAiL4ml.c
o_file = /cygdrive/c/DOCUME~1/adam/LOCALS~1/Temp/cc0qmZzw.o
COLLECT_GCC_OPT IONS = '-mdll' '-static' '-s' '-L/usr/lib/python2.3/config' '-o'
'Primes.dll' '-v'
COLLECT_GCC = arm-wince-pe-gcc
COMPILER_PATH = /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/:/usr/local/lib/
gcc-lib/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/arm-wince-pe/:/usr/lib/gcc/ar
m-wince-pe/3.3.3/:/usr/lib/gcc/arm-wince-pe/:/usr/local/lib/gcc-lib/arm-wince-pe
/3.3.3/../../../../arm-wince-pe/bin/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/a
rm-wince-pe/3.3.3/../../../../arm-wince-pe/bin/
LIBRARY_PATH = /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/:/usr/lib/gcc/ar
m-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-winc
e-pe/lib/arm-wince-pe/3.3.3/:/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../
.../arm-wince-pe/lib/

/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/bin/ld -X -o
Primes.dll -s /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe

/lib/crt0.o -L/usr/lib/python2.3/config -L/usr/local/lib/gcc-lib/arm-wince-pe/3.
3.3 -L/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib bui
ld/temp.cygwin-1.5.11-i686-2.3/primes.o build/temp.cygwin-1.5.11-i686-2.3/Primes
..def -lpython2.3 -lcdll -lcdllimp -lcoredll
Cannot export initPrimes (initPrimes): symbol not found
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x30):primes.c: undefined refer
ence to `PyArg_ParseTup leAndKeywords'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x54):primes.c: undefined refer
ence to `PyList_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x130):primes.c : undefined refe
rence to `PyObject_GetAt tr'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x144):primes.c : undefined refe
rence to `PyInt_FromLong '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x158):primes.c : undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x174):primes.c : undefined refe
rence to `PyObject_CallO bject'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x2d0):primes.c : undefined refe
rence to `_Py_NoneStruct '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x308):primes.c : undefined refe
rence to `Py_InitModule4 '
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x320):primes.c : undefined refe
rence to `PyImport_AddMo dule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x348):primes.c : undefined refe
rence to `PyObject_SetAt trString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x3d4):primes.c : undefined refe
rence to `PyString_Inter nFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x430):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x444):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x45c):primes.c : undefined refe
rence to `PyModule_GetDi ct'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x470):primes.c : undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x484):primes.c : undefined refe
rence to `PyString_FromS tring'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4d0):primes.c : undefined refe
rence to `PyCode_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4e0):primes.c : undefined refe
rence to `PyThreadState_ Get'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x4f0):primes.c : undefined refe
rence to `PyFrame_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+ 0x508):primes.c : undefined refe
rence to `PyTraceBack_He re'
/usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/crt0.o(.t
ext+0x6c): undefined reference to `WinMain'
collect2: ld returned 1 exit status
[Leaving /cygdrive/c/DOCUME~1/adam/LOCALS~1/Temp/ccAiL4ml.c]
[Leaving /cygdrive/c/DOCUME~1/adam/LOCALS~1/Temp/cc0qmZzw.o]
[Leaving /cygdrive/c/DOCUME~1/adam/LOCALS~1/Temp/ccqzXTMH.ld]
[Leaving Primes.dll]
Jul 18 '05 #1
0 2018

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

Similar topics

4
1981
by: Marco Bubke | last post by:
Hi I have tried to include numarray in Pyrex but I get allways this error: Traceback (most recent call last): File "gears.py", line 9, in ? import gl File "/home/marco/projects/test_pyrex/gl.pyx", line 40, in gl ctypedef class numarray.NumArray :
10
2021
by: Kyler Laird | last post by:
I need to submit C/C++ code for a class. (It's not a programming class. The choice of language is inertial. I think that it mostly serves to distract students from the course subject.) I'm fairly fluent with C but it hurts to think about writing in C when Python is *so* much more appropriate for these operations. I'd like to keep my...
2
1596
by: Yermat | last post by:
Hi, I'm playing with python and try to add type declaration in python. No, don't leave now ! I have done it in order to stay python's syntax compatible (whereas for example pyrex introduce a new syntax) so of course it should not be that nice but... The advantage is that you can debug with the python interpreter and then
4
1561
by: Peter | last post by:
Kernel 2.6.5 Slackware 9.1 Python -V: 2.3.1 running python setup.py install yields the following error: peter@peter:/mnt/src/rox/Pyrex-0.9.1.1$ python setup.py install Traceback (most recent call last): File "setup.py", line 8, in ? if sys.platform in ("unix", "darwin"):
0
315
by: Frost bite | last post by:
I'm trying to get a cross compiler working for arm-wince-pe. This is the output for the primes Pyrex example. If I compile simple Hello, World's etc, it works fine, but for some reason Python libraries/headers seem to produce this. I have libpython2.3.a in /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/ and...
1
3571
by: Martin Bless | last post by:
Now that I've got my extension building machine using the VC++ Toolkit 2003 up and running I'm keen on using Pyrex (Pyrex-0.9.3, Python-2.4.0). But the definition of the swig_sources() method seems to have changed. When I try to build the examples from Pyrex I get a TypeError: c:\Pyrex-0.9.3\Demos> python Setup.py build_ext --inplace
27
3949
by: Julien Fiore | last post by:
Do you wand to install Pyrex on Windows ? Here is a step-by-step guide explaining: A) how to install Pyrex on Windows XP. B) how to compile a Pyrex module. Julien Fiore, U. of Geneva
11
1974
by: Jim Lewis | last post by:
Has anyone found a good link on exactly how to speed up code using pyrex? I found various info but the focus is usually not on code speedup.
7
2034
by: Jim Lewis | last post by:
I'm trying to move a function into pyrex for speed. The python side needs to pass a list to the pyrex function. Do I need to convert to array or something so pyrex can generate tight code? I'm not clear how to do this.
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7778
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.