OpenSourceRisk / ORE-SWIG

Other
49 stars 46 forks source link

Can't build with python 3.6 #8

Open rkapl123 opened 4 years ago

rkapl123 commented 4 years ago

When running the recommended script the script fails at setup.py build (is able to build the wrappers): C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\Python36\libs" "/LIBPATH:C:\Program Files\Python36\PCbuild\amd64" /LIBPATH:C:\dev\boost\lib /LIBPATH:C:\dev\ORE\master\QuantLib\lib /LIBPATH:C:\dev\ORE\master\QuantExt\lib /LIBPATH:C:\dev\ORE\master\OREData\lib /LIBPATH:C:\dev\ORE\master\OREAnalytics\lib "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" "/LIBPATH:C:\Program Files (x86)\SQLXML 4.0\bin\" "/LIBPATH:C:\Program Files\SQLXML 4.0\bin\" /EXPORT:PyInit__OREAnalytics build\temp.win-amd64-3.6\Release\OREAnalytics/oreanalytics_wrap.obj /OUT:build\lib.win-amd64-3.6\OREAnalytics_OREAnalytics.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\OREAnalytics_OREAnalytics.cp36-win_amd64.lib /subsystem:windows /machine:x64 LINK : fatal error LNK1181: Eingabedatei "Files\SQLXML.obj" kann nicht geöffnet werden. error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe' failed with exit status 1181

I've seen a very similar issue here https://github.com/Arzaroth/python_rapidxml/issues/5

my build script is

rem 1. Include SWIG path to the Path environment variable, e.g.
set Path=%Path%;C:\dev\swigwin

rem 2. Add PYTHON_INCLUDE and PYTHON_LIB variables to the system environment, e.g. 
set PYTHON_INCLUDE="C:\Program Files\Python36\include"
set PYTHON_LIB="C:\Program Files\Python36\libs"

rem 3. Add BOOST_ROOT and BOOST_LIBRARYDIR variables to the system environment, e.g. 
set BOOST_ROOT=C:\dev\boost
set BOOST_LIBRARYDIR=C:\dev\boost\lib

rem 4. Add ORE_DIR and QL_DIR variables to the system environment, e.g.
set ORE_DIR=C:\dev\ORE\master
set QL_DIR=C:\dev\ORE\master\QuantLib

rem 5. Change to directory OREAnalytics-SWIG/Python and run the following
rem    python scripts to build and install ORE Analytics Python module:
cd OREAnalytics-SWIG\Python
python setup.py wrap
python setup.py build
jmelo11 commented 4 years ago

The lib is available via pip. Does it help you?

laurent101 commented 4 years ago

Hi jmelo11, you're saying ORE-SWIG Python can be installed via pip? How? Are you referring to the python setup.py wrap commands? Thanks

jmelo11 commented 4 years ago

yep. pip install QuantExt-Python

SamRech commented 3 years ago

As far as i tried it only worked with Python 3.7.9. Does it work with another version by pip as well?