Skip to content
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

Unable to build CMake on Julia 1.3/Windows 10 #23

Open
JordanCuevas opened this issue Nov 26, 2019 · 15 comments
Open

Unable to build CMake on Julia 1.3/Windows 10 #23

JordanCuevas opened this issue Nov 26, 2019 · 15 comments

Comments

@JordanCuevas
Copy link

I'm getting the following error message when trying to build CMake in Julia 1.3 running on Windows 10. I'm thinking it has something to do with the '-o' being appended to the beginning of the file path.

┌ Error: Error building `CMake`:
│ [ Info: Attempting to create directory C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\downloads
│ [ Info: Directory C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\downloads already exists
│ [ Info: Downloading file https://github.com/Kitware/CMake/releases/download/v3.12.3/cmake-3.12.3-win64-x64.zip
│ [ Info: Done downloading file https://github.com/Kitware/CMake/releases/download/v3.12.3/cmake-3.12.3-win64-x64.zip
│ [ Info: Attempting to create directory C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps
│ [ Info: Directory C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps already exists
│ ERROR: LoadError: IOError: could not spawn `'C:\Program Files\Julia-1.3.0\bin\7z.exe' x 'C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\downloads\cmake-3.12.3-win64-x64.zip' -y '-oC:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\downloads'`: no such file or directory (ENOENT)
│ Stacktrace:
│  [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
│  [2] #554 at .\process.jl:112 [inlined]
│  [3] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at .\process.jl:196
│  [4] _spawn at .\process.jl:111 [inlined]
│  [5] #run#565(::Bool, ::typeof(run), ::Cmd) at .\process.jl:439
│  [6] run(::Cmd) at .\process.jl:438
│  [7] run(::BinDeps.PathRule) at C:\Users\Jordan\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:503
│  [8] run(::BinDeps.SynchronousStepCollection) at C:\Users\Jordan\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:521
│  [9] run(::FileRule) at C:\Users\Jordan\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:483
│  [10] run(::BinDeps.SynchronousStepCollection) at C:\Users\Jordan\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:521
│  [11] top-level scope at C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\build.jl:155
│  [12] include at .\boot.jl:328 [inlined]
│  [13] include_relative(::Module, ::String) at .\loading.jl:1105
│  [14] include(::Module, ::String) at .\Base.jl:31
│  [15] include(::String) at .\client.jl:424
│  [16] top-level scope at none:5
│ in expression starting at C:\Users\Jordan\.julia\packages\CMake\nSK2r\deps\build.jl:155
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649
@stevengj
Copy link
Contributor

Does C:\Program Files\Julia-1.3.0\bin\7z.exe exist?

@clintonTE
Copy link

I have the same error with the same OS. 7z.exe does not exist in my bin directory.

@vilim
Copy link

vilim commented Nov 27, 2019

It moved to the libexec directory, copying it into bin fixes the build error. JuliaLang/julia#33687 is the related issue

@simulkade
Copy link

It moved to the libexec directory, copying it into bin fixes the build error. JuliaLang/julia#33687 is the related issue

Same here. I copied the content of libexec to bin to solve the problem.

@jaakkor2
Copy link

jaakkor2 commented Dec 4, 2019

I believe proper fix would be to get JuliaPackaging/BinDeps.jl#407 merged and tagged.

@rafaqz
Copy link

rafaqz commented Dec 16, 2019

JuliaPackaging/BinDeps.jl#407 is merged. Would be good to get this fixed

@chriselrod
Copy link

chriselrod commented Dec 16, 2019

Does C:\Program Files\Julia-1.3.0\bin\7z.exe exist?

I have to first run

export BINARYPROVIDER_COPYDEREF=true

to avoid an error about being unable to create symlinks on Windows without admin privileges (I don't have them).

Then:

julia> run(pipeline(`ls $(Sys.BINDIR)`, `grep "7z"`));
7z.dll
7z.exe

Yet I still get:

(v1.3) pkg> build CMake
  Building CMake  `C:\Users\chris\.julia\packages\CMake\nSK2r\deps\build.log`
┌ Error: Error building `CMake`:
│ [ Info: Attempting to create directory C:\Users\chris\.julia\packages\CMake\nSK2r\deps\downloads
│ [ Info: Directory C:\Users\chris\.julia\packages\CMake\nSK2r\deps\downloads already exists
│ [ Info: Downloading file https://github.com/Kitware/CMake/releases/download/v3.12.3/cmake-3.12.3-win64-x64.zip
│ [ Info: Done downloading file https://github.com/Kitware/CMake/releases/download/v3.12.3/cmake-3.12.3-win64-x64.zip
│ [ Info: Attempting to create directory C:\Users\chris\.julia\packages\CMake\nSK2r\deps
│ [ Info: Directory C:\Users\chris\.julia\packages\CMake\nSK2r\deps already exists
│ ERROR: LoadError: IOError: could not spawn `'C:\cygwin64\home\CHRIS\Documents\languages\julia\usr\bin\..\libexec\7z.exe' x 'C:\Users\chris\.julia\packages\CMake\nSK2r\deps\downloads\cmake-3.12.3-win64-x64.zip' -y '-oC:\Users\chris\.julia\packages\CMake\nSK2r\deps\downloads'`: no such file or directory (ENOENT)
│ Stacktrace:
│  [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
│  [2] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at .\process.jl:112
│  [3] _spawn at .\process.jl:111 [inlined]
│  [4] #run#565(::Bool, ::typeof(run), ::Cmd) at .\process.jl:439
│  [5] run(::Cmd) at .\process.jl:438
│  [6] run(::BinDeps.PathRule) at C:\Users\chris\.julia\packages\BinDeps\eiJeV\src\BinDeps.jl:506
│  [7] run(::BinDeps.SynchronousStepCollection) at C:\Users\chris\.julia\packages\BinDeps\eiJeV\src\BinDeps.jl:524
│  [8] run(::FileRule) at C:\Users\chris\.julia\packages\BinDeps\eiJeV\src\BinDeps.jl:486
│  [9] run(::BinDeps.SynchronousStepCollection) at C:\Users\chris\.julia\packages\BinDeps\eiJeV\src\BinDeps.jl:524
│  [10] top-level scope at C:\Users\chris\.julia\packages\CMake\nSK2r\deps\build.jl:155
│  [11] include at .\boot.jl:328 [inlined]
│  [12] include_relative(::Module, ::String) at .\loading.jl:1105
│  [13] include(::Module, ::String) at .\Base.jl:31
│  [14] include(::String) at .\client.jl:424
│  [15] top-level scope at none:5in expression starting at C:\Users\chris\.julia\packages\CMake\nSK2r\deps\build.jl:155
└ @ Pkg.Operations C:\cygwin64\home\CHRIS\Documents\languages\julia\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649

julia> versioninfo()
Julia Version 1.3.1-pre.0
Commit b42f4ab37f* (2019-11-26 17:58 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

May also be worth pointing out:

julia> run(`cmake --version`);
cmake version 3.14.5

Would be nice if the library could just use this cmake, without requiring admin privileges to do so.

Although the Julia REPL is barely usable on my Windows 10 laptop's CygWin, often hanging for 5+ seconds on a keystroke, and regularly with lag on the order of 0.5 seconds. So I'm not exactly invested in spending time investigating other Windows problems.

@carstenbauer
Copy link

Ran into this today as well. Will this get fixed soon?

@tbeason
Copy link

tbeason commented Feb 12, 2020

Just ran into this. Made no changes to Julia installation other than pkg> up. Everything was fine beforehand, now I can't build CMake.

@stevengj
Copy link
Contributor

stevengj commented Feb 12, 2020

pkg> add CMake#master works fine as-is for me on Windows 10, so maybe this can be closed?

Planning to tag a new release tonight. Update: JuliaRegistries/General#9393

@carstenbauer
Copy link

I still see this with Julia 1.4.0 and CMake 1.2.0. Is this expected?

@stevengj
Copy link
Contributor

@crstnbr, no; is it the same error?

@carstenbauer
Copy link

Yes, it was the same error. It happened as part of the installation of HDF5.jl. Strangely, when I tried it a few times more and changed the order of packages that I wanted to install the error was gone... Thus, I can't reproduce anymore nor give a proper description of how to produce the error. So perhaps just consider it solved unless it happens again for someone.

@OllePonten
Copy link

For anyone still running into this (like I did) here was my error:

julia> Pkg.build("CMake")
    Building CMake → `C:\Users\***\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\50a8b41d2c562fccd9ab841085fc7d1e2706da82\build.log`
ERROR: Error building `CMake`:
[ Info: Attempting to create directory C:\Users\***\.julia\packages\CMake\ULbyn\deps\downloads
[ Info: Directory C:\Users\***\.julia\packages\CMake\ULbyn\deps\downloads already exists
[ Info: Downloading file https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-win64-x64.zip
[ Info: Done downloading file https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-win64-x64.zip
[ Info: Attempting to create directory C:\Users\***\.julia\packages\CMake\ULbyn\deps
[ Info: Directory C:\Users\***\.julia\packages\CMake\ULbyn\deps already exists
ERROR: LoadError: IOError: could not spawn `'C:\Users\***\AppData\Local\Programs\Julia-1.9.4\bin\..\libexec\7z.exe' x 'C:\Users\***\.julia\packages\CMake\ULbyn\deps\downloads\cmake-3.15.3-win64-x64.zip' -y '-oC:\Users\***\.julia\packages\CMake\ULbyn\deps\downloads'`: no such file or directory (ENOENT)

And my solution:
Go to where the files to be built are placed, in my case:
C:\Users\****\.julia\packages\CMake\ULbyn\deps\downloads
Manually extract the cmake files so you have a file structure of

.../deps/downloads/cmake-<VERSION>/bin
.../deps/downloads/cmake-<VERSION>/bin

in the repl:

julia>ENV["CMAKE_JL_BUILD_FROM_SOURCE"] = 1
julia> Pkg.build("CMake")

This solved it for me, so I can now import CMake without issue.
Hope this helps any future users!

JamesWrigley added a commit to JamesWrigley/Clang.jl that referenced this issue Dec 22, 2023
CMake.jl is currently broken on 1.9 because the location of 7z.exe changed:
- JuliaPackaging/CMake.jl#23
- JuliaLang/julia#48931
- JuliaInterop#458 (comment)
@JamesWrigley
Copy link

The location changed again in 1.9, so this is broken now on Windows: JuliaLang/julia#48931
Buuut luckily there's now a CMake_jll which seems to work fine 🎉

JamesWrigley added a commit to JamesWrigley/Clang.jl that referenced this issue Dec 23, 2023
CMake.jl is currently broken on 1.9 because the location of 7z.exe changed:
- JuliaPackaging/CMake.jl#23
- JuliaLang/julia#48931
- JuliaInterop#458 (comment)
Gnimuc pushed a commit to JuliaInterop/Clang.jl that referenced this issue Dec 24, 2023
CMake.jl is currently broken on 1.9 because the location of 7z.exe changed:
- JuliaPackaging/CMake.jl#23
- JuliaLang/julia#48931
- #458 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests