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

Timothy St. Clair commented on MESOS-1754:
------------------------------------------

It looks like the culprit is around the whole-archive link option:

------------------------------------------------
--whole-archive
           For each archive mentioned on the command line after the 
--whole-archive option, include every object
           file in the archive in the link, rather than searching the archive 
for the required object files.  This
           is normally used to turn an archive file into a shared library, 
forcing every object to be included in
           the resulting shared library.  This option may be used more than 
once.

           Two notes when using this option from gcc: First, gcc doesn't know 
about this option, so you have to use
           -Wl,-whole-archive.  Second, don't forget to use 
-Wl,-no-whole-archive after your list of archives,
           because gcc will add its own list of archives to your link and you 
may not want this flag to affect
           those as well.
------------------------------------------------

more specifically: 

Wl,--no-whole-archive  
../3rdparty/libprocess/3rdparty/glog-0.3.3/.libs/libglog.a -L/usr/lib/../lib64 
../3rdparty/leveldb/libleveldb.a 
../3rdparty/zookeeper-3.4.5/src/c/.libs/libzookeeper_mt.a 


> Mesos static library has undefined symbols from 3rd party deps
> --------------------------------------------------------------
>
>                 Key: MESOS-1754
>                 URL: https://issues.apache.org/jira/browse/MESOS-1754
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Vinod Kone
>            Assignee: Vinod Kone
>
> Looks like the static libmesos library that we build is missing some symbols 
> from 3rd party deps (e.g, GLOG, ZooKeeper). I suspect this has to do with the 
> order of libraries defined on the linker command line.
> {code}
> zookeeper_init symbol is present in .so but not in .a.
> $ nm libmesos.so | grep zookeeper_init
> 00000000030519f0 T zookeeper_init
> $ nm libmesos.a | grep zookeeper_init
> nm: libleveldb.a: File format not recognized
>                  U zookeeper_init
> Same with google::InstallFailureSignalHandler.
> $ nm libmesos.so | grep InstallFailureSignalHandler
> 000000000301901d T _ZN6google27InstallFailureSignalHandlerEv
> $ nm libmesos.a | grep InstallFailureSignalHandler
> nm: libleveldb.a: File format not recognized
>                  U _ZN6google27InstallFailureSignalHandlerEv
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to