01-15-2009, 11:17 AM | #1 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Windows Develpment Environment issue
I decided that it was time to set up a clean Windows Calibre Development environment in a VM to help with some testing I want to do. I have gone through all the steps that worked when I built it on my own PC, but I now end up with the following error
Code:
C:\calibre>python setup.py build Setup calibre version: 0.4.127 running build running resources WARNING: Could not find Qt transations Resources are up to date running translations Translations up to date running gui Compiling images... error: The system cannot find the file specified |
01-15-2009, 11:31 AM | #2 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It will be looking for pyuic4.exe and pyrcc4.exe (these are PyQt4 development tools). My development instructions for windows assume that images and forms are compiled already and not needed on windows.
Just copy over images.pyc from a linux install or from the calibre tarball and make sure it has a date newer than the other files in the calibre directory. If you need to do the compiling of images/forms on windows (if you are hacking on the GUI), you have to pass the appropriate switches when compiling PyQt to ensure that pyrcc4 and pyuic4 are built (Just compile everything instead of restricting to only needed modules) |
Advert | |
|
01-17-2009, 12:21 PM | #3 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I actually had those tools installed as I had used the windows binary install package for PyQt4. I decided to persevere and see if I can do a complete build from source on Windows rather than copying some files across from the linux builds. I am getting closer but not there yet. Things I have found so far are:
Would it better if I put all this in a ticket? |
01-17-2009, 01:15 PM | #4 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The Qt path is not hardcoded anywhere. It is detected from the output of qmake, which should be in your PATH
Those include directories are for the windows driver development kit which is need to compile a windows specific module winutil.pyd You can always create a simple .bat file that sets up the include directories the way they should be on your system, like the bat file used to setup the visual studio command prompt. Once you do that, any extra directories in setup.py will simply have no effect You should run python setup.py build_ext to create the lzx and other C extensions. |
01-17-2009, 02:12 PM | #5 | ||||
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Code:
C:\Calibre>qmake -v QMake version 2.01a Using Qt version 4.4.3 in C:\Qt\lib I am thinking that the binary version of PyQt that I installed has assumed Qt 4.4.2 as I can see references to it in the file: C:\Python26\Lib\site-packages\PyQt4\pyqtconfig.py This item is not too critical as it is easy to work-around using symbolic links. Probably building PyQt4 from source will also correct this problem so I will check that out. Quote:
Quote:
Quote:
python setup.py build I still got the errror message about being unable to copy the lzx.so file! Not sure where that message is originating from so that I can correct/workaround it. |
||||
Advert | |
|
01-17-2009, 02:37 PM | #6 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
A patch to read the include dirs from the environment is fine. What does you src/calibre/plugins directory contain?
|
01-17-2009, 02:51 PM | #7 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
It contains the following:
lzx.pyd lzx.pyd.manifest msdes.pyd msdes.pyd.manifest pictureflow.pyd winutil.pyd winutil.pyd.manifest All files have a recent timestamp (which implies they have been built recently?) - with the pictureflow.pyd one being a bit earlier than the others. The same set of files can be found under C:\calibre\build\lib.win32-2.6\calibre\plugins if it matters. The interesting thing there is that the timestamps for those under the build path are older than those under the src path except for pictureflow.pyd which appears to be the same. |
01-17-2009, 02:57 PM | #8 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Post the full output of running python setup.py build
|
01-17-2009, 03:25 PM | #9 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
here it is:
Code:
C:\Calibre>python setup.py build Setup calibre version: 0.4.128 running build running resources WARNING: Could not find Qt transations Resources are up to date running translations Translations up to date running gui Images are up to date running build_ext C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\lzx -IC:\Python26\PC /T csrc/calibre/utils/lzx/lzxmodule.c /FoC:\Calibre\build\temp.win32-2.6\Release\ca libre.plugins.lzx\lzxmodule.c.obj 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' lzxmodule.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\lzx -IC:\Python26\PC /T csrc/calibre/utils/lzx/compressor.c /FoC:\Calibre\build\temp.win32-2.6\Release\c alibre.plugins.lzx\compressor.c.obj 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' compressor.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\lzx -IC:\Python26\PC /T csrc/calibre/utils/lzx/lzxd.c /FoC:\Calibre\build\temp.win32-2.6\Release\calibre .plugins.lzx\lzxd.c.obj 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' lzxd.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\lzx -IC:\Python26\PC /T csrc/calibre/utils/lzx/lzc.c /FoC:\Calibre\build\temp.win32-2.6\Release\calibre. plugins.lzx\lzc.c.obj 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' lzc.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\lzx -IC:\Python26\PC /T csrc/calibre/utils/lzx/lzxc.c /FoC:\Calibre\build\temp.win32-2.6\Release\calibre .plugins.lzx\lzxc.c.obj 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' lzxc.c src/calibre/utils/lzx/lzxc.c(1203) : warning C4244: '=' : conversion from 'short ' to 'uint8_t', possible loss of data src/calibre/utils/lzx/lzxc.c(1206) : warning C4244: '=' : conversion from 'short ' to 'uint8_t', possible loss of data C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCRE MENTAL:NO /LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild /EXPORT:initlzx C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.lzx\lzxmodule.c.obj C:\ Calibre\build\temp.win32-2.6\Release\calibre.plugins.lzx\compressor.c.obj C:\Cal ibre\build\temp.win32-2.6\Release\calibre.plugins.lzx\lzxd.c.obj C:\Calibre\buil d\temp.win32-2.6\Release\calibre.plugins.lzx\lzc.c.obj C:\Calibre\build\temp.win 32-2.6\Release\calibre.plugins.lzx\lzxc.c.obj /OUT:C:\Calibre\build\temp.win32-2 .6\Release\calibre.plugins.lzx\lzx.pyd Creating library C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.lzx\ lzx.lib and object C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.lzx\l zx.exp C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\msdes -IC:\Python26\PC /Tcsrc/calibre/utils/msdes/msdesmodule.c /FoC:\Calibre\build\temp.win32-2.6\Rele ase\calibre.plugins.msdes\msdesmodule.c.obj 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' msdesmodule.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG -IC:\Python26\include -Isrc\calibre\utils\msdes -IC:\Python26\PC /Tcsrc/calibre/utils/msdes/des.c /FoC:\Calibre\build\temp.win32-2.6\Release\cali bre.plugins.msdes\des.c.obj 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' des.c C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCRE MENTAL:NO /LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild /EXPORT:initmsd es C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.msdes\msdesmodule.c.o bj C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.msdes\des.c.obj /OUT: C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.msdes\msdes.pyd Creating library C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.msde s\msdes.lib and object C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.m sdes\msdes.exp building 'calibre.plugins.pictureflow' extension C:\Qt\bin\qmake.exe -o Makefile.qt pictureflow.pro C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe -f Makefile.qt Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makef ile.qt.Release Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GX /DNDEBUG /X -IC:\Python26\include -IC:\Python26\PC -IC:\SymLinks\DDK_inclu de\ -IC:\SymLinks\VC_include\ /Tcsrc/calibre/utils/windows/winutil.c /FoC:\Calib re\build\temp.win32-2.6\Release\calibre.plugins.winutil\winutil.c.obj 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' winutil.c src/calibre/utils/windows/winutil.c(211) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [10]' src/calibre/utils/windows/winutil.c(211) : warning C4024: 'swprintf' : different types for formal and actual parameter 2 src/calibre/utils/windows/winutil.c(211) : warning C4047: 'function' : 'const wc har_t *' differs in levels of indirection from 'unsigned int' src/calibre/utils/windows/winutil.c(211) : warning C4024: 'swprintf' : different types for formal and actual parameter 3 src/calibre/utils/windows/winutil.c(212) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [10]' src/calibre/utils/windows/winutil.c(212) : warning C4024: 'swprintf' : different types for formal and actual parameter 2 src/calibre/utils/windows/winutil.c(212) : warning C4047: 'function' : 'const wc har_t *' differs in levels of indirection from 'unsigned int' src/calibre/utils/windows/winutil.c(212) : warning C4024: 'swprintf' : different types for formal and actual parameter 3 src/calibre/utils/windows/winutil.c(213) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [10]' src/calibre/utils/windows/winutil.c(213) : warning C4024: 'swprintf' : different types for formal and actual parameter 2 src/calibre/utils/windows/winutil.c(213) : warning C4047: 'function' : 'const wc har_t *' differs in levels of indirection from 'unsigned int' src/calibre/utils/windows/winutil.c(213) : warning C4024: 'swprintf' : different types for formal and actual parameter 3 src/calibre/utils/windows/winutil.c(214) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [10]' src/calibre/utils/windows/winutil.c(214) : warning C4024: 'swprintf' : different types for formal and actual parameter 2 src/calibre/utils/windows/winutil.c(214) : warning C4047: 'function' : 'const wc har_t *' differs in levels of indirection from 'unsigned int' src/calibre/utils/windows/winutil.c(214) : warning C4024: 'swprintf' : different types for formal and actual parameter 3 src/calibre/utils/windows/winutil.c(289) : warning C4996: 'wcscpy': This functio n or variable may be unsafe. Consider using wcscpy_s instead. To disable depreca tion, use _CRT_SECURE_NO_WARNINGS. See online help for details. src/calibre/utils/windows/winutil.c(570) : warning C4996: 'mbstowcs': This funct ion or variable may be unsafe. Consider using mbstowcs_s instead. To disable dep recation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\SymLinks\VC_include\stdlib.h(499) : see declaration of 'mbstowcs' src/calibre/utils/windows/winutil.c(573) : warning C4996: 'mbstowcs': This funct ion or variable may be unsafe. Consider using mbstowcs_s instead. To disable dep recation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\SymLinks\VC_include\stdlib.h(499) : see declaration of 'mbstowcs' src/calibre/utils/windows/winutil.c(577) : warning C4996: 'localtime': This func tion or variable may be unsafe. Consider using localtime_s instead. To disable d eprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\SymLinks\VC_include\time.inl(114) : see declaration of 'localtime' C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCRE MENTAL:NO /LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild shell32.lib set upapi.lib /EXPORT:initwinutil C:\Calibre\build\temp.win32-2.6\Release\calibre.pl ugins.winutil\winutil.c.obj /OUT:C:\Calibre\build\temp.win32-2.6\Release\calibre .plugins.winutil\winutil.pyd Creating library C:\Calibre\build\temp.win32-2.6\Release\calibre.plugins.winu til\winutil.lib and object C:\Calibre\build\temp.win32-2.6\Release\calibre.plugi ns.winutil\winutil.exp running build_py error: can't copy 'src\calibre\plugins\lzx.so': doesn't exist or not a regular f ile |
01-17-2009, 03:31 PM | #10 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yeah but not really useful. Perhaps there's a reference to lzx.so in some generated file. Try running
python setup.py clean and then python setup.py build |
01-17-2009, 03:53 PM | #11 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I seem to have accidentally deleted my C:\Qt folder - so it is going to take me quite a while to regenerate that output you asked for. Probably means I will not get that it until tomorrow I knew it was time to make a backup of the VM!
EDIT: Found it - I had just moved it under another folder - not deleted it so it should not take too long Last edited by itimpi; 01-17-2009 at 03:55 PM. |
01-17-2009, 04:12 PM | #12 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
OK - here is that output. As there is rather a lot of it I have attached it as a file.
|
01-17-2009, 04:18 PM | #13 |
creator of calibre
Posts: 43,881
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah ok, I can reproduce the error in my windows build environment, I'll work on a fix and get back to you.
|
01-17-2009, 04:28 PM | #14 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Great. At least I am not going doing something absolutely stupid (it has been known ).
|
01-17-2009, 04:32 PM | #15 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
On a slightly different issue - do you know if there are any tools that allow python debugging to be done from the Visual Studio 2008 IDE? I am extremely familiar with that IDE so would prefer to use it if I could. If not I will have to continue to use the Eclipse IDE I have installed as an alternative.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-505 FSK Test-Environment for Autorun Applications under MS-Windows | Mark Nord | Sony Reader Dev Corner | 608 | 04-16-2012 02:35 AM |
What is your ideal writing environment? | rudykerkhoven | Writers' Corner | 32 | 10-22-2010 04:17 PM |
Installing dev environment | bran | iRex Developer's Corner | 13 | 09-28-2010 05:43 PM |
setup development environment | JeffElkins | Calibre | 21 | 10-22-2008 03:25 PM |
What is your favorite reading environment? | mogui | Lounge | 16 | 11-06-2007 08:50 AM |