Repository navigation
Windows Support #152
Description
Activity
And, for reference, the most recent error is the following, during compilation of the
variance_reduction.cfile. From this build (and you can see build progress here too): https://ci.appveyor.com/project/cmoscardi/libact/build/1.0.37C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include\cstdlib(19): error C2061: syntax error: identifier 'noexcept'According to this post, this should be compiled as C++ code? But that leads to a circular error of some sort where I'm told I'm missing
dgesvd_, which may or may not be solvable by includingclapack... but then there are multiple definitions of the same variable.Oh, also worth noting that I had to follow the advice of this post to deal with that
complex.hissue (which is also brought up in a couple of the issues on this repo where people are trying to build with Windows).variance_reduction.cis actually a file generated fromvariance_reduction.pyx, I don't think you should change the file.Are you able to follow #118 for building the package?
Wait sorry, where is that
.pyxfile? I don't see it in the repo.As for #118, it looks like they're stuck in approximately the same place as I am. Basically, getting
lapackeinstalled in some way, shape, or form seems to be a challenge.With that said, I think I've gotten closer (notably, this has included modifying the
variance_reduction.cfile), and now need to figure out why something in LAPACK itself (or maybe the entirety of LAPACK) isn't linking correctly.variance_reduction.obj : error LNK2001: unresolved external symbol dgesvd_Full build output: here
variance_reduction.cfile at the relevant commit: hereOh sorry, my bad, the
variance_reduction.cis correct.I think the key problem might be this line
https://ci.appveyor.com/project/cmoscardi/libact/build/1.0.60#L124The extra_link_args in
setup.pyis set for linux system
https://github.com/yangarbiter/libact/blob/master/setup.py#L28Link your C application built with MSVC with the BLAS,LAPACK and LAPACKE libraries (the lib files) you just downloaded. In your project properties, change the properties "Linker > General > Additional Library Directory" to tell Visual Studio where the libraries are, and also add the name of your BLAS, LAPACK and LAPACKE libraries in "Linker > Input > Additional Dependencies", just put "liblapacke.lib;liblapack.lib;libblas.lib"
You may have to change the
setup.pyfile accordinglyYep, it was indeed explicitly linking that. Now, building completes, but the built .pyd file still cannot be found for some reason.
This is likely a simple issue, but again, I'm just not particularly experienced with the Windows build process, so any help would be appreciated.
Build output: https://ci.appveyor.com/project/cmoscardi/libact/build/1.0.73#L345
Remarks:
-
Starting here, https://github.com/cmoscardi/libact/blob/master/appveyor.yml#L78 , I've changed the script to first run setup.py build, then setup.py test, to confirm that the built files exist.
-
According to what I'm seeing on the internet, I should just have to change PYTHONPATH to include the .pyd file's location, but as you can see verified here, the PYTHONPATH includes a location where that .pyd file lives, and python still can't find it... https://ci.appveyor.com/project/cmoscardi/libact/build/1.0.73#L184
-
Furthermore, the libblas, liblapack, liblapacke DLL files are on the PATH... see here:
https://ci.appveyor.com/project/cmoscardi/libact#L83 (and the files themselves are downloaded around line 24 in this output)
-
Update: I've gotten it to build. Take a look at this, though -- many tests are failing.
https://ci.appveyor.com/project/cmoscardi/libact
Notably, scikit-learn was giving tons of error output about some default parameters (see scikit-learn/scikit-learn#9997 ) into the logistic regression model (as well as an SVM parameter), so I changed those... here's the commit showing the change in the logit model wrapper class with the current defaults. cmoscardi@991fc87
Hi, I'm trudging away on Windows support (with very minimal knowledge of Windows environments) here: https://github.com/cmoscardi/libact (just on master).
If anyone else is interested in this, and knows a thing or two about compiling stuff on Windows (especially getting LAPACK to work, my current headache), please do let me know! Comment here or raise an issue on my fork, and we can talk more.