473,320 Members | 1,856 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,320 software developers and data experts.

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_6primes_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_UnpackItem' declared `static' but never defined
primes.c:13: warning: `__Pyx_EndUnpack' declared `static' but never defined
primes.c:14: warning: `__Pyx_PrintItem' declared `static' but never defined
primes.c:15: warning: `__Pyx_PrintNewline' 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_GetExcValue' declared `static' but never defined
primes.c:20: warning: `__Pyx_ArgTypeTest' declared `static' but never defined
primes.c:21: warning: `__Pyx_TypeTest' declared `static' but never defined
primes.c:22: warning: `__Pyx_GetStarArgs' declared `static' but never defined
primes.c:23: warning: `__Pyx_WriteUnraisable' declared `static' but never define
d
primes.c:25: warning: `__Pyx_ImportType' declared `static' but never defined
primes.c:26: warning: `__Pyx_SetVtable' declared `static' but never defined
primes.c:27: warning: `__Pyx_GetVtable' declared `static' but never defined
primes.c:28: warning: `__Pyx_CreateClass' declared `static' but never defined
primes.c:30: warning: `__Pyx_InitStrings' 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_ParseTupleAndKeywords'
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_GetAttr'
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_CallObject'
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_AddModule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x348):primes.c: undefined refe
rence to `PyObject_SetAttrString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x3d4):primes.c: undefined refe
rence to `PyString_InternFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x430):primes.c: undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x444):primes.c: undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x45c):primes.c: undefined refe
rence to `PyModule_GetDict'
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_FromString'
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_Here'
/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_OPTIONS = '-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_ParseTupleAndKeywords'
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_GetAttr'
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_CallObject'
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_AddModule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x348):primes.c: undefined refe
rence to `PyObject_SetAttrString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x3d4):primes.c: undefined refe
rence to `PyString_InternFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x430):primes.c: undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x444):primes.c: undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x45c):primes.c: undefined refe
rence to `PyModule_GetDict'
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_FromString'
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_Here'
/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 1997

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

Similar topics

4
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...
10
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...
2
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...
4
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...
0
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...
1
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...
27
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
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
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.