JuliaMath / SpecialFunctions.jl

Special mathematical functions in Julia
https://specialfunctions.juliamath.org/stable/
Other
350 stars 97 forks source link

problems building on Win #155

Closed JeffreySarnoff closed 4 years ago

JeffreySarnoff commented 5 years ago

To add and build this on a Win system, the REPL window must have admin status. Otherwise there is an error about access to [forming? moving?] a symlink.

ararslan commented 5 years ago

I believe that is true of any package that uses BinaryProvider on Windows, though I also thought it was fixed. What is your Julia version, the version of SpecialFunctions, and the version of BinaryProvider?

JeffreySarnoff commented 5 years ago

I use Julia v1.1 and v1.2-latest. SpecialFunctions is as obtains with pkg> up pkg> add
I had not added BinaryProvider -- until now. Seems to be a bridge to sanity on v1.2. (it also helps not to have a dev version of any package other external packages use, mostly)

I got v1.1 working too .. before then (fyi) on v1.1, after rm SpecialFunctions add BinaryProvider add SpecialFunctions

(v1.1) pkg> build SpecialFunctions
  Building SpecialFunctions → `C:\Users\jas\.julia\packages\SpecialFunctions\fvheQ\deps\build.log`
┌ Error: Error building `SpecialFunctions`:
│ ┌ Warning: On Windows, creating file symlinks requires Administrator privileges
│ └ @ Base.Filesystem file.jl:794
│ [ Info: Downloading https://github.com/JuliaLang/openlibm/archive/v0.5.4.tar.gz to C:\Users\jas\AppData\Local\Temp\jl_F5DE.tmp-download.gz...
│ [ Info: No hash cache found
│ [ Info: Calculated hash 9a8ae1d17825a4a6a4c013d36a7f4348b27c47eedb6549c521ecc9c79d021c13 for file C:\Users\jas\AppData\Local\Temp\jl_F5DE.tmp-download.gz
│ [ Info: Destination directory C:\Users\jas\.julia\packages\SpecialFunctions\fvheQ\deps\src already exists, returning
│ ERROR: LoadError: LoadError: None of the selected providers can install dependency libopenspecfun.
│ Use BinDeps.debug(package_name) to see available providers
│
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\jas\.julia\packages\BinDeps\ZEval\src\dependencies.jl:949
│  [3] satisfy!(::BinDeps.LibraryDependency) at C:\Users\jas\.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
│  [4] top-level scope at C:\Users\jas\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│  [5] include at .\boot.jl:326 [inlined]
│  [6] include_relative(::Module, ::String) at .\loading.jl:1038
│  [7] include(::Module, ::String) at .\sysimg.jl:29
│  [8] include(::String) at .\client.jl:403
│  [9] top-level scope at C:\Users\jas\.julia\packages\SpecialFunctions\fvheQ\deps\build.jl:150
│  [10] include at .\boot.jl:326 [inlined]
│  [11] include_relative(::Module, ::String) at .\loading.jl:1038
│  [12] include(::Module, ::String) at .\sysimg.jl:29
│  [13] include(::String) at .\client.jl:403
│  [14] top-level scope at none:0
│ in expression starting at C:\Users\jas\.julia\packages\SpecialFunctions\fvheQ\deps\scratch.jl:113
│ in expression starting at C:\Users\jas\.julia\packages\SpecialFunctions\fvheQ\deps\build.jl:149
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075
ViralBShah commented 5 years ago

Why is it using BinDeps? The package has been migrated to BinaryProvider - so perhaps needs a new version tagged?

ararslan commented 5 years ago

This package has a source build fallback that uses BinDeps if no BinaryProvider provided binaries are found.

ViralBShah commented 5 years ago

Hmm - I would love to know what triggered the source build here. It's a fairly simple library.

JianghuiDu commented 5 years ago

@JeffreySarnoff , can you explain how you made it work? I have the same problem on Win10 and Julia1.1. Adding BinaryProvider doesn't solve the problem.

[ Info: Downloading https://github.com/JuliaMath/OpenspecfunBuilder/releases/download/v0.5.3-3/Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc8.tar.gz to C:\Users\JD\.julia\packages\SpecialFunctions\fvheQ\deps\usr\downloads\Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc8.tar.gz...
[ Info: Downloading https://github.com/JuliaLang/openlibm/archive/v0.5.4.tar.gz to C:\Users\JD\AppData\Local\Temp\jl_211C.tmp-download.gz...
[ Info: No hash cache found
[ Info: Calculated hash 9a8ae1d17825a4a6a4c013d36a7f4348b27c47eedb6549c521ecc9c79d021c13 for file C:\Users\JD\AppData\Local\Temp\jl_211C.tmp-download.gz
[ Info: Unpacking C:\Users\JD\AppData\Local\Temp\jl_211C.tmp-download.gz into C:\Users\JD\.julia\packages\SpecialFunctions\fvheQ\deps\src...
ERROR: LoadError: LoadError: None of the selected providers can install dependency libopenspecfun.
Use BinDeps.debug(package_name) to see available providers

Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\JD\.julia\packages\BinDeps\ZEval\src\dependencies.jl:949
 [3] satisfy!(::BinDeps.LibraryDependency) at C:\Users\JD\.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
 [4] top-level scope at C:\Users\JD\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
 [5] include at .\boot.jl:326 [inlined]
 [6] include_relative(::Module, ::String) at .\loading.jl:1038
 [7] include(::Module, ::String) at .\sysimg.jl:29
 [8] include(::String) at .\client.jl:403
 [9] top-level scope at C:\Users\JD\.julia\packages\SpecialFunctions\fvheQ\deps\build.jl:150
 [10] include at .\boot.jl:326 [inlined]
 [11] include_relative(::Module, ::String) at .\loading.jl:1038
 [12] include(::Module, ::String) at .\sysimg.jl:29
 [13] include(::String) at .\client.jl:403
 [14] top-level scope at none:0
in expression starting at C:\Users\JD\.julia\packages\SpecialFunctions\fvheQ\deps\scratch.jl:113
in expression starting at C:\Users\JD\.julia\packages\SpecialFunctions\fvheQ\deps\build.jl:149

7-Zip 18.05 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30

Extracting archive: 
--
Path = 
Type = tar
Code Page = UTF-8

Everything is Ok

Folders: 11
Files: 433
Size:       1542718
Compressed: 228352
JianghuiDu commented 5 years ago

I finally figured it out. I downloaded OpenspecfunBuilder from https://github.com/JuliaMath/OpenspecfunBuilder/releases manually with the right gcc version (gcc7 for me) and the copy pasted the files (libopenspecfun, Faddeeva.h and libopenspecfun.a) into my julia home folder and build SpecialFunctions.

JeffreySarnoff commented 5 years ago

I just tried 500 different things until one worked -- your how-to is very helpful. @ViralBShah There is no way an inexperienced user can be expected to do that.

ViralBShah commented 5 years ago

Agree.

ViralBShah commented 5 years ago

@staticfloat any ideas how to address?

JianghuiDu commented 5 years ago

I guess there is something wrong with the download links in build.jl. It only needs to download the right version of OpenspecfunBuilder and put in the write place. When I build SpecialFunctions a OpenspecfunBuilder is automatically downloaded to \deps\usr\downloads, but it's the WRONG version. I need gcc7 instead the downloaded one is gcc8, even though the gcc7 version is among the links in build.jl

ViralBShah commented 5 years ago

Openspecfun should probably move to yggdrasil.

Thortsteen commented 5 years ago

I get a similar error when I try to install on Flux on windows 64. Is there a solution for this issue? I looked in https://github.com/JuliaMath/OpenspecfunBuilder/releases but I couldnt understand which version to download.

(v1.1) pkg> build SpecialFunctions Building SpecialFunctions → C:\Users\totroste\.julia\packages\SpecialFunction s\fvheQ\deps\build.log ┌ Error: Error building SpecialFunctions: │ [ Info: Downloading https://github.com/JuliaMath/OpenspecfunBuilder/releases/d ownload/v0.5.3-3/Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc7.tar.gz to C:\Users\t otroste.julia\packages\SpecialFunctions\fvheQ\deps\usr\downloads\Openspecfun.v0 .5.3.x86_64-w64-mingw32-gcc7.tar.gz... │ ERROR: LoadError: Could not download https://github.com/JuliaMath/OpenspecfunB uilder/releases/download/v0.5.3-3/Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc7.tar .gz to C:\Users\totroste.julia\packages\SpecialFunctions\fvheQ\deps\usr\downloa ds\Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc7.tar.gz: │ ErrorException("") │ Stacktrace: │ [1] error(::String) at .\error.jl:33 │ [2] #download#93(::Bool, ::Function, ::String, ::String) at C:\Users\totroste .julia\packages\BinaryProvider\TcAwt\src\PlatformEngines.jl:498 │ [3] #download at .\none:0 [inlined] │ [4] #download_verify#94(::Bool, ::Bool, ::Bool, ::Function, ::String, ::Strin g, ::String) at C:\Users\totroste.julia\packages\BinaryProvider\TcAwt\src\Platf ormEngines.jl:567 │ [5] #download_verify at .\none:0 [inlined] │ [6] #install#133(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::St ring, ::String) at C:\Users\totroste.julia\packages\BinaryProvider\TcAwt\src\Pr efix.jl:314 │ [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefi x, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::St ring) at .\none:0 │ [8] top-level scope at C:\Users\totroste.julia\packages\SpecialFunctions\fvh eQ\deps\build.jl:142 │ [9] include at .\boot.jl:326 [inlined] │ [10] include_relative(::Module, ::String) at .\loading.jl:1038 │ [11] include(::Module, ::String) at .\sysimg.jl:29 │ [12] include(::String) at .\client.jl:403 │ [13] top-level scope at none:0 │ in expression starting at C:\Users\totroste.julia\packages\SpecialFunctions\f vheQ\deps\build.jl:139 │ Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net . │ SecurityProtocolType" due to invalid enumeration values. Specify one of the fo l │ lowing enumeration values and try again. The possible enumeration values are " S │ sl3, Tls"." │ At line:1 char:35 │ + [System.Net.ServicePointManager]:: <<<< SecurityProtocol = │ + CategoryInfo : InvalidOperation: (:) [], RuntimeException │ + FullyQualifiedErrorId : PropertyAssignmentException │ │ Exception calling "DownloadFile" with "2" argument(s): "The underlying connect i │ on was closed: An unexpected error occurred on a send." │ At line:5 char:24 │ + $webclient.DownloadFile <<<< ("https://github.com/JuliaMath/OpenspecfunBuild e │ r/releases/download/v0.5.3-3/Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc7.tar.gz " │ , "C:\Users\totroste.julia\packages\SpecialFunctions\fvheQ\deps\usr\downloads \ │ Openspecfun.v0.5.3.x86_64-w64-mingw32-gcc7.tar.gz") │ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException │ + FullyQualifiedErrorId : DotNetMethodException │ └ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\bu ild\usr\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075

Thortsteen commented 5 years ago

Got it working, I downloaded into temporary folder refered to by the installer and then did 'build SpecialFunctions' again, and then it seems to have worked.

BastianMoya commented 5 years ago

Thortsteen, Could you explain to us how to solve the problem in more detail, please?

musm commented 4 years ago

Stale. Please reopen if still encountering problems.