failed to build decompyle/unpyc project on WindowsXP

higer higerinbeijing at gmail.com
Fri Jun 12 23:29:41 EDT 2009


On Jun 12, 4:55 pm, higer <higerinbeij... at gmail.com> wrote:
> Maybe everyone know that decompyle(hosted on SourceForge.net) is a
> tool to transfer a .pyc file to .py file and now it does only support
> Python 2.3 or the below. I have found a project named unpyc which can
> support Python version 2.5. Unpyc project is build on decompyle which
> is hosted on google code and if you want you can download it.
>
> I build unpyc on Ubuntu successfully and can run it ok. But with some
> purpose, I just want to use this tool on my WindowsXP, so I tried to
> build it. I have tried many times and methods, with .net2003 or
> MingGW, but I failed. So,I come here looking for sombody can help me.I
> will give the showing error message with different method on the
> following:
>
> 1     Using command : python setup.py install
> F:\unpyc>python setup.py install
> running install
> running build
> running build_py
> creating build\lib.win32-2.5
> creating build\lib.win32-2.5\unpyc
> copying unpyc\dis_15.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_16.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_20.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_21.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_22.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_23.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_24.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_25.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_26.py -> build\lib.win32-2.5\unpyc
> copying unpyc\dis_files.py -> build\lib.win32-2.5\unpyc
> copying unpyc\magics.py -> build\lib.win32-2.5\unpyc
> copying unpyc\marshal_files.py -> build\lib.win32-2.5\unpyc
> copying unpyc\opcode_23.py -> build\lib.win32-2.5\unpyc
> copying unpyc\opcode_24.py -> build\lib.win32-2.5\unpyc
> copying unpyc\opcode_25.py -> build\lib.win32-2.5\unpyc
> copying unpyc\opcode_26.py -> build\lib.win32-2.5\unpyc
> copying unpyc\Parser.py -> build\lib.win32-2.5\unpyc
> copying unpyc\Scanner.py -> build\lib.win32-2.5\unpyc
> copying unpyc\spark.py -> build\lib.win32-2.5\unpyc
> copying unpyc\verify.py -> build\lib.win32-2.5\unpyc
> copying unpyc\Walker.py -> build\lib.win32-2.5\unpyc
> copying unpyc\__init__.py -> build\lib.win32-2.5\unpyc
> running build_ext
> building 'unpyc/marshal_25' extension
> creating build\temp.win32-2.5
> creating build\temp.win32-2.5\Release
> creating build\temp.win32-2.5\Release\unpyc
> f:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /
> nologo /Ox /MD /W3 /GX /DNDEBU
> G -IF:\Python25\include -IF:\Python25\PC /Tcunpyc/marshal_25.c /Fobuild
> \temp.win32-2.5\Release\unpyc
> /marshal_25.obj
> marshal_25.c
> unpyc\marshal_25.c(401) : warning C4273: 'PyMarshal_WriteLongToFile' :
> inconsistent dll linkage
> unpyc\marshal_25.c(413) : warning C4273:
> 'PyMarshal_WriteObjectToFile' : inconsistent dll linkage
> unpyc\marshal_25.c(1004) : warning C4273:
> 'PyMarshal_ReadShortFromFile' : inconsistent dll linkage
> unpyc\marshal_25.c(1015) : warning C4273:
> 'PyMarshal_ReadLongFromFile' : inconsistent dll linkage
> unpyc\marshal_25.c(1044) : warning C4273:
> 'PyMarshal_ReadLastObjectFromFile' : inconsistent dll link
> age
> unpyc\marshal_25.c(1087) : warning C4273:
> 'PyMarshal_ReadObjectFromFile' : inconsistent dll linkage
> unpyc\marshal_25.c(1101) : warning C4273:
> 'PyMarshal_ReadObjectFromString' : inconsistent dll linkag
> e
> unpyc\marshal_25.c(1116) : warning C4273:
> 'PyMarshal_WriteObjectToString' : inconsistent dll linkage
>
> f:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /
> DLL /nologo /INCREMENTAL:NO /LI
> BPATH:F:\Python25\libs /LIBPATH:F:\Python25\PCBuild /EXPORT:initunpyc/
> marshal_25 build\temp.win32-2.
> 5\Release\unpyc/marshal_25.obj /OUT:build\lib.win32-2.5\unpyc/
> marshal_25.pyd /IMPLIB:build\temp.win3
> 2-2.5\Release\unpyc\marshal_25.lib
> marshal_25.obj : error LNK2001: unresolved external symbol initunpyc/
> marshal_25
> build\temp.win32-2.5\Release\unpyc\marshal_25.lib : fatal error
> LNK1120: 1 unresolved externals
> LINK : fatal error LNK1141: failure during build of exports file
> error: command '"f:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\bin\link.exe"' failed with e
> xit status 1141
>
> 2    Using command:   python setup.py build -c mingw32
>
> F:\unpyc>python setup.py build -c mingw32
> running build
> running build_py
> running build_ext
> building 'unpyc/marshal_25' extension
> F:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IF:\Python25\include -
> IF:\Python25\PC -c unpyc/mars
> hal_25.c -o build\temp.win32-2.5\Release\unpyc\marshal_25.o
> unpyc/marshal_25.c:1087: warning: 'PyMarshal_ReadObjectFromFile'
> defined locally after being referen
> ced with dllimport linkage
> unpyc/marshal_25.c:1101: warning: 'PyMarshal_ReadObjectFromString'
> defined locally after being refer
> enced with dllimport linkage
> writing build\temp.win32-2.5\Release\unpyc\marshal_25.def
> F:\mingw\bin\gcc.exe -mno-cygwin -shared -s build
> \temp.win32-2.5\Release\unpyc\marshal_25.o build\te
> mp.win32-2.5\Release\unpyc\marshal_25.def -LF:\Python25\libs -LF:
> \Python25\PCBuild -lpython25 -lmsvc
> r71 -o build\lib.win32-2.5\unpyc/marshal_25.pyd
> F:\Python25\libs/libpython25.a(dcbbs00336.o):(.text+0x0): multiple
> definition of `PyMarshal_ReadObje
> ctFromString'
> build\temp.win32-2.5\Release\unpyc\marshal_25.o:marshal_25.c:(.text
> +0x2958): first defined here
> F:\Python25\libs/libpython25.a(dcbbs00335.o):(.text+0x0): multiple
> definition of `PyMarshal_ReadObje
> ctFromFile'
> build\temp.win32-2.5\Release\unpyc\marshal_25.o:marshal_25.c:(.text
> +0x28fb): first defined here
> Cannot export initunpyc/marshal_25: symbol not defined
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> PS: necessary files has been added in proper path: Python25.dll is in
> windows/system32; python25.lib and libpython25.a is in Python25/libs;
>
> Appreciate that you can do me a favor.Thanks

There is nobody can help me?





More information about the Python-list mailing list