libAtoms / ExtXYZ.jl

Extended XYZ read/write support for Julia
MIT License
13 stars 6 forks source link

InitError on Windows loading libcleri.dll #6

Closed jamesgardner1421 closed 3 years ago

jamesgardner1421 commented 3 years ago

I noticed this issue when attempting to use the latest version of JuLIP which no longer works on windows due to this package. The error I encounter is:

julia> using ExtXYZ
[ Info: Precompiling ExtXYZ [352459e4-ddd7-4360-8937-99dcb397b478]
ERROR: LoadError: LoadError: InitError: could not load library "C:\Users\james\.julia\artifacts\465749424f91519e30d0c324b5228a91738a5131\bin\libcleri.dll"
Access is denied.

From what I understand dlopen cannot open the library since it has not been marked as executable. I checked the permissions for libcleri.dll in the windows tarball and it's -rw-r--r-- whereas for libextxyz.dll it's -rwxr-xr-x.

There's been some discussion about this previously where they manually changed the permissions during the build with chmod but there was an update which is supposed to do this automatically. So here it should've been fixed automatically like with libextxyz.dll but for some reason it's not working?

I noticed that the CI only runs on mac and linux so maybe windows support isn't intended? But if this could be fixed that would be great.

jameskermode commented 3 years ago

Thanks for reporting, will try to take a look ASAP. I don't have a windows machine to test on, but can certainly enable Windows on the CI.

jameskermode commented 3 years ago

Reproduced in CI: https://github.com/libAtoms/ExtXYZ.jl/runs/3351081827?check_suite_focus=true#step:6:58

jameskermode commented 3 years ago

Attempted fix to build recipe for libcleri is at https://github.com/JuliaPackaging/Yggdrasil/pull/3507. I will update here once that's been merged and propagated through to ExtXYZ.jl. I think I shouldn't have to make a new release since it will automatically use the latest build of the libcleri_jll package, but let's see.

jameskermode commented 3 years ago

Ok, that permissions problem is now fixed but I see the tests are failing on Windows due to differences in libc. I should be able to fix that later, then will make a patch release of this package.

jameskermode commented 3 years ago

CI now passing on Windows. If you confirm if fixes your problem I'll tag a new patch release.

Thanks again for reporting and very helpful investigations into what was going wrong.

jamesgardner1421 commented 3 years ago

Yep it's working for me now too. Thanks a lot!

jameskermode commented 3 years ago

Great - I've tagged v0.1.1 which should appear in the General registry shortly, so I'll close this issue. I think JuLIP should pick this up automatically since I didn't specify a particular version, but if not please re-open this.