Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Pyrex Compile - Missing Symbols in Python

Reply
Thread Tools

Pyrex Compile - Missing Symbols in Python

 
 
Frost bite
Guest
Posts: n/a
 
      09-25-2004
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)rimes.c:
undefined refer
ence to `PyArg_ParseTupleAndKeywords'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x54)rimes.c:
undefined refer
ence to `PyList_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x130)rimes.c:
undefined refe
rence to `PyObject_GetAttr'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x144)rimes.c:
undefined refe
rence to `PyInt_FromLong'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x15rimes.c:
undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x174)rimes.c:
undefined refe
rence to `PyObject_CallObject'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x2d0)rimes.c:
undefined refe
rence to `_Py_NoneStruct'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x30rimes.c:
undefined refe
rence to `Py_InitModule4'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x320)rimes.c:
undefined refe
rence to `PyImport_AddModule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x34rimes.c:
undefined refe
rence to `PyObject_SetAttrString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x3d4)rimes.c:
undefined refe
rence to `PyString_InternFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x430)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x444)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x45c)rimes.c:
undefined refe
rence to `PyModule_GetDict'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x470)rimes.c:
undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x484)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4d0)rimes.c:
undefined refe
rence to `PyCode_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4e0)rimes.c:
undefined refe
rence to `PyThreadState_Get'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4f0)rimes.c:
undefined refe
rence to `PyFrame_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x50rimes.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)rimes.c:
undefined refer
ence to `PyArg_ParseTupleAndKeywords'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x54)rimes.c:
undefined refer
ence to `PyList_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x130)rimes.c:
undefined refe
rence to `PyObject_GetAttr'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x144)rimes.c:
undefined refe
rence to `PyInt_FromLong'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x15rimes.c:
undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x174)rimes.c:
undefined refe
rence to `PyObject_CallObject'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x2d0)rimes.c:
undefined refe
rence to `_Py_NoneStruct'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x30rimes.c:
undefined refe
rence to `Py_InitModule4'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x320)rimes.c:
undefined refe
rence to `PyImport_AddModule'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x34rimes.c:
undefined refe
rence to `PyObject_SetAttrString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x3d4)rimes.c:
undefined refe
rence to `PyString_InternFromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x430)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x444)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x45c)rimes.c:
undefined refe
rence to `PyModule_GetDict'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x470)rimes.c:
undefined refe
rence to `PyTuple_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x484)rimes.c:
undefined refe
rence to `PyString_FromString'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4d0)rimes.c:
undefined refe
rence to `PyCode_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4e0)rimes.c:
undefined refe
rence to `PyThreadState_Get'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4f0)rimes.c:
undefined refe
rence to `PyFrame_New'
build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x50rimes.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]





__________________________________________________ _________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Pyrex] pyrex functions to replace a method (Re: replace a method Greg Ewing Python 2 06-29-2006 05:25 PM
Re: [Pyrex] Allocating an array.array of a specific length in pyrex Chris Lambacher Python 0 06-08-2005 06:56 PM
Pyrex Compile - Missing Symbols in Python Adam McCarthy Python 0 09-25-2004 12:14 PM
Pyrex 0.9.1.1 compile problem Peter Python 4 05-02-2004 11:33 AM
Re: Pyrex without Python (was Re: calling Pyrex results from C) =?iso-8859-1?Q?Fran=E7ois?= Pinard Python 3 01-21-2004 01:53 PM



Advertisments