473,396 Members | 2,002 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,396 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 2000

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.