473,722 Members | 2,244 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 2028

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

Similar topics

4
1985
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
2037
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 sanity and satisfy the course requirements by programming in Python and converting the code to C. It...
2
1604
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
1567
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 /usr/lib/python2.3/config. I've checked it using arm-wince-pe-objdump. I also extracted it with
1
3578
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
3976
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
1996
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
2046
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
8738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9234
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9150
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8028
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6678
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2599
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.