Closed mullenkamp closed 5 years ago
@isuruf I test a few of the latest version and they are all broken like that. Could this be related to the blas change?
Thanks for being so prompt. I tested it out again after doing a conda clean --all just to make sure I would download the newest version, but it still failed unfortunately. I think I'll also open an issue related to updating the .appveyor.yml to run the run_test.py as part of the CI process to catch these kind of things early on.
@conda-forge/core and Windows experts (@gillins, @patricksnape, @mingwandroid and @isuruf) do you have an idea of what may be going on here? Everything works just fine in AppVeyor but crashes on a real machine. I test and, even with exact the same packages as the AppVeyor build, the DLL error persists :-(
Hmm - seems fine for me. If you have a machine that has this error, my suggestion is to use http://www.dependencywalker.com/ to find out which library is missing. Activate your environment first and run depends.exe, then load up the _netcdf4.cp36-win_amd64.pyd
file and see if you can find what is missing... Might be a lib that is only installed with MSVC or something weird like that (AppVeyor would have all that installed).
Thanks for the Windows tips @gillins! It looks like that, on my machine, I'm missing libeay32.dll
. @isuruf also raised the possibility of AppVeyor being the culprit in that "contamination." Not sure how to proceed to fix that... @mariusvniekerk raised the option of restricting the PATH during the build.
For now I'm going to see if I can build it locally on my machine and do a manual upload just to get this "fixed." But we need a long term solution for it.
@ocefpaf, I'm no Windows expert but this sounds more to me like a problem with the Windows build of openssl not including libeay32.dll
in its installation rather than anything specific to the NetCDF4 build. Are you hoping that a local build just won't depend on that DLL?
Are you hoping that a local build just won't depend on that DLL?
Nope. I'm hoping it will fail with a more informative error 😬
I'm rebuilding things as are as I can to see if I can fix this. (It will take a while, my Windows machine is old and tired 😩)
I had to rebuild curl
to get it right. Let's hope that will work on AppVeyor too.
It did not work :-/ We are still getting:
(TEST) C:\Users\filipe>python
Python 3.7.2 | packaged by conda-forge | (default, Mar 20 2019, 01:38:26) [MSC v.1900 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import netCDF4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Miniconda3\envs\TEST\lib\site-packages\netCDF4\__init__.py", line 3, in <module>
from ._netCDF4 import *
ImportError: DLL load failed: The operating system cannot run %1.
>>>
Locally I rebuilt curl
and netcdf4
with strict
* so it is either that or something in AppVeyor.
* The amount of mixed packages on Windows is huge and I'm not 100% convinced that we are doing the right thing for openssl
there.
the Windows build of openssl not including libeay32.dll
@xylar I think you are right, we need to work out why openssl
isn't installing this file....
This is commented out in the new recipe :-/
rem copy out32dll\libeay32.dll %LIBRARY_BIN%\libeay32.dll
@gillins that was removed when we synced with AR, see https://github.com/AnacondaRecipes/openssl-feedstock/blob/master/recipe/bld.bat
I'm not sure if we really need to restore that or just rebuild things properly that they don't look for it.
Hmm saw that - but they are using nmake install
. Perhaps this doesn't do what it should... If the openssl libs are linked against libeay32
we should be providing it I would have thought.
Hmm saw that - but they are using
nmake install
. Perhaps this doesn't do what it should... If the openssl libs are linked againstlibeay32
we should be providing it I would have thought.
I'm not sure where the linking is happening but defaults
built their stack
like that and netcdf4
works. I can confirm that I rebuild libssh2
, curl
, and then netcdf4
and it worked too. Hopefully not picking libeay32
from my system :smile:
(We know that something funky is happening on AppVeyor b/c netcdf4
does not fail there.)
So openssl removed those dll and lib files with the 1.1 release.
So openssl removed those dll and lib files with the 1.1 release.
So... Are having a problem with the migration and something was not build properly or is AppVeyor contaminating our builds?
Odds are your build may need patching
On Tue, Mar 26, 2019, 20:31 Filipe notifications@github.com wrote:
So openssl removed those dll and lib files with the 1.1 release.
So... Are having a problem with the migration and something was not build properly or is AppVeyor contaminating our builds?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/conda-forge/netcdf4-feedstock/issues/78#issuecomment-476910771, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEg9d1UgpPyoK45n6cHQstEv5vyGiYAks5varvygaJpZM4cA2X2 .
-- regards Marius van Niekerk
Odds are your build may need patching
Sorry but I'm not following your comments @mariusvniekerk. Which build? netCDF4
or openssl
? Patch for what?
@ocefpaf just to confirm: it is libssh2.dll
that links against libeay32.dll
on your machine? I think this is the culprit: https://github.com/libssh2/libssh2/blob/master/src/CMakeLists.txt#L79. Do we need to patch libssh2
to remove these lines?
For some reason on my machine I have a copy of libeay32.dll
under miniconda\library\bin
- not sure how that ended up there, but explains why it is working for me.
@ocefpaf just to confirm: it is libssh2.dll that links against libeay32.dll on your machine?
Probably. I need to double check that. Also, that is probably what is happening on AppVeyor too. I wonder, for AppVeyor, if we need to patch or to remove the pre installed openssl. I don't have time to do this at the moment and I'm travelling next week. Sorry but I won't be able to check this anytime soon.
BTW, just found this in the libssh2
AppVeyor logs:
Found OpenSSL: optimized;C:/OpenSSL-Win64/lib/VC/libeay32MD.lib;debug;C:/OpenSSL-Win64/lib/VC/libeay32MDd.lib (found version "1.0.2q")
I'll try a build just removing that directory. Fingers crossed!
@mullenkamp do you mind testing this again? In theory we have isolated the openssl
from AppVeyor in libssh2
and the issue should be go.
Works like a charm!
I even did a conda clean --all
to force conda to downloaded the packages again, and it imports fine.
I'll try this again with some of these other conda-forge packages that have this same issue.
Thanks again.
Awesome! Thanks for checking and let us know if you find any problems with the packages again.
Issue:
produces:
reproduce with:
By the way, using the anaconda channel instead of conda-forge does not produce this error.
Environment (
conda list
):Details about
conda
and system (conda info
):