shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

Is building with MSVC possible? #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python setup.py build

What is the expected output? What do you see instead?
...
* snip *
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C sources
c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /MD /W3 
/GS- /DNDEBUG /O1 -DSCIPY_MKL_H -Ic:\progra~1\Intel\MKL\1022~1.025\include 
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include 
-IC:\Python26\PC /Tcnumexpr\interpreter.c 
/Fobuild\temp.win32-2.6\Release\numexpr\interpreter.obj
Found executable c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe
c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /MD /W3 
/GS- /DNDEBUG /O1 -DSCIPY_MKL_H -Ic:\progra~1\Intel\MKL\1022~1.025\include 
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include 
-IC:\Python26\PC /Tcnumexpr\win32\pthread.c 
/Fobuild\temp.win32-2.6\Release\numexpr\win32\pthread.obj
c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo 
/INCREMENTAL:NO /LIBPATH:c:\progra~1\Intel\MKL\1022~1.025\ia32\lib 
/LIBPATH:C:\Python26\lib /LIBPATH:C:\ /LIBPATH:C:\Python26\libs 
/LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild 
mkl_solver_sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib 
/EXPORT:initinterpreterbuild\temp.win32-2.6\Release\numexpr\interpreter.obj 
build\temp.win32-2.6\Release\numexpr\win32\pthread.obj 
/OUT:build\lib.win32-2.6\numexpr\interpreter.pyd 
/IMPLIB:build\temp.win32-2.6\Release\numexpr\interpreter.lib 
/MANIFESTFILE:build\temp.win32-2.6\Release\numexpr\interpreter.pyd.manifest 
-Xlinker --rpath -Xlinker 
c:\progra~1\Intel\MKL\1022~1.025\ia32\lib:C:\Python26\lib:C:\:C:\Python26\libs
Found executable c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe
LINK : warning LNK4044: unrecognized option '/Xlinker'; ignored
LINK : warning LNK4044: unrecognized option '/-rpath'; ignored
LINK : warning LNK4044: unrecognized option '/Xlinker'; ignored
LINK : fatal error LNK1104: cannot open file 
'c:\progra~1\Intel\MKL\1022~1.025\ia32\lib:C:\Python26\lib:C:\:C:\Python26\libs.
obj'
error: Command "c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe 
/DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\progra~1\Intel\MKL\1022~1.025\ia32\lib 
/LIBPATH:C:\Python26\lib /LIBPATH:C:\ /LIBPATH:C:\Python26\libs 
/LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild 
mkl_solver_sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib 
/EXPORT:initinterpreter build\temp.win32-2.6\Release\numexpr\interpreter.obj 
build\temp.win32-2.6\Release\numexpr\win32\pthread.obj 
/OUT:build\lib.win32-2.6\numexpr\interpreter.pyd 
/IMPLIB:build\temp.win32-2.6\Release\numexpr\interpreter.lib 
/MANIFESTFILE:build\temp.win32-2.6\Release\numexpr\interpreter.pyd.manifest 
-Xlinker --rpath -Xlinker 
c:\progra~1\Intel\MKL\1022~1.025\ia32\lib:C:\Python26\lib:C:\:C:\Python26\libs" 
failed with exit status 1104

What version of the product are you using? On what operating system?
Microsoft Windows XP [Version 5.1.2600]
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on 
win32
MKL 10.2.2.025
MSVS9

Please provide any additional information below.
site.cfg:
[mkl]
library_dirs = c:\progra~1\Intel\MKL\1022~1.025\ia32\lib
include_dirs = c:\progra~1\Intel\MKL\1022~1.025\include
mkl_libs = mkl_solver_sequential, mkl_intel_c, mkl_sequential, mkl_core

Original issue reported on code.google.com by klo...@gmail.com on 20 May 2011 at 8:21

GoogleCodeExporter commented 9 years ago
Hi. Could you try this patch? It *might* fix the issue but since I can't test 
it (I don't have MSVC installed), there is a high chance it doesn't.

Original comment by gdemen...@gmail.com on 4 Oct 2011 at 10:39

Attachments:

GoogleCodeExporter commented 9 years ago
Included Gaetan's patch in aff7032692bf (time will say whether this is useful 
or not).

Original comment by fal...@gmail.com on 1 Nov 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Oh, sorry, I totally forgot about this.
I tested new release right now, as I see it includes mentioned patch.
Unfortunately I can't compile again, and I added log in attachment

Let me know if anything I can do to test again. I'll take care to be in time

Original comment by klo...@gmail.com on 2 Nov 2011 at 9:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I attached through GMail, but perhaps it was not delivered.
Here is another one

Original comment by klo...@gmail.com on 2 Nov 2011 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
Please consider attached patch for msvc9 issues. All numexpr tests pass on 
win32 and win-amd64, py2.6 and py2.7.

Is pytables 2.3.1 supposed to be compatible with numexpr 2.0? 

Original comment by cjgoh...@gmail.com on 3 Nov 2011 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by cjgoh...@gmail.com on 3 Nov 2011 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
Added fix in revision 64c049db262d.  Christophe, could you please check that 
everything is okay so that I can close the ticket?  Thanks!

Original comment by fal...@gmail.com on 4 Nov 2011 at 12:37

GoogleCodeExporter commented 9 years ago
The revision builds and tests well also with VML/MKL.

I found that replacing the `/Ox` option with `/O1`is not really necessary. 
Compilation only takes ~20s. A non-critical patch is attached.

Many pytables tests fail because the `necompiler.getContext` function changed 
API and raises ValueError for unknown keyword arguments, e.g. `copy_args`.

Original comment by cjgoh...@gmail.com on 4 Nov 2011 at 5:14

Attachments:

GoogleCodeExporter commented 9 years ago
Ok.  /Ox used to be a big problem back with MSVC6, but I guess this is a 
pre-diluvian beast nowadays.  Applied your patch in revision 6b9450050d60.

And yes, I'm aware of the API breaks for PyTables (and other apps).  I'm 
looking into re-adding the `copy_args` argument ti `evaluate()` again, but 
unfortunately, while running the PyTables test suite I've found another, pretty 
serious issue:

http://code.google.com/p/numexpr/issues/detail?id=64

Anyway, I'm closing this one.  Thanks a lot for your verification!

Original comment by fal...@gmail.com on 4 Nov 2011 at 5:48