> On Feb. 21, 2013, 7:21 p.m., Ben Mahler wrote: > > Thanks for figuring out the bcp process! > > > > A few questions: > > 1. It looks like the find operation will include boost files as well, is > > bcp smart enough to ignore those? > > 2. Is 'rm libs' sufficient? It looks like you would need 'rm -r libs'? > > 3. Why is libs produced by bcp? > > > > I have some revisions to the README, rather than going back and forth, I > > just included the contents below > > Some trailing whitespace cleanup, and other changes. > > > > > > > > > > > > > > README for the mesos third party boost distribution. > > > > We use the boost bcp utility to bundle only the minimum subset of boost > > headers > > used by mesos. > > See: http://www.boost.org/doc/libs/1_53_0/tools/bcp/doc/html/index.html > > > > Instructions for upgrading boost. (Based on boost 1.53.0) > > ------------------------------------------------------------------------------- > > 1. Download a tarball of the latest version of boost. > > e.g. boost_1_53_0.tar.gz > > > > 2. Uncompress boost and build bcp. > > $ tar -zxvf boost_1_53_0.tar.gz > > $ cd boost_1_53_0 > > $ ./bootstrap.sh > > $ ./b2 tools/bcp > > > > 3. Get list of all C++ source files in Mesos. > > $ find </path/to/mesos> -name "*.cpp" -o -name "*.hpp" > files.txt > > > > 4. Scan the source files using bcp to produce a subset of the headers. > > $ mkdir ../boost-1.53.0 > > $ cat files.txt | xargs -I {} ./dist/bin/bcp --scan --boost=./ {} > > ../boost-1.53.0 > > > > 5. Inspect contents of extracted headers and remove unnecessary lib files. > > $ cd ../boost-1.53.0 > > $ rm libs > > > > 6. Update this README if needed, and copy this into boost-1.53.0 directory. > > $ cp </path/to/README> . > > > > 7. Compress Boost directory and bundle it into mess. > > $ cd .. > > $ GZIP=--best tar -zcf boost-1.53.0.tar.gz boost-1.53.0 > > $ cp boost-1.53.0.tar.gz </path/to/mesos>/third_party/ > > $ cp boost-1.53.0.tar.gz > > </path/to/mesos>/third_party/libprocess/third_party/ > > > > 8. Update third_party/versions.am and third_party/libprocess/versions.am. > > > > 9. Verify correctness. > > $ make clean check > > > > Vinod Kone wrote: > This README is great. Thank you guys! > > How hard is it to just script this? > > Benjamin Hindman wrote: > This is fantastic David! Scripting it would be great, but this is already > so much better than what we had! If we scripted it you could toss it in > 'tools'. Also, pay the good people at Boost and Mesos some respect and > capitalize Boost and Mesos everywhere (except in code/shell snippets of > course). ;) Thank you!
Thanks for the cleanup, awesome. 1. It looks like the find operation will include boost files as well, is bcp smart enough to ignore those? A: Yes, bcp is Boost aware and ignores files that are part of the Boost. 2. Is 'rm libs' sufficient? It looks like you would need 'rm -r libs'? A: Yes, rm -r is required. I'll update. 3. Why is libs produced by bcp? A: BCP's dependency resolution is somewhat opportunistic in what it thinks is necessary. With 1.53.0, a few of the smart_ptr headers get included as part of this resolution which then pulls in sp_collector.cpp and sp_debug_hooks.cpp into the libs/ which are only necessary if you're using smart_ptrs and want to run them in debugging mode which is enabled at compile time by setting #define BOOST_SP_ENABLE_DEBUG_HOOKS. Since Mesos appears to require none of this, I went ahead with removing these two files which leaves libs/ empty. 4. How hard is it to just script this? A: Seemingly, pretty easy. Would just need to pass in the path to the Boost tarball and the Mesos src dir and run these commands with a few variable substitutions. I haven't done it, but I'll put one together out of band from this change. I'll also clean up the capitalization I'll update Ben's revision to include the rm fix and capitalization cleanup and repost the patch. - David ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9316/#review16871 ----------------------------------------------------------- On Feb. 21, 2013, 5:06 a.m., David Mackey wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9316/ > ----------------------------------------------------------- > > (Updated Feb. 21, 2013, 5:06 a.m.) > > > Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler. > > > Description > ------- > > - Add header-only boost version 1.53.0 libraries > - Fix Boost-related build issues for MESOS-271 > > > This addresses bug MESOS-271. > https://issues.apache.org/jira/browse/MESOS-271 > > > Diffs > ----- > > third_party/boost-1.51.0.tar.gz e461b8a426859720d1b867ca981ba8131e8ebe70 > third_party/boost-1.53.0.tar.gz PRE-CREATION > third_party/libprocess/third_party/boost-1.51.0.tar.gz > e461b8a426859720d1b867ca981ba8131e8ebe70 > third_party/libprocess/third_party/boost-1.53.0.tar.gz PRE-CREATION > third_party/libprocess/third_party/versions.am b974985 > third_party/versions.am 09e1b57 > > Diff: https://reviews.apache.org/r/9316/diff/ > > > Testing > ------- > > make check > > > Thanks, > > David Mackey > >
