jump-dev / Gurobi.jl

A Julia interface to the Gurobi Optimizer
http://www.gurobi.com/
MIT License
224 stars 81 forks source link

Gurobi package can not be build for Gurobi v8.1 #169

Closed tkosaka1976 closed 6 years ago

tkosaka1976 commented 6 years ago

I installed v8.1 and surely confirmed the license. However, Gurobi package v0.5.5 did not work well. Especially on the building step. I also set "export GUROBI_HOME=/Library/gurobi810/mac64"

Building Gurobi → ~/.julia/packages/Gurobi/YgG0A/deps/build.log ┌ Error: Error building Gurobi: │ ERROR: LoadError: Unable to locate Gurobi installation. Note that this must be downloaded separately from gurobi.com │ Stacktrace: │ [1] error(::String) at ./error.jl:33 │ [2] top-level scope at /Users/kousaka_tomoyuki/.julia/packages/Gurobi/YgG0A/deps/build.jl:47 │ [3] include at ./boot.jl:317 [inlined] │ [4] include_relative(::Module, ::String) at ./loading.jl:1041 │ [5] include(::Module, ::String) at ./sysimg.jl:29 │ [6] include(::String) at ./client.jl:388 │ [7] top-level scope at none:0 │ in expression starting at /Users/kousaka_tomoyuki/.julia/packages/Gurobi/YgG0A/deps/build.jl:46 └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069

if I use 8.0.1 then work well. Whats wrong with it?

odow commented 6 years ago

What files are in /Library/gurobi810/mac64/lib/?

Here is the line that dictates what you need to set GUROBI_HOME to https://github.com/JuliaOpt/Gurobi.jl/blob/67eaa2377eb549ab0a5729ac025849c50ff9422d/deps/build.jl#L24

tkosaka1976 commented 6 years ago

This is the files list in "/Library/gurobi810/mac64/lib/"

gurobi-javadoc.jar gurobi.jar gurobi.py gurobi81.netstandard20.dll gurobi81.netstandard20.xml libGurobiJni81.jnilib libgurobi81.dylib libgurobi81_light.dylib libgurobi_c++.a libgurobi_g++4.2.a libgurobi_stdc++.a python2.7 python3.5 python3.6 python3.7 rootcert.pem

Should I set GUROBI_HOME as "/Library/gurobi810/mac64/lib/"?

wgthompson commented 6 years ago

Having this exact issue Set GUROBI_HOME = my path all the way to mac64 Even changed location of folder from my main library to the local folder of Gurobi within .julia to no avail

odow commented 6 years ago

I guess Gurobi no longer use .so... https://github.com/JuliaOpt/Gurobi.jl/blob/67eaa2377eb549ab0a5729ac025849c50ff9422d/deps/build.jl#L30

Try adding the following lines to Gurobi/deps/build.jl and re-run Pkg.build("Gurobi")

if Compat.Sys.isunix()
    push!(paths_to_try, joinpath(ENV["GUROBI_HOME"],"lib",string("lib",a,".so")))
end
# ==============================
# Add this bit
if Compat.Sys.isapple()
    push!(paths_to_try, joinpath(ENV["GUROBI_HOME"], "lib", string("lib", a, ".dylib")))
end
# ==============================

Then let us know if it works.

wgthompson commented 6 years ago

This solved it ! Thanks so much

cheng8721 commented 5 years ago

Hi,

I have then same problem. Where did you run "export GUROBI_HOME=/Library/gurobi810/mac64" ?