<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">In case it is helpful, here is the script I used to build all static bro (without any shared libraries)<div class=""><br class=""></div><div class=""><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">```</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cd bro</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">mkdir buildcaf</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cd buildcaf</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cmake -DCAF_NO_UNIT_TESTS=<span style="color: #272ad8" class="">1</span> -DCAF_NO_EXAMPLES=<span style="color: #272ad8" class="">1</span> -DCAF_BUILD_STATIC_ONLY=<span style="color: #272ad8" class="">1</span> ../aux/broker/<span style="color: #272ad8" class="">3</span>rdparty/caf/</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">make</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">make install || true</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cd ..</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">mkdir build</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cd build</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">cmake -DDISABLE_PYTHON_BINDINGS=<span style="color: #272ad8" class="">1</span> -DENABLE_STATIC_ONLY=<span style="color: #272ad8" class="">1</span> -DCAF_ROOT_DIR=../buildcaf ..</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">make</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">make install</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">```</div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">It needed also a small patch to bro, which comes afterwards<br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">```</div></div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">diff --git a/CMakeLists.txt b/CMakeLists.txt</b></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">index 452f2834c..c8039f8da 100644</b></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">--- a/CMakeLists.txt</b></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">+++ b/CMakeLists.txt</b></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #33bbc8" class="">@@ -268,7 +268,11 @@</span><span style="font-variant-ligatures: no-common-ligatures" class=""> install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake DESTINATION share/bro</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;## Recurse on sub-directories</span></div><p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;</span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;add_subdirectory(aux/broker)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(195, 55, 32);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-set(brodeps ${brodeps} broker)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(52, 188, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+if (ENABLE_STATIC_ONLY)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(52, 188, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+&nbsp; set(brodeps ${brodeps} broker_static)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(52, 188, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+else ()</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(52, 188, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+&nbsp; set(brodeps ${brodeps} broker)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(52, 188, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+endif ()</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/aux/broker</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${CMAKE_CURRENT_BINARY_DIR}/aux/broker)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;include_directories(BEFORE ${CAF_INCLUDE_DIR_CORE})</span></div></div><div><div style="margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);" class="">```</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote type="cite" class=""><div class="">Le 6 déc. 2018 à 19:25, Johanna Amann &lt;<a href="mailto:johanna@icir.org" class="">johanna@icir.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Craig,<br class=""><br class="">I pushed another commit to the branch that passes --build-static-only through<br class="">to CAF; if you just want the patch for that it is available at<br class=""><a href="https://github.com/zeek/broker/commit/bf03a4246113c72d10530cc0c2729a3fa6f0b046" class="">https://github.com/zeek/broker/commit/bf03a4246113c72d10530cc0c2729a3fa6f0b046</a>.<br class=""><br class="">(Note that repositories are currently being migrated; if you pull it from<br class="">somewhere make sure that you actually have that commit in the branch)<br class=""><br class="">Johanna<br class=""><br class="">On Thu, Dec 06, 2018 at 07:01:25AM -0800, Johanna Amann wrote:<br class=""><blockquote type="cite" class="">Hi Craig,<br class=""><br class="">I actually recently started working on this, however I am did not quite<br class="">look at what you want.<br class=""><br class="">There already is a branch called topic/johanna/static, which now makes<br class="">--build-static(-only) work for broker whan CAF is built statically - it<br class="">does not yet pass the static flags through to broker; I actually wanted to<br class="">take a look at that today.<br class=""><br class="">I will let you know when I make progress there :)<br class=""><br class="">Johanna<br class=""><br class="">On Wed, Dec 05, 2018 at 07:03:06PM -0800, Craig Leres wrote:<br class=""><blockquote type="cite" class="">I've read up on cmake variable scope but I can't figure out how to build <br class="">bro with static libraries. The bro-bundled caf already has <br class="">CAF_BUILD_STATIC_ONLY which I'm pretty sure works but I'm unable to turn <br class="">it on when building caf as part of a bro build.<br class=""><br class="">For example I'd like is to optionally (i.e. from a -D argument to cmake <br class="">itself) be able to turn on CAF_BUILD_STATIC_ONLY for <br class="">aux/broker/3rdparty/caf/CMakeLists.txt but nothing I've tried in the top <br class="">level CMakeLists.txt is seen when the caf CMakeLists.txt is being evaluated.<br class=""><br class="">(I'm working on updating the FreeBSD port to 2.6 and can't install <br class="">things like libcaf_io.so in /usr/local/lib because they conflict with <br class="">libraries potentially installed by the devel/caf port.)<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>Craig<br class="">_______________________________________________<br class="">bro-dev mailing list<br class=""><a href="mailto:bro-dev@bro.org" class="">bro-dev@bro.org</a><br class="">http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev<br class=""><br class=""></blockquote>_______________________________________________<br class="">bro-dev mailing list<br class=""><a href="mailto:bro-dev@bro.org" class="">bro-dev@bro.org</a><br class="">http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev<br class=""><br class=""></blockquote>_______________________________________________<br class="">bro-dev mailing list<br class=""><a href="mailto:bro-dev@bro.org" class="">bro-dev@bro.org</a><br class="">http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>