[ 
https://issues.apache.org/jira/browse/MESOS-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196448#comment-13196448
 ] 

Charles Reiss commented on MESOS-144:
-------------------------------------

The main impediment to statically linking is third_party.

There are two cases:
- for third_party libraries which are built as .la's, libtool would correct 
link our binaries if we linked libmesos.la as a static library. However, 
libtool would install a .a which does not include include the third_party 
libraries, and the third_party libraries would also not be installed. Libtool 
would specify the external .a's as a dependency of the installed .la, but, of 
course, this would not be possible for frameworks linking against mesos to 
satisfy.

We could rely on installing these third_party libraries (possibly under a 
different libdir) or having them preinstalled and using the system version. 
Alternately, we could turn the third_party libtoolized libraries we link 
against into libtool convenience libraries (replacing libdir='$(libdir)' with 
libdir='' in the .la file) and libtool would probably know how to link them 
into an inclusive library on the platforms we care about. (Though it's possible 
that this would not work due to, e.g., object name conflicts.)

- for third_party libraries which are built as .a's, libtool does not know how 
to correctly link these into a .a. We could probably manually generate a 
convenience library .la for these or rely on a preinstalled .a (which we could 
link with -L/install/dir -lfoo)

                
> Statically linking binaries
> ---------------------------
>
>                 Key: MESOS-144
>                 URL: https://issues.apache.org/jira/browse/MESOS-144
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Hindman
>
> We build our binaries expecting to find libmesos.so on the shared library 
> search path. In many environments /usr/local/lib is not on the shared library 
> search path. That means users are required to update the search path for the 
> system or launch the binaries with LD_LIBRARY_PATH. Statically linking the 
> binaries would fix this problem. In addition, we might be able to pass -R as 
> a libtool specific LDFLAGS that does the right thing. Either way, it would be 
> nice to make it easy for a user who is installing to not have to use 
> LD_LIBRARY_PATH or need the permissions to update the system search path.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to