staticfloat / homebrew-juliadeps

Tap containing dependencies for Julia
MIT License
8 stars 14 forks source link

Optimizationservices depends on wrong libgfortran #121

Open rdeits opened 6 years ago

rdeits commented 6 years ago

Pinging @staticfloat as requested.

Attempting to build CoinOptServices.jl on OSX 10.11 in Julia v0.6 currently fails with:

LoadError: Provider BinDeps.PackageManager failed to satisfy dependency libOS
while loading /Users/rdeits/.julia/v0.6/CoinOptServices/deps/build.jl, in expression starting on line 71

CoinOptServices.jl tries to get libOS by installing juliadeps/Optimizationservices, and the install works correctly, but BinDeps continues to throw the "failed to satisfy dependency" error. That's because the resulting libOS.dylib cannot actually be opened. Going into ~/.julia/v0.6/Homebrew/deps/urs/lib and running:

julia> Libdl.dlopen(joinpath(pwd(), "libOS.6.9.2"))

gives:

ERROR: could not load library "/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/lib/libOS.6.9.2"
dlopen(/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/lib/libOS.6.9.2.dylib, 1): Library not loaded: /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/opt/libgfortran/lib/libgfortran.3.dylib
  Referenced from: /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/lib/libOS.6.9.2.dylib
  Reason: image not found

Indeed libgfortran.3.dylib does not exist, but I do have libgfortran.4.dylib.

Trying to build libOS from source with:

Homebrew.brew(`uninstall Optimizationservices`)
Homebrew.brew(`install --build-from-source Optimizationservices`)

fails with:

clang++ -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DOS_BUILD -o .libs/unitTest unitTest.o -Wl,-bind_at_load  ../src/.libs/libOS.dylib -L/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/ipopt/3.12.4_1/lib -L/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/cbc/2.9.7/lib -L/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/opt/libgfortran/lib -L/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/bonmin/1.8.4/lib -L/Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/couenne/0.5.6/lib -lCouenne -lbonminampl -lipoptamplinterface -lcoinasl -lbonmin -lCbcSolver -lCbc -lpthread -lCgl -lOsiClp -lClpSolver -lClp -lOsi -lipopt /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/ipopt/3.12.4_1/lib/libcoinlapack.a -ldl -lcoinmumps /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/Cellar/ipopt/3.12.4_1/lib/libcoinblas.a -lgfortran -lSystem -lquadmath -lCoinUtils -lbz2 -lz -lm
creating unitTest
./unitTest nb
dyld: Library not loaded: /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/opt/libgfortran/lib/libgfortran.3.dylib
  Referenced from: /Users/rdeits/.julia/v0.6/Homebrew/deps/usr/opt/couenne/lib/libCouenne.1.dylib
  Reason: image not found
make: *** [alltests] Trace/BPT trap: 5

If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
staticfloat/juliadeps

Can you give me any advice on what to do next?

rdeits commented 6 years ago

This failure can also be seen in the Travis-CI logs for CoinOptServices.jl: https://travis-ci.org/JuliaOpt/CoinOptServices.jl/jobs/314168001#L330 which are running OSX 10.12.

chkwon commented 6 years ago

same problem here.

zjsimon91 commented 6 years ago

Same problem trying to install bonmin