-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
netcdf #213
netcdf #213
Conversation
|
||
:: Remove msvc redist files. | ||
cd %LIBRARY_BIN% | ||
rm msvc*.dll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never tried this recipe on Windows. @rgrout can you take a look please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is weird to manually remove the dlls here. Maybe the NetCDF install step copied them in? If so, keep this removal. Otherwise, this is cruft.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These particular lines may not be needed anymore. I can't verify until I get my windows vm repaired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I am removing them.
set HDF5_DIR=%LIBRARY_PREFIX%\cmake | ||
|
||
if "%ARCH%" == "64" ( | ||
set CMAKE_GENERATOR="Visual Studio 10 2010 Win64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need something better here to build for the different MSVC versions. You should be able to use one of the two examples from https://github.com/conda/conda-build/wiki/Windows-recipe-patterns#using-cmake-with-visual-studio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will take a look at that.
# https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11423.html | ||
export LD_LIBRARY_PATH=$PREFIX/lib | ||
|
||
./configure \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we bound to use configure
here? I had a look at how unidata is testing. They also use a special docker image, but use cmake instead of configure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we bound to use
configure
here?
Nope. We can try cmake
They also use a special docker image, but use cmake instead of configure.
I will give that a try later. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really hoped GitHub would handle that link better. Anyways, he was seeing segfaults when using hdf5
/h5py
with Python when hdf5
was built with cmake
. I prefer using configure
to segfaults any day. If this situation is any bit similar here, then we would be wise to stick with what works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakirkham Thanks for the heads-up. But it may be of use in sorting out the correct configure
switches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was weird, and I'm still not sure of the root cause. I'm curious as to why they recommend cmake, yet their official binaries appear to be still using ./configure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get a stable release out first and then people can play with adding cmake
if they so desire. Sound good?
export LDFLAGS="-L$PREFIX/lib $LDFLAGS" | ||
|
||
# https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11423.html | ||
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if this is only needed for make check
, maybe it should be
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH make check
(set LD_LIBRARY_PATH just for make check)
I don't think it should be set during make
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
set INCLUDE=%LIBRARY_INC%;%INCLUDE% | ||
set HDF5_DIR=%LIBRARY_PREFIX%\cmake | ||
|
||
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% -DCMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% %SRC_DIR% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake needs to be a build dependency for windows, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily we do have cmake
pre-installed on AppVeyor. Not sure what is the best way to go though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use our cmake
, no? Is there some reason not too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
910de68
to
bad53e7
Compare
Note to self. I removed homebrew from this PR as a test and got: checking whether the C compiler works... no
configure: error: in `/opt/conda/conda-bld/work':
configure: error: C compiler cannot create executables
See `config.log' for more details Now I am testing the default channel gcc, but I am not sure that is the way we want to go here. |
ddb61f4
to
7265e43
Compare
- m4 # [unix] | ||
- msinttypes # [win] | ||
- cmake # [win] | ||
- curl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is curl
used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
netcdf depends on curl to support OPeNDAP.
What are we reviewing here @ocefpaf. Couldn't you just rename the package in the feedstock, and then rename that feedstock? |
We don't have a feedstock |
So trying to use non-system libcurl sounds like hell on OSX. I can get further by specifying |
So how about we just use cmake and eliminate autotools? Because this works for #!/bin/bash
cmake -DENABLE_DAP=ON -DCMAKE_INSTALL_PREFIX=$PREFIX .
make
make install and I can even get it to link against the conda-forge libcurl. I can also say that @WardF (the netCDF maintainer) uses cmake for building. With this script and temporarily removing the hdf4 dependency due to conda-forge/hdf4-feedstock#5, I can get a usable set of netCDF4 binaries. |
|
||
make | ||
# https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11423.html | ||
eval ${LIBRARY_SEARCH_VAR}=$PREFIX/lib make check || cat ncdump/test-suite.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I made a mistake here. Please update this to || { cat ncdump/test-suite.log; exit 1; }
.
Yeah. That was some copy-and-pasta. I should not send PRs while attending a conference 😝 |
@kmuehlbauer mentioned that at some point. (Sorry, but I cannot recall. We can give it a shot tomorrow.)
I have been thinking about that about that and I don't have a proper solution yet. We can:
I will try |
I don't think conda will let us clobber--my built netcdf4 package didn't have ncdump until I removed the conflict. |
I would not rely on conda to clobber as conda does the right thing. I would |
Testing cmake. Everything works locally but I do not know how to build static libs and shared with it. The docs mention that I should Also, there are a few additional options we may use. I need
|
That's fine do 2 loops for building. Once with |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
I thought about it, but it sounded "wrong." Anyways... That worked for Linux and OS X 🎉 But Windows, that was working before, is failing now. Not sure what is going on. (We can skip Windows and open an issue on the feedstock to solve it later.) |
[skip appveyor]
make | ||
# ctest # Save some time. | ||
make install | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a make clean
here. Maybe even a make distclean
if they have one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! (No make distclean
btw.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Ah, ok.
We do it for
🎉 🎉 🎉
Not sure either. |
@jakirkham if you are OK with this let's merge and iterate in the feedstock. This PR is getting hard to follow. |
LGTM. Thanks @ocefpaf. |
lol I should have renamed before merging. 😆 Oh well. |
Thanks @jakirkham! |
Sadly this package was renamed to
libnetcdf
in the default channel and I guess we should keep that to maintain compatibility.This is an attempt to update the
netcdf
package to the latest version and compiled against conda-forge'shdf5
.