Coder Social home page Coder Social logo

Comments (12)

rschwarz avatar rschwarz commented on May 24, 2024

Hm, the failure of BinDeps is quite unspecific here.

We had build problems on OS X before, see #21. Unfortunately, I have neither experience with, nor access to any machines with OS X, so I don't know how to make this work.

@chkwon: Could you tell me whether make test in the folder SCIP/deps/src/CSIP-0.3.6 works?

EDIT: sorry, if make does nothing, then the tests won't work either. I thought your output is from running Pkg.build("SCIP") for the second time.

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

My apology. This is the real error:

julia> Pkg.add("SCIP")
INFO: Installing SCIP v0.2.0
INFO: Building SCIP
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps/downloads
INFO: Downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.6.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   125    0   125    0     0    534      0 --:--:-- --:--:-- --:--:--   536
100 21068  100 21068    0     0  42713      0 --:--:-- --:--:-- --:--:-- 42713
INFO: Done downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.6.zip
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps/src
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps
INFO: Directory /Users/chkwon/.julia/v0.5/SCIP/deps already created
Archive:  /Users/chkwon/.julia/v0.5/SCIP/deps/downloads/v0.3.6.zip
71ca62a4b29352cc5ade76911725f435829ae6c8
   creating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/.gitignore  
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/LICENSE  
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/Makefile  
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/README.md  
   creating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/include/
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/include/csip.h  
   creating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.c  
   creating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/minunit.h  
  inflating: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test.c  
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
mkdir -p /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib
make links
Creating symbolic links to headers and library within SCIPOPTDIR (/Users/chkwon/Applications/scipoptsuite-3.2.1).
gcc -std=c99 -Wall -pedantic -I/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib/include -I/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/include -c /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.c -L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -Wl,-rpath,/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -lscipopt -fPIC -o /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.o
clang: warning: -Wl,-rpath,/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib: 'linker' input unused
clang: warning: -lscipopt: 'linker' input unused
clang: warning: argument unused during compilation: '-L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib'
gcc -std=c99 -Wall -pedantic /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.o -L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -Wl,-rpath,/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -lscipopt -fPIC -shared -o /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib/libcsip.so
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
=======================================================================[ ERROR: SCIP ]=======================================================================

LoadError: Provider BinDeps.BuildProcess failed to satisfy dependency libcsip
while loading /Users/chkwon/.julia/v0.5/SCIP/deps/build.jl, in expression starting on line 34

=============================================================================================================================================================

======================================================================[ BUILD ERRORS ]=======================================================================

WARNING: SCIP had build errors.

 - packages with build errors remain installed in /Users/chkwon/.julia/v0.5
 - build the package(s) and all dependencies with `Pkg.build("SCIP")`
 - build a single package by running its `deps/build.jl` script

=============================================================================================================================================================
INFO: Package database updated

and make test in SCIP/deps/src/CSIP-0.3.6:

:~/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6$ make test
compiling test
gcc -std=c99 -Wall -pedantic -I/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/include -g /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test.c -Wl,-rpath,/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -Wl,-rpath,/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -lm -lcsip -lscipopt -L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -o /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test
/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test 
dyld: Library not loaded: lib/libscipopt-3.2.1.darwin.x86_64.gnu.opt.so
  Referenced from: /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test
  Reason: image not found
make: *** [test] Abort trap: 6

from scip.jl.

rschwarz avatar rschwarz commented on May 24, 2024

What I don't know is whether

  1. A different Makefile (or options) should be used to compile the libscipopt, or
  2. The Makefile for CSIP needs to updated, or
  3. Both :-\

In the failing make test when it complains that "Library not loaded", does this file exist? Is it maybe a naming issue (with darwin)?

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

A few observations:

  1. libscipopt-3.2.1.darwin.x86_64.gnu.opt.so does exist in $SCIPOPTDIR/lib.
  2. libscipopt-3.2.1.darwin.x86_64.gnu.opt.so does NOT exist in CSIP-0.3.6/lib:
~/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib$ ls -al
total 104
drwxr-xr-x   5 chkwon  staff   170B Mar  6 14:29 ./
drwxr-xr-x  10 chkwon  staff   340B Mar  6 12:54 ../
lrwxr-xr-x   1 chkwon  staff    60B Mar  6 12:54 include@ -> /Users/chkwon/Applications/scipoptsuite-3.2.1/scip-3.2.1/src
-rwxr-xr-x   1 chkwon  staff    41K Mar  6 14:29 libcsip.so*
lrwxr-xr-x   1 chkwon  staff    63B Mar  6 12:54 libscipopt.so@ -> /Users/chkwon/Applications/scipoptsuite-3.2.1/lib/libscipopt.so
  1. $SCIPOPTDIR/lib is included in LD_LIBRARY_PATH.

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

I don't have good memories with .so, but had some success with .dylib. I guess both SCIP and CSIP need to be .dylib?

from scip.jl.

rschwarz avatar rschwarz commented on May 24, 2024

Sadly, I know nothing about .dylib.

About the missing files: I think it's OK that only libscipopt.so is there, because this one should be used by the CSIP Makefile. Anyway, it's a symlink to SCIP's libscipopt.so which is itself a symlink to the most recently compiled library, in your case libscipopt-3.2.1.darwin.x86_64.gnu.opt.so.

from scip.jl.

rschwarz avatar rschwarz commented on May 24, 2024

By accident I found this older StackOverflow question, where a user tried to use PySCIPOpt on OS X. There was the issue with the shared library not found, and it was suggested to set DYLD_LIBRARY_PATH to include the path where libscipopt-3.2.1.darwin.x86_64.gnu.opt.so is located. Apparently this helped the user to go one step further.

I'm not sure why this would be necessary, but may it helps us understand the issue better.

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

Unfortunately, this does not help. It generates the same error.

I tried a couple of things:

  1. I tried physically copying libscipopt-3.2.1.darwin.x86_64.gnu.opt.so to CSIP-0.3.6/lib. It was successful:
chkwon@MacBook:~/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6$ make test
make[1]: `/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test' is up to date.
/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/test/test 
Running tests...
  test_lp
  test_mip
  test_mip2
  test_mip3
  test_socp
  test_nlp
  test_quadobj
  test_lazy
  test_lazy2
  test_lazy_interrupt
  test_objsense
  test_sos1
  test_sos2
  test_sos1_sos2
  test_manythings
  test_doublelazy
  test_changeprob
  test_changequadprob
  test_changevartype
  test_initialsol
  test_heurcb
  test_params
All tests passed!
  1. After creating a symbolic link named libscipopt-3.2.1.darwin.x86_64.gnu.opt.so, instead of libscipopt.so, it was successful. (without a physical copy)

Two guesses:

  1. It seems like CSIP is looking for lib\libscipopt-3.2.1.darwin.x86_64.gnu.opt.so, not just libscipopt-3.2.1.darwin.x86_64.gnu.opt.so. Specifically in the lib directory of CSIP.

  2. It does not know if libscipopt-3.2.1.darwin.x86_64.gnu.opt.so is the same one as libscipopt.so. Perhaps it knows the other way around.

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

To compile dylib files, a flag -dynamiclib needs to be added. It seems that dylib files are needed for both SCIP and CSIP.

Could you tell me where I should add the flag -dynamiclib for SCIP? I also need to change the file extension .so to .dylib. I tried to figure it out by myself, but the makefile in SCIP is very complicated. Any advice will be useful.

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

@leethargo I didn't know how to edit makefiles for SCIP, but I had a success.

  1. To compile libsciopt.dylib:

After generating all object files following the main instruction of this package, I used the following line:

 g++ -install_name @rpath/libscipopt.dylib -dynamiclib -undefined suppress -flat_namespace -m64 -shared -o lib/libscipopt.dylib obj/*.o /Users/chkwon/Applications/scipoptsuite-3.2.1/scip-3.2.1/obj/O.darwin.x86_64.gnu.opt/lib/objscip/*.o /Users/chkwon/Applications/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.darwin.x86_64.gnu.opt/lib/*o
  1. To compile libcsip.dylib:
gcc -std=c99 -Wall -pedantic -I/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib/include -I/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/include -c /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.c -L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -Wl,-rpath,/Users/chkwon/Applications/scipoptsuite-3.2.1/lib/ /Users/chkwon/Applications/scipoptsuite-3.2.1/lib/libscipopt.dylib -fPIC -o /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.o

and

gcc -std=c99 -Wall -pedantic /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/src/csip.o -L/Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib -Wl,-rpath,/Users/chkwon/Applications/scipoptsuite-3.2.1/lib/ /Users/chkwon/Applications/scipoptsuite-3.2.1/lib/libscipopt.dylib -fPIC -shared -dynamiclib -o /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6/lib/libcsip.dylib

I also copied libcsip.dylib to deps/usr/lib.

  1. deps.jl
@checked_lib libcsip "/Users/chkwon/.julia/v0.5/SCIP/deps/usr/lib/libcsip.dylib"

Then it worked.

from scip.jl.

fserra avatar fserra commented on May 24, 2024

from scip.jl.

chkwon avatar chkwon commented on May 24, 2024

@fserra Thanks. I also needed to change the output library file extension from .so to .dylib.

from scip.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.