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

OSQP installation error #45

Closed
shashins opened this issue Feb 8, 2019 · 16 comments
Closed

OSQP installation error #45

shashins opened this issue Feb 8, 2019 · 16 comments

Comments

@shashins
Copy link

shashins commented Feb 8, 2019

I am getting following error message while trying to run using OSQP in Julia 1.1

[ Info: Precompiling OSQP [ab2f91bb-94b4-55e3-9ba0-7f65df51de79]
ERROR: LoadError: OSQP not properly installed. Please run Pkg.build("OSQP")
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /nethome/ssharan31/.julia/packages/OSQP/H4U2v/src/OSQP.jl:16
 [3] include at ./boot.jl:326 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:328 [inlined]
 [8] eval(::Expr) at ./client.jl:404
 [9] top-level scope at ./none:3
in expression starting at /nethome/ssharan31/.julia/packages/OSQP/H4U2v/src/OSQP.jl:13
ERROR: Failed to precompile OSQP [ab2f91bb-94b4-55e3-9ba0-7f65df51de79] to /nethome/ssharan31/.julia/compiled/v1.1/OSQP/BVtcb.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853

Please suggest how to fix this. Thanks

@blegat
Copy link
Collaborator

blegat commented Feb 8, 2019

Could you post the content of the file given by joinpath(dirname(dirname(pathof(OSQP))), "deps", "build.log")

@shashins
Copy link
Author

shashins commented Feb 8, 2019

bash: syntax error near unexpected token `dirname'

@blegat
Copy link
Collaborator

blegat commented Feb 8, 2019

You need to enter it in the Julia REPL

@shashins
Copy link
Author

shashins commented Feb 8, 2019

Following error message I am getting:

ERROR: UndefVarError: OSQP not defined
Stacktrace:
[1] top-level scope at none:0

@blegat
Copy link
Collaborator

blegat commented Feb 8, 2019

You need to first do using OSQP

@shashins
Copy link
Author

shashins commented Feb 8, 2019

I did that first

@shashins
Copy link
Author

shashins commented Feb 11, 2019

I tried completely removing OSQP package an tried reinstalling it. I am still following error message:

Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed OSQP ───────────── v0.5.1
 Installed MathProgBase ───── v0.7.7
 Installed MathOptInterface ─ v0.8.2
  Updating `/home/ssharan31/.julia/environments/v1.1/Project.toml`
  [ab2f91bb] + OSQP v0.5.1
  Updating `/home/ssharan31/.julia/environments/v1.1/Manifest.toml`
  [b8f27783] + MathOptInterface v0.8.2
  [fdba3010] + MathProgBase v0.7.7
  [ab2f91bb] + OSQP v0.5.1
  Building OSQP → `~/.julia/packages/OSQP/H4U2v/deps/build.log`
┌ Error: Error building `OSQP`: 
│   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
│                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  923k  100  923k    0     0  1607k      0 --:--:-- --:--:-- --:--:-- 1607k
│ [ Info: Attempting to create directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps/downloads
│ [ Info: Downloading file https://dl.bintray.com/bstellato/generic/OSQP/0.5.0/osqp-0.5.0.tar.gz
│ [ Info: Done downloading file https://dl.bintray.com/bstellato/generic/OSQP/0.5.0/osqp-0.5.0.tar.gz
│ [ Info: Attempting to create directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps/src
│ [ Info: Attempting to create directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps
│ [ Info: Directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps already exists
│ [ Info: Attempting to create directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps/usr/lib
│ [ Info: Attempting to create directory /home/ssharan31/.julia/packages/OSQP/H4U2v/deps/src/osqp-0.5.0/build
│ [ Info: Changing directory to /home/ssharan31/.julia/packages/OSQP/H4U2v/deps/src/osqp-0.5.0/build
│ ERROR: LoadError: IOError: could not spawn `cmake -G 'Unix Makefiles' ..`: no such file or directory (ENOENT)
│ Stacktrace:
│  [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at ./process.jl:400
│  [2] setup_stdios(::getfield(Base, Symbol("##505#506")){Cmd}, ::Array{Any,1}) at ./process.jl:413
│  [3] _spawn at ./process.jl:412 [inlined]
│  [4] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:725
│  [5] run(::Cmd) at ./process.jl:724
│  [6] run(::BinDeps.SynchronousStepCollection) at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521
│  [7] run(::FileRule) at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:483
│  [8] run(::BinDeps.SynchronousStepCollection) at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521 (repeats 2 times)
│  [9] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944
│  [10] satisfy!(::BinDeps.LibraryDependency) at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/dependencies.jl:922
│  [11] top-level scope at /nethome/ssharan31/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977
│  [12] include at ./boot.jl:326 [inlined]
│  [13] include_relative(::Module, ::String) at ./loading.jl:1038
│  [14] include(::Module, ::String) at ./sysimg.jl:29
│  [15] include(::String) at ./client.jl:403
│  [16] top-level scope at none:0
│ in expression starting at /nethome/ssharan31/.julia/packages/OSQP/H4U2v/deps/build.jl:62
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@blegat
Copy link
Collaborator

blegat commented Feb 11, 2019

Do you have cmake installed ? What happens if you do $ cmake ?

@shashins
Copy link
Author

There was problem with the cmake version on Redhat machine. Needed 3.2 or higher version. I am able to upgrade the cmake version using https://www.heliocastro.info/?p=238. OSQP is working fine now. Thanks

@blegat
Copy link
Collaborator

blegat commented Feb 12, 2019

Glad to read that you resolved the issue !

@blegat blegat closed this as completed Feb 12, 2019
@mfalt
Copy link

mfalt commented May 21, 2019

The lack of cmake on some computers can be quite a problem.
While teaching a course using another package with OSQP as a dependency, a lot of computers had build errors.
I'm guessing its not possible to force cmake installation during the build?
Is there at least a way to test if cmake is installed before trying to compile?
When compilation fails, even after installing cmake, it is nessesary remove OSQP and garbage collect build files before trying to build again. If nothing else, it would be nice with some instructions in the error message on how to (re)build after failure.

Note: The errors I encountered seemed to be mostly on Ubuntu 18.04

@bstellato
Copy link
Collaborator

On Mac and Linux we are directly installing the precompiled libraries which do not require cmake. However, it seems that the Julia ecosystem prefers packages compilation on Linux. That's why your errors appear mostly on uUbuntu. We could add more guidelines about that in the Julia installation or use directly the precompiled library on Linux. What do you think @blegat @tkoolen ?

@mfalt
Copy link

mfalt commented May 21, 2019

Would it be possible to fall back on binaries if the build fail? (I haven't used BinDeps so I'm not sure what the limitations are)

@mlubin
Copy link
Collaborator

mlubin commented May 21, 2019

it seems that the Julia ecosystem prefers packages compilation on Linux

That's no longer true. The Julia ecosystem now prefers BinaryBuilder packages on all platforms. See Cbc as an example.

I haven't used BinDeps so I'm not sure what the limitations are.

BinDeps is deprecated.

@bstellato
Copy link
Collaborator

Ooops ok I guess we should switch to that one and use the precompiled libraries. I will open an issue.

@bstellato
Copy link
Collaborator

@mfalt this is fixed in release 0.5.2.

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

5 participants