[Cbc] linux build query - don't hardcode directories in .so files

James Howey james.howey at gmail.com
Fri Mar 22 18:33:41 EDT 2019


I am trying to deploy cbc to an AWS Lambda function. This would give me the
ability to invoke cbc execution from any machine, without installing cbc
locally. In setting this up, however, I have been forced to confront my
substantial ignorance of linux technology. 

 

To deploy to Lambda, you build your function, zip up the containing folder,
and ship it to amazon. They drop it in /var/task on a vm, and route
invocations to it. With the exception of \tmp, the whole vm is unwriteable.
Amazon sets the load library path to /var/task/lib, so the cbc libs go
there. Problem is that the default make hardcodes library paths (RPATH). I
find there is a $hardcode_into_libs switch in the libtool scripts. But I
don't know where to touch it.

 

Question: Where and how do I most simply compel the configure/make to avoid
hardcoding load paths into the generated .so files?

 

A less pressing issue: the install is nicely versioned and linked. However,
it doesn't seem that amazon likes the shortcuts (or they didn't survive the
trip through multiple zip unzip cycles). I don't need this flexibility as
the package is always deployed monolithically.

 

Question: How do I turn off the versioning and just generate plain .so
files?

 

A tangential question while I have you: I want to set a c++ #define
(CLP_OUTPUT_FORMAT). I see a whole CXX system dedicated to making this easy,
but I still don't know where exactly to drop my one little line of code. Can
you help?

 

Thanks for your attention. 

 

jkh

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20190322/2c26e99b/attachment.html>


More information about the Cbc mailing list