Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide BOOST_ROOT to CMake docs target (RIPD-1364) #1937

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
6 participants
@ximinez
Copy link
Contributor

ximinez commented Dec 20, 2016

  • Should make building docs with CMake incrementally easier and more
    reliable.

I've named more reviewers than usual, because they are known to have different environments than I do, and I'd like to see if this is any easier. These changes only affect the CMake build.

If you don't already have a CMake build folder set up:

mkdir build/cmake # or whatever name you'd prefer
pushd build/cmake
cmake ../.. #  -G"Visual Studio 14 2015 Win64" if on Windows
popd

Once you have the folder set up, try to build the docs

cmake --build <cmake build folder> --target docs

Please report back your results and any problems you run into along the way.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Dec 20, 2016

Current coverage is 66.57% (diff: 100%)

Merging #1937 into develop will increase coverage by <.01%

@@            develop      #1937   diff @@
==========================================
  Files           692        692          
  Lines         49482      49482          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          32938      32942     +4   
+ Misses        16544      16540     -4   
  Partials          0          0          

Powered by Codecov. Last update 8425e45...de2324a

@@ -440,15 +440,32 @@ set_property(TARGET ${other_target} PROPERTY EXCLUDE_FROM_DEFAULT_BUILD true)
find_program(
B2_EXE
NAMES b2
PATHS ENV BOOST_ROOT
PATHS ${BOOST_ROOT}

This comment has been minimized.

Copy link
@mellery451

mellery451 Dec 20, 2016

Contributor

I had to change this to HINTS to get it to work for me - because I do have a b2 in /usr/local/bin, but it's broken (thanks, homebrew!) and so I need the b2 in BOOST_ROOT to be found first...HINTS does that.

This comment has been minimized.

Copy link
@ximinez

ximinez Dec 20, 2016

Author Contributor

Will add HINTS.

@mellery451

This comment has been minimized.

Copy link
Contributor

mellery451 commented Dec 20, 2016

👍 works well for me

@ximinez ximinez force-pushed the ximinez:docs_boostroot branch from 25c66f7 to 2511c7e Dec 20, 2016

@bachase

This comment has been minimized.

Copy link
Contributor

bachase commented Dec 20, 2016

On my windows box, I have BOOST_ROOT set but am getting

$ cmake ../.. -G"Visual Studio 14 2015 Win64"
-- Could NOT find Boost
CMake Warning at Builds/CMake/CMakeFuncs.cmake:299 (message):
  Boost directory found, but not all components.  May not be able to build.
Call Stack (most recent call first):
  CMakeLists.txt:136 (use_boost)

When I try to run

cmake --build <cmake build folder> --target docs

makeqbk.sh pops open in visual studio code and doesn't actually run. That sounds like my problem though.

Manually running seems ok.

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 20, 2016

Rebased on 0.40.0.

@bachase

This comment has been minimized.

Copy link
Contributor

bachase commented Dec 21, 2016

@ximinez My issues were all environment related. Rebuilding boost and fixing the association for sh files fixes everything.

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 21, 2016

@bachase Because I don't like being dependent on Windows file association settings, I just pushed a change which will call makeqbk via bash if possible. Please try to break it. (As a bonus, makeqbk will no longer run in a separate shell window.)

@bachase

This comment has been minimized.

Copy link
Contributor

bachase commented Dec 21, 2016

I reverted the Windows file association and tried your changes. It seems to find bash ok, but bash can't find makeqbk.sh! I added a CMake MESSAGE statement to print CMAKE_SOURCE_DIR and it is properly set to the root of my clone.

/usr/bin/bash: makeqbk.sh: No such file or directory
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 127. [C:\code\rippled_review\build\cmake\docs.vcxproj]
@scottschurr

This comment has been minimized.

Copy link
Contributor

scottschurr commented Dec 21, 2016

Apparently I'm missing something? I invoke the documentation build like this:

cd ./build/cmake/${BUILD_TYPE}
cmake --build . --target docs
cd ../../..

The documentation build plugs along okay for quite a while, but generates this error:

...
Generating XML output for namespace ripple
Generating XML output for file STObject.h
Generate XML output for dir /Users/ScottsMini/Development/rippled/src/ripple/protocol/
Generate XML output for dir /Users/ScottsMini/Development/rippled/src/ripple/
lookup cache used 293/65536 hits=7144 misses=297
finished...
warning: failed to load external entity "docca/include/docca/doxygen.xsl"
compilation error: file reference.xsl line 11 element include
xsl:include : unable to load docca/include/docca/doxygen.xsl
make[3]: *** [CMakeFiles/docs] Error 5
make[2]: *** [CMakeFiles/docs.dir/all] Error 2
make[1]: *** [CMakeFiles/docs.dir/rule] Error 2
make: *** [docs] Error 2

Do you know where I should be finding doxygen.xsl?

@scottschurr

This comment has been minimized.

Copy link
Contributor

scottschurr commented Dec 21, 2016

My ripple-libpp build suggests I should be finding doxygen.xls in docs/docca/include/docca/doxygen.xsl. I have a docs/docca directory, but it is empty. Any ideas what I messed up?

@mellery451

This comment has been minimized.

Copy link
Contributor

mellery451 commented Dec 21, 2016

@scottschurr git submodule update --init ?

@scottschurr

This comment has been minimized.

Copy link
Contributor

scottschurr commented Dec 21, 2016

Thanks @mellery451, that did the trick. After that fix the documentation build worked great. 👍

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 21, 2016

@scottschurr Just to save a bit of typing, once you've generated the cmake files the first time, you can build using just cmake --build build/cmake/${BUILD_TYPE} --target docs.

@scottschurr

This comment has been minimized.

Copy link
Contributor

scottschurr commented Dec 21, 2016

@ximinez Thanks. Yeah, even that is too much for me to remember, so I made a script named cmk_docs_debug that keeps the details hidden from me unless I need to know what those details are. I've tidied up the script with your suggestion.

Would you like me to re-test after this most recent commit?

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 21, 2016

@scottschurr I run a lot of my common commands by back-searching my shell history, so I get it. And, yes, I'd appreciate if you could test the most recent change, too.

@scottschurr

This comment has been minimized.

Copy link
Contributor

scottschurr commented Dec 22, 2016

My doc building script still works with the most recent "[FOLD]" commit. Still 👍

@ximinez ximinez force-pushed the ximinez:docs_boostroot branch from 5aa2783 to f1355df Dec 27, 2016

ximinez added some commits Dec 6, 2016

Provide BOOST_ROOT to CMake docs target (RIPD-1364):
* Should make building docs with CMake incrementally easier and more
reliable.
* Wrap makeqbk in explicit bash shell (if available).

@ximinez ximinez force-pushed the ximinez:docs_boostroot branch from f1355df to de2324a Dec 27, 2016

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 27, 2016

Rebased on 0.50.0-b1 (twice, because I screwed it up the first time) and squashed. I'm going to mark this as passed, since it has two 👍 s, but I'd still appreciate if @HowardHinnant and @JoelKatz could give it a shot to see if it works for them.

@HowardHinnant

This comment has been minimized.

Copy link
Contributor

HowardHinnant commented Dec 27, 2016

@mellery451 I have the same symptoms as Scott. From what directory do I git submodule update --init?

@ximinez

This comment has been minimized.

Copy link
Contributor Author

ximinez commented Dec 27, 2016

@HowardHinnant

This comment has been minimized.

Copy link
Contributor

HowardHinnant commented Dec 27, 2016

👍 Works for me on macOS.

@ximinez ximinez added the Passed label Dec 27, 2016

@bachase

This comment has been minimized.

Copy link
Contributor

bachase commented Jan 3, 2017

Merged as a1c0d15

@bachase bachase closed this Jan 3, 2017

@ximinez ximinez deleted the ximinez:docs_boostroot branch Jan 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.