[SciPy-User] [msvc] scipy/numpy build with visual studio and intel fortran compiler

Ralf Gommers ralf.gommers at googlemail.com
Thu Apr 28 17:38:04 EDT 2011


On Thu, Apr 28, 2011 at 11:26 PM, Eloi Gaudry <eg at fft.be> wrote:
> well, i somehow messed up with my setup. using the enclosed patches, i can
> build numpy and scipy using msvc8/9 and intel visual fortran compiler 11.1
> (you need to apply the patches and use the matching build_*msvc.x*.bat
> file).
> 'hope this would help people that need to stick to visual studio
> compilers...

For your numpy patch:
- The version string detection is already fixed in master.
- The CPU detection you changed confuses me a bit. It looks like you
are running 32-bit Windows on PPC64?
- No idea why those f2py changes would be necessary either.

For your scipy patch:
- optimization level in distutils -O1 is already fixed in master
- why are all those defines in __fitpack.h, __quadpack.h and __minpack.h needed?

Ralf


> On 28/04/2011 21:33, Eloi Gaudry wrote:
>
> hi,
>
> i'd like to discuss these two patches with people that needs to build
> current/recent versions of numpy and scipy using Visual Studio (200x) and
> the Intel Visual Fortran compiler.
>
> so far, i've been able to build numpy and i've facing one remaining issue
> with the scipy/special/cephes module which seems to occur because i'm using
> shared and static libraries.
>
> C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.exe /DLL /nologo
> /INCREMENTAL:NO /LIBPATH:c:\
> fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC\VS8.0\win32release /LIBPATH:build\temp
> .win32-2.6 /LIBPATH:c:\fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC\VS8.0\win32rele
> ase /LIBPATH:build\temp.win32-2.6 quadpack.lib linpack_lite.lib mach.lib
> /EXPORT:init_quadpack build
> \temp.win32-2.6\Release\scipy\integrate\_quadpackmodule.obj
> /OUT:build\lib.win32-2.6\scipy\integrate
> \_quadpack.pyd
> /IMPLIB:build\temp.win32-2.6\Release\scipy\integrate\_quadpack.lib
> /MANIFESTFILE:buil
> d\temp.win32-2.6\Release\scipy\integrate\_quadpack.pyd.manifest
> C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.exe /DLL /nologo
> /INCREMENTAL:NO /LIBPATH:c:\
> fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC\VS8.0\win32release /LIBPATH:build\temp
> .win32-2.6 /LIBPATH:c:\fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC\VS8.0\win32rele
> ase /LIBPATH:build\temp.win32-2.6 quadpack.lib linpack_lite.lib mach.lib
> /EXPORT:init_quadpack build
> \temp.win32-2.6\Release\scipy\integrate\_quadpackmodule.obj
> /OUT:build\lib.win32-2.6\scipy\integrate
> \_quadpack.pyd
> /IMPLIB:build\temp.win32-2.6\Release\scipy\integrate\_quadpack.lib
> /MANIFESTFILE:buil
> d\temp.win32-2.6\Release\scipy\integrate\_quadpack.pyd.manifest
>
> boom !
> 1120
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
> MSVCRT.lib(MSVCR80.dll)
>    Creating library
> build\temp.win32-2.6\Release\scipy\integrate\_quadpack.lib and object
> build\temp
> .win32-2.6\Release\scipy\integrate\_quadpack.exp
> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
> libs; use /NODEFAULTLIB:libr
> ary
> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> libs; use /NODEFAULTLIB:libr
> ary
> libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol
> _MAIN__ referenced in func
> tion _main
> build\lib.win32-2.6\scipy\integrate\_quadpack.pyd : fatal error LNK1120: 1
> unresolved externals
>
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
> MSVCRT.lib(cinitexe.obj)
> LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined
> in MSVCRT.lib(MSVCR80.dll
> )
> LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
> MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
> MSVCRT.lib(MSVCR80.dll)
>    Creating library
> build\temp.win32-2.6\Release\scipy\integrate\_quadpack.lib and object
> build\temp
> .win32-2.6\Release\scipy\integrate\_quadpack.exp
> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
> libs; use /NODEFAULTLIB:libr
> ary
> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> libs; use /NODEFAULTLIB:libr
> ary
> libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol
> _MAIN__ referenced in func
> tion _main
> build\lib.win32-2.6\scipy\integrate\_quadpack.pyd : fatal error LNK1120: 1
> unresolved externals
> error: Command "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.exe
> /DLL /nologo /INCREMENTAL
> :NO /LIBPATH:c:\fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC\VS8.0\win32release /LI
> BPATH:build\temp.win32-2.6 /LIBPATH:c:\fft\bin\python-2.6.6\libs
> /LIBPATH:c:\fft\bin\python-2.6.6\PC
> \VS8.0\win32release /LIBPATH:build\temp.win32-2.6 quadpack.lib
> linpack_lite.lib mach.lib /EXPORT:ini
> t_quadpack build\temp.win32-2.6\Release\scipy\integrate\_quadpackmodule.obj
> /OUT:build\lib.win32-2.6
> \scipy\integrate\_quadpack.pyd
> /IMPLIB:build\temp.win32-2.6\Release\scipy\integrate\_quadpack.lib /M
> ANIFESTFILE:build\temp.win32-2.6\Release\scipy\integrate\_quadpack.pyd.manifest"
> failed with exit st
> atus 1120
>
> thanks,
> éloi
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
> --
> Eloi Gaudry
> Senior Product Development Engineer
>
> Free Field Technologies
> Company Website: http://www.fft.be
> Direct Phone Number: +32 10 495 147
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>



More information about the SciPy-User mailing list