ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Compile pyc module failed
jordanliuhao


Joined: 17 Dec 2009
Posts: 0
Reply with quote
I checked out pyc from svn repository trunk/addons/pyc

But when I compile it with the build.cmd ( I use the latest clamav 0.95.3)

I got the following error.

1 What should I do?
2 What's the function of pyc?
Thanks

C:\Users\xxxx\workspace\clamwin\pyc>build.cmd release
Building Release
running build
running build_ext
building 'pyc' extension
C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3
/GX /DNDEBUG -IC:\Users\xxxx\workspace\clamav-release/libclamav -Ic:\python23\
include -Ic:\python23\PC /Tcpyc.c /Fobuild\temp.win32-2.3\Release\pyc.obj -MD
pyc.c
C:\Users\xxxx\workspace\clamav-release/libclamav\clamav.h(137) : error C2632:
'long' followed by 'long' is illegal
C:\Users\xxxx\workspace\clamav-release/libclamav\clamav.h(139) : error C2632:
'long' followed by 'long' is illegal
pyc.c(283) : warning C4013: 'loadDB' undefined; assuming extern returning int
pyc.c(283) : error C2065: 'internal' : undeclared identifier
pyc.c(283) : warning C4022: 'pyc_DEBUG' : pointer mismatch for actual parameter
1
pyc.c(375) : error C2065: 'checkAndLoadDB' : undeclared identifier
pyc.c(375) : warning C4022: 'pyc_DEBUG' : pointer mismatch for actual parameter
1
error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe"' fail
ed with exit status 2
build failed
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
You need MS Visual Studio 2005 to build it, VC98 won't do it without code modifications. pyc is a python binding for libclamav.
View user's profileSend private message
jordanliuhao


Joined: 17 Dec 2009
Posts: 0
Reply with quote
Thanks for the reply.

But when I use visual studio 2008 express to compile it. It says Python is built with Visual Studio 6 and won't continue. I suppose visual studio 2005 may have the same problem. What should I do? Thanks.

BTW, I'm using python2.3

C:\Users\xxxx\workspace\clamwin\pyc>build.cmd release
Building Release
running build
running build_ext
error: Python was built with version 6 of Visual Studio, and extensions need to
be built with the same version of the compiler, but it isn't installed.
build failed
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
use Python 2.4 and VS2005 (that's what we do and they are compatible), or you can build python with VS2008
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 0
Location: Italy
Reply with quote
you mean py23 ? Very Happy
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
yes - looks like I am getting old...
View user's profileSend private message
jordanliuhao


Joined: 17 Dec 2009
Posts: 0
Reply with quote
I followed the document

https://wiki.clamwin.com/index.php/Building_ClamWin

it says

you may experience problems trying to build
with Python 2.4, as the the version of wxPython that ClamWin
works with does not have a binary for Python 2.4, only 2.3
and 2.2. Therefore, Python 2.3 should be used to develop and
build ClamWin.

Maybe need an update.

Thanks
View user's profileSend private message
jordanliuhao


Joined: 17 Dec 2009
Posts: 0
Reply with quote
After install python2.5 (python2.4 need compile pyc with vs2003) and vs2005, I compile the pyc. It asks for libclamav.lib to link.

There is only a win32 clamav version for 0.92. New win32 version is under development and is expected to release in 0.96.
So are you using the 0.92 win32 version? under development 0.96 win32 version? or compiled 0.95 version in win32 by yourself?

Thanks

C:\Users\xxxx\workspace\addons\pyc>build.cmd release
Building Release
running build
running build_ext
building 'pyc' extension
creating build\temp.win32-2.5
creating build\temp.win32-2.5\Release
C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W
3 /GX /DNDEBUG -IC:\Users\xxxx\workspace\clamav-release/libclamav -Ic:\python2
5\include -Ic:\python25\PC /Tcpyc.c /Fobuild\temp.win32-2.5\Release\pyc.obj -MD
cl : Command line warning D9035 : option 'GX' has been deprecated and will be re
moved in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
pyc.c
creating build\lib.win32-2.5
C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin\link.exe /DLL /nologo /INCRE
MENTAL:NO /LIBPATH:c:\python25\libs /LIBPATH:c:\python25\PCBuild /EXPORT:initpyc
build\temp.win32-2.5\Release\pyc.obj C:\Users\xxxx\workspace\clamav-release//
contrib/msvc/Release/Win32/libclamav.lib /OUT:build\lib.win32-2.5\pyc.pyd /IMPLI
B:build\temp.win32-2.5\Release\pyc.lib
LINK : fatal error LNK1181: cannot open input file 'C:\Users\xxxx\workspace\cl
amav-release//contrib/msvc/Release/Win32/libclamav.lib'
error: command 'link.exe' failed with exit status 1181
build failed
View user's profileSend private message
Compile pyc module failed
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic