-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows build #6
Comments
Ping @czender. If you have any hints for us here it would really help us get the Windows builds going. |
the expert on windows builds of NCO is @pedro-vicente |
Obrigado Pedro! I'll take give it a try. We have almost all of those in
|
@ocefpaf, seems like recent progress allowing |
See my comment in conda-forge/pynco-feedstock#2 (comment) I never got time to look at the Windows builds but it should be easier now that conda brings |
that's good news but beware that NCO requires antlr version 2.7 not antlr version 4.x. not sure whether the antlr4 package will cut the mustard for NCO. |
@ocefpaf I have a windows laptop and an afternoon... if you want to give me a 10 minute brief I can hack away at it. We can start with a non-ncap2 build for Windows and make incremental improvements as needed if its blocked upstream somewhere. |
@kwilcox I am a little bit swamped but you can start by setting your laptop up with conda and a MSVC. https://github.com/conda/conda-recipes/wiki/Building-from-Source-on-Windows-32-bit-and-64-bit Once that is done we need to check if we have all the dependencies already in conda and compiled on Windows.
|
you are correct that antlr and gsl are only required for ncap2, and that szip is not mandatory (NCO does not require it, though netCDF4 may require it depending on how it is built). so building NCO with --disable-ncap2 might be the easiest way to start. |
@pedro-vicente, any chance you could take a stab at getting the settings right for a conda build on windows without ncap2? I might be able to help you address conda issues... |
Based on http://nco.sourceforge.net/nco_qt_msvc.shtml we need Qt's @czender would it be complicated to switch to @pedro-vicente if you want to try this please feel free to bug me with any |
@ocefpaf A switch from autotools to cmake might be conceptually simple, yet I've never written cmake build scripts and my time is limited. If someone else provided a working cmake build system then I would be happy to include it in NCO with the intent of maintaining both cmake and autotools build systems so long as each has significant usage. |
|
Thanks @ccordoba12!
I started a PR to show you what we can do so far. See #22 Conda is not that complicated as it is a layer on top of other build systems.
We have "cmake" builds for all but ANTLR and GSL. https://github.com/conda-forge/hdf5-feedstock/blob/master/recipe/bld.bat not sure how well those will play with |
All official sources. In some rare cases we patch them to enable the build.
That is in the background for now. We are focused on getting a build without
You can send it via e-mail or upload right here on the GitHub issues. (Drag-and-drop should work for most file formats.) BTW people discussing the |
Much appreciated, @pedro-vicente |
That is awesome @pedro-vicente! Please feel free to bug me for any help you need. |
The Cmake build is only for after NCO 4.6.2 |
Was that released? If not we can open the PR with a pre-release just to get the ball rolling. |
NCO release dates are here |
Latest version is 4.6.2-beta03. Final 4.6.2 probably this coming week. |
I pushed to github a prototype for a CMake build. The file /doc/index.shtml contains build instructions, which are CMake build. To build with CMake, do:
The CMake script tries to find header and dependency libraries on standard system locations. If these are not found, they can be set with (the locations in full path are examples)
Right now only the minimal dependencies are detected: netcdf header file, netcdf, HDF5, HDF5_HL, zlib, szip, curl libraries |
Where does this issue stand? @pedro-vicente have you produced a working feedstock that builds a conda-installable NCO (including basic ncap2) on Windows? |
@czender The cmake build status is the same as the above post. Regarding the conda build, can anyone please remind me what is needed? |
That's a great start. I see the CMakelists.txt file in the top level directory. I think @ocefpaf or someone else familiar with the conda Windows environment ( @rsignell-usgs ? ) needs to give that a try and work it from the feedstock end, and tell us what mods they need in the upstream. @pedro-vicente please install conda on your windows machine so you can iterate/verify that the install works. |
Sorry. I am a bit lost. You mean a custom
I am in the processing of moving to another city and I won't be able to try that for at least 2 weeks (sorry).
@pedro-vicente conda is not that complicated. I will get a simple PR that tries to build this so we can iterate together. |
@ocefpaf what makes you think ANTLR is "found anyway"? It's not requested in bld.bat, and the AppVeyor build log quoted above shows that it is not found. And because it is not found, building ncap2 is not attempted. At least that's how I read the log. Here is the CMake example file,
I suggest adding the equivalent paths for ANTLR to bld.bat that will work on AppVeyor. |
A typo. I meant not found 😄 (because we don't have that for windows.) |
@ocefpaf I have a working version of ANTLR for Windows. I'm not sure about the best way to make this public. There should be ANTLR version 2.7.7 source code available somewhere |
The source is available and we do build it for OS X and Linux. We would love to add Windows builds we do lack the know-how there.
Using a pre-compiled binary blob may be an option, but I would like to avoid that if possible. |
@ocefpaf if you have the source, then all is needed are the Visual Studio projects. I'll attach those somewhere here later. I'll give it a try your bld.bat |
here it is the Visual Studio project |
Thanks. I'll give it a try over the weekend. |
@ocefpaf I tried on the master branch of nco-feedstock
|
@ocefpaf I tried the try_win branch, I get the same error |
Same error as the AppVeyor logs? However, if you are referring the the The built package, like I said in #6 (comment), will be available in the channel for installation, via That means, we need to make #48 work first. One can test the PR locally by forking/cloning the repo, getting that particular PR, and issue the build commands locally. |
what I did git clone https://github.com/conda-forge/nco-feedstock I installed Anaconda3, opened a Anaconda3 command prompt https://github.com/conda-forge/nco-feedstock conda config --add channels conda-forge error is the one above
|
It would be interesting to find out why that ncks -M test fails, but that shouldn't prevent you from release the nco-feedstock as it is, after adding ANTLR. If all nco-feedstock builds that should be fine. We NCO developers can then try to find the cause of that error. So, I would just remove that test, add ANTLR and release it |
git clone https://github.com/conda-forge/nco-feedstock
git checkout try_win OK you got the code to build the package, but the instructions only refer to built packages.
Indeed. If you want to try it locally you are close. Now that you have the code for #48 you can issue:
from the code main directory. Building on Windows is kind of annoying and that probably won't succeed in the first try. You may need to configure your channels to get the dependencies from conda-forge (I guess that was already done above when you tried to install
The only test passing is
Sure. If you need more help setting a conda environment for building and testing it locally I am glad to help. Although Windows is not my forte 😬 (I rely mostly on AppVeyor for that.) |
agreed. @czender probably is more qualified to choose a test. |
ok I did
and nothing seemed to happen How can I use AppVeyor? |
If you got AppVeyor will build automatically when pushing a PR, so nothing different from what we have now.
Yep. Package testing is like integration tests, not really meant for debugging, only to check if the expected features are working. |
@ocefpaf I am totally sure I am using try_win 😃 can I change that setting in one of the files? also, do I need to change this ?
|
Are you on a Windows 32 machine or Python <=35? If the former I don't think the recipe will work. If the latter than you can probably just remove that line b/c it has no baring outside of |
Regarding question above about a simple local file test, this may suffice and does not require ncap2:
|
I have Windows 10 64 bit and I installed Anaconda 32 bit with Python 3.6. Should I try with Anaconda 64 bit.? |
@ocefpaf |
I found the cause of the error, that turns out to be a NCO bug @ocefpaf
so that it generates a Visual Studio solution for debugging
add the PATH where the .DLLs for dependent libraries are located , e.g
by the way is it possible to have static linking (.lib instead of .dll) of all the dependency libraries? |
@ocefpaf |
there is a build error because the file AST.hpp is missing from
|
Done in #48 |
We should build should build
nco
from source on Windows.See http://nco.sourceforge.net/nco_qt_msvc.shtml
The text was updated successfully, but these errors were encountered: