mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Schwartzmeyer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-3576) Audit CMake linking flags
Date Fri, 11 Aug 2017 19:58:00 GMT

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

Andrew Schwartzmeyer commented on MESOS-3576:
---------------------------------------------

Master build of `stout-tests` link flags using CMake:
{noformat}
-L/home/andschwa/src/meso
s-master/build/3rdparty/glog-0.3.3/src/glog-0.3.3-lib/lib/lib  -L/home/andschwa/src/mesos-master/build/3rdparty/protobuf-3.3.0/src/pro
tobuf-3.3.0-lib/lib/lib  -L/home/andschwa/src/mesos-master/build/3rdparty/googletest-1.8.0/src/googletest-1.8.0-lib/lib
 -L/home/andsc
hwa/src/mesos-master/build/3rdparty/googletest-1.8.0/src/googletest-1.8.0-lib/lib/gtest -Wl,-rpath,/home/andschwa/src/mesos-master/bui
ld/3rdparty/glog-0.3.3/src/glog-0.3.3-lib/lib/lib:/home/andschwa/src/mesos-master/build/3rdparty/protobuf-3.3.0/src/protobuf-3.3.0-lib
/lib/lib:/home/andschwa/src/mesos-master/build/3rdparty/googletest-1.8.0/src/googletest-1.8.0-lib/lib:/home/andschwa/src/mesos-master/
build/3rdparty/googletest-1.8.0/src/googletest-1.8.0-lib/lib/gtest -lapr-1 -lcurl -lglog -lsvn_delta-1
-lsvn_diff-1 -lsvn_subr-1 -lpro
tobuf -ldl -lapr-1 -lrt -lpthread -lapr-1 -lcurl -lglog -lsvn_delta-1 -lsvn_diff-1 -lsvn_subr-1
-lprotobuf -ldl -lapr-1 -lrt -lpthread
 -lapr-1 -lcurl -lglog -lsvn_delta-1 -lsvn_diff-1 -lsvn_subr-1 -lprotobuf -ldl -lapr-1 -lrt
-lpthread -lapr-1 -lcurl -lglog -lsvn_delt
a-1 -lsvn_diff-1 -lsvn_subr-1 -lprotobuf -ldl -lapr-1 -lrt -lgmock -lgtest -lpthread -lgmock
-lgtest
{noformat}

Build of `stout-tests` link flags using CMake with my patch series:
{noformat}
-Wl,-rpath,/home/andschwa/src/mesos/build/3rdparty/glog-0.3.3/src/glog-0.3.3-build/lib:/home/andschwa/src/mesos/build/3rdparty/protobuf-3.3.0/src/protobuf-3.3.0-build
/usr/lib64/libapr-1.so /usr/lib64/libcurl.so 3rdparty/glog-0.3.3/src/glog-0.3.3-build/lib/libglog.so
3rdparty/protobuf-3.3.0/src/protobuf-3.3.0-build/libprotobuf.so -lpthread /usr/lib64/libz.so
-lrt -ldl /lib64/libsvn_delta-1.so /lib64/libsvn_diff-1.so /lib64/libsvn_subr-1.so 3rdparty/googletest-1.8.0/src/googletest-1.8.0-build/googlemock/libgmock.a
3rdparty/googletest-1.8.0/src/googletest-1.8.0-build/googlemock/gtest/libgtest.a
{noformat}

I'll note that the remaining difference is CMake is linking to shared libraries of glog and
protobuf, whereas the Autotools build links to static libraries.

> Audit CMake linking flags
> -------------------------
>
>                 Key: MESOS-3576
>                 URL: https://issues.apache.org/jira/browse/MESOS-3576
>             Project: Mesos
>          Issue Type: Bug
>          Components: cmake
>            Reporter: Alex Clemmer
>            Assignee: Andrew Schwartzmeyer
>              Labels: build, mesosphere
>
> If you look at the linking flags for autoconf's stout tests build:
> ```
> ./.libs/libgmock.a glog-0.3.3/.libs/libglog.a -lgflags protobuf-2.5.0/src/.libs/libprotobuf.a
-lpthread -ldl -lz /usr/lib/x86_64-linux-gnu/libcurl-nss.so /usr/lib/x86_64-linux-gnu/libsvn_delta-1.so
/usr/lib/x86_64-linux-gnu/libsvn_subr-1.so /usr/lib/x86_64-linux-gnu/libapr-1.so -lrt -pthread
> ```
> you'll notice that they are much more concise than our CMake build:
> ```
> -L/usr/lib/x86_64-linux-gnu/libapr-1.so  -L/usr/lib/x86_64-linux-gnu/libsvn_client-1.so
 -L/usr/lib/x86_64-linux-gnu/libsvn_delta-1.so  -L/usr/lib/x86_64-linux-gnu/libsvn_diff-1.so
 -L/usr/lib/x86_64-linux-gnu/libsvn_fs-1.so  -L/usr/lib/x86_64-linux-gnu/libsvn_fs_fs-1.a
 -L/usr/lib/x86_64-linux-gnu/libsvn_fs_util-1.a  -L/usr/lib/x86_64-linux-gnu/libsvn_ra-1.so
 -L/usr/lib/x86_64-linux-gnu/libsvn_ra_local-1.a  -L/usr/lib/x86_64-linux-gnu/libsvn_ra_serf-1.a
 -L/usr/lib/x86_64-linux-gnu/libsvn_ra_svn-1.a  -L/usr/lib/x86_64-linux-gnu/libsvn_repos-1.so
 -L/usr/lib/x86_64-linux-gnu/libsvn_subr-1.so  -L/usr/lib/x86_64-linux-gnu/libsvn_wc-1.so
 -L/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/gmock-1.7.0/src/gmock-1.7.0-lib/lib
 -L/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/gmock-1.7.0/src/gmock-1.7.0-build/gtest/lib/.libs
 -L/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/glog-0.3.3/src/glog-0.3.3-lib/lib/lib
 -L/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/protobuf-2.5.0-lib/lib/lib
-rdynamic -lpthread -lgmock -lsvn_client-1 -lsvn_delta-1 -lsvn_diff-1 -lsvn_fs-1 -Wl,-Bstatic
-lsvn_fs_fs-1 -lsvn_fs_util-1 -Wl,-Bdynamic -lsvn_ra-1 -Wl,-Bstatic -lsvn_ra_local-1 -lsvn_ra_serf-1
-lsvn_ra_svn-1 -Wl,-Bdynamic -lsvn_repos-1 -lsvn_subr-1 -lsvn_wc-1 -lglog -lprotobuf -lgtest
-ldl -lapr-1 -lrt -Wl,-rpath,/usr/lib/x86_64-linux-gnu/libapr-1.so:/usr/lib/x86_64-linux-gnu/libsvn_client-1.so:/usr/lib/x86_64-linux-gnu/libsvn_delta-1.so:/usr/lib/x86_64-linux-gnu/libsvn_diff-1.so:/usr/lib/x86_64-linux-gnu/libsvn_fs-1.so:/usr/lib/x86_64-linux-gnu/libsvn_fs_fs-1.a:/usr/lib/x86_64-linux-gnu/libsvn_fs_util-1.a:/usr/lib/x86_64-linux-gnu/libsvn_ra-1.so:/usr/lib/x86_64-linux-gnu/libsvn_ra_local-1.a:/usr/lib/x86_64-linux-gnu/libsvn_ra_serf-1.a:/usr/lib/x86_64-linux-gnu/libsvn_ra_svn-1.a:/usr/lib/x86_64-linux-gnu/libsvn_repos-1.so:/usr/lib/x86_64-linux-gnu/libsvn_subr-1.so:/usr/lib/x86_64-linux-gnu/libsvn_wc-1.so:/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/gmock-1.7.0/src/gmock-1.7.0-lib/lib:/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/gmock-1.7.0/src/gmock-1.7.0-build/gtest/lib/.libs:/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/glog-0.3.3/src/glog-0.3.3-lib/lib/lib:/home/joris/projects/mesos/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/protobuf-2.5.0-lib/lib/lib
> ```
> We need to (1) audit this so that we are confident the linking process works like we
want it to, and (2) make sure we don't triple link dependencies.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message