using system libraries for Cbc, Ipopt in JuMP

62 views
Skip to first unread message

Kostas Oikonomou

unread,
Nov 11, 2016, 9:36:29 AM11/11/16
to julia-opt
I'm just starting with JuMP, and I have Julia 0.5.0 on FreeBSD 11.  Since BSD is
somewhat less popular than Linux, building Cbc, Ipopt, etc, needs some patches.
This patching is done automatically if one uses FreeBSD's "ports" for Cbc,
Ipopt, etc.  The .so libraries are then installed system-wide in /usr/local/lib,
and other files go in /usr/local/include, etc.

So the question is: how does one go about using such system packages/libraries
with Pkg.add("Cbc"), for example?  I understand that the build.jl file has to be
modified, but how?

Thanks for any help.

            Kostas

Miles Lubin

unread,
Nov 13, 2016, 3:12:14 PM11/13/16
to julia-opt
If the libraries are in the system library path (e.g., LD_LIBRARY_PATH on Linux) then they should be found automatically, and you shouldn't need to modify the build script.
To check which libraries are actually being used, look at .julia/v0.5/Cbc/deps/deps.jl. You can also modify this file if you'd like, but it will be overwritten on the next Pkg.build.

Kostas Oikonomou

unread,
Nov 13, 2016, 7:08:56 PM11/13/16
to julia-opt

On Sunday, November 13, 2016 at 3:12:14 PM UTC-5, Miles Lubin wrote:
If the libraries are in the system library path (e.g., LD_LIBRARY_PATH on Linux) then they should be found automatically, and you shouldn't need to modify the build script.

Yes, the system libraries are automatically on LD_LIBRARY_PATH. 
 
To check which libraries are actually being used, look at .julia/v0.5/Cbc/deps/deps.jl.

When I download  Cbc.jl-master.zip from github, I don't see Cbc/deps/deps.jl.  Only deps/build.jl.

You can also modify this file if you'd like, but it will be overwritten on the next Pkg.build.

I don't want to modify it, if I don't have to.  But my understanding is that the only way to install Cbc is to
say Pkg.add("Cbc"), which will then run build.jl, and this will download source for all dependencies,
including source for Cbc itself, and then start compiling everything.  If I have Cbc and all its dependencies
already installed in /usr/local/{lib,bin,include} etc., how will this prevent build.jl from doing the above?

Miles Lubin

unread,
Nov 13, 2016, 9:15:36 PM11/13/16
to julia-opt

The build.jl script will only attempt to download and compile on its own if it does not find Cbc in the system libraries.


--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-opt+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages