[Cbc] Building CBC statically

Jeffrey Milloy jeffrey.a.milloy at gmail.com
Thu Nov 13 14:54:31 EST 2014


Great that worked.

After nuking everything, checking out again, and rebuilding, the cbc binary
is 5.5M. I copied it onto my test machine and it seems to work.

Thank you.

On Thu, Nov 13, 2014 at 2:12 PM, Ted Ralphs <ted at lehigh.edu> wrote:

> If it still works on the machine you built on, then you still have the
> shared libraries present and as long as they are present, it will probably
> link to them. The idea of --disable-shared is not to have the shared
> libraries present, but it probably won't have that effect unless you do a
> "make uninstall" and/or "make clean" before reconfiguring and rebuilding.
> If I were you, I would blow away the whole src directory and start from
> scratch.
>
> Cheers,
>
> Ted
>
> On Thu, Nov 13, 2014 at 11:07 AM, Jeffrey Milloy <
> jeffrey.a.milloy at gmail.com> wrote:
>
>> In fact, not only does it look like cbc is still loading shared
>> libraries, it looks like it is still loading them from the src
>> (/usr/local/src/CoinMP), rather than the installation location (/opt/cbc)
>>
>> $ ldd /opt/cbc/bin/cbc
>>
>> linux-vdso.so.1 =>  (0x00007fff2beb0000)
>>
>> libCgl.so.0 => /usr/local/src/CoinMP/Cgl/src/.libs/libCgl.so.0
>> (0x00007fb4de838000)
>>
>> libOsiClp.so.0 =>
>> /usr/local/src/CoinMP/Clp/src/OsiClp/.libs/libOsiClp.so.0
>> (0x00007fb4de5f0000)
>>
>> libClp.so.0 => /usr/local/src/CoinMP/Clp/src/.libs/libClp.so.0
>> (0x00007fb4de250000)
>>
>> libOsi.so.0 => /usr/local/src/CoinMP/Osi/src/Osi/.libs/libOsi.so.0
>> (0x00007fb4ddff8000)
>>
>> libCoinUtils.so.0 =>
>> /usr/local/src/CoinMP/CoinUtils/src/.libs/libCoinUtils.so.0
>> (0x00007fb4ddcc0000)
>>
>> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>> (0x00007fb4dd9a8000)
>>
>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb4dd6a0000)
>>
>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb4dd488000)
>>
>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb4dd0c0000)
>>
>> /lib64/ld-linux-x86-64.so.2 (0x00007fb4deb50000)
>>
>> On Thu, Nov 13, 2014 at 1:53 PM, Jeffrey Milloy <
>> jeffrey.a.milloy at gmail.com> wrote:
>>
>>> I just tried that, still no success.
>>>
>>> I built all of coin-or:
>>>
>>> ./configure --enable-static --disable-shared --prefix=/opt/coin-or
>>> make
>>> make test
>>> sudo make install
>>>
>>> The cbc binary is 1.7M, so it seems like it should work. It works on the
>>> machine I built on, but I copied the binary to my EC2 instance and got the
>>> missing shared library (libCgl) message again.
>>>
>>> On Thu, Nov 13, 2014 at 1:48 PM, Ted Ralphs <ted at lehigh.edu> wrote:
>>>
>>>> Try also doing --disable-shared. I think that should get rid of the
>>>> dependence on the COIN libraries.
>>>>
>>>> Cheers,
>>>>
>>>> Ted
>>>>
>>>> On Thu, Nov 13, 2014 at 10:14 AM, Jeffrey Milloy <
>>>> jeffrey.a.milloy at gmail.com> wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> I am trying to run CBC through AWS EMR. I think I need to build CBC
>>>>> statically so that I can put a standalone binary onto S3 storage. Is it
>>>>> possible?
>>>>>
>>>>> I tried with ./configure --enable-static but the cbc resulting cbc
>>>>> binary still tried to load the shared library libCgl.so.0.
>>>>>
>>>>> Jeff
>>>>>
>>>>> _______________________________________________
>>>>> Cbc mailing list
>>>>> Cbc at list.coin-or.org
>>>>> http://list.coin-or.org/mailman/listinfo/cbc
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dr. Ted Ralphs
>>>> Professor, Lehigh University
>>>> (610) 628-1280
>>>> ted 'at' lehigh 'dot' edu
>>>> coral.ie.lehigh.edu/~ted
>>>>
>>>
>>>
>>
>
>
> --
> Dr. Ted Ralphs
> Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20141113/9121f34f/attachment.html>


More information about the Cbc mailing list