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

Fix glog deps, add some missing dependencies #500

Closed
wants to merge 7 commits into from
Closed

Fix glog deps, add some missing dependencies #500

wants to merge 7 commits into from

Conversation

funrollloops
Copy link
Contributor

@funrollloops funrollloops commented Oct 26, 2021

I found a bunch of bugs in the dependency graph when I tried to build with glog in a non-standard location. This PR uses find_package(glog) instead of find_library, so that we also get the correct include path.

A few libraries didn't declare their dependencies (or any dependencies, really) and so also failed to build because they didn't get the necessary include paths added.

Includes #499 and #387.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 26, 2021
My original fix (D30134167) seems to have been partially reverted; this
PR just re-applies the core changes along with some minor style fixes to
the CMake files.

The build was failing sometimes because velox_dwrf_int_decoder_benchmark
was missing a dependency on velox_dwio_dwrf_common, which transitively
depended on the proto headers. This would sometimes result in this
target being built before the proto headers were generated.

`include_directories(${CMAKE_BINARY_DIR})` at the top of the CMake file
in this directory was masking this. Now we should once again get
deterministic failures if a dependency is missing.
@funrollloops funrollloops marked this pull request as ready for review October 26, 2021 16:23
@facebook-github-bot
Copy link
Contributor

@funrollloops has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@funrollloops has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@funrollloops merged this pull request in 2990354.

@baibaichen
Copy link
Contributor

baibaichen commented Oct 27, 2021

@funrollloops by apply this path, cmake failed with followiing message:

CMake Error at CMakeLists.txt:146 (find_package):
  By not providing "Findglog.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "glog", but
  CMake did not find one.

  Could not find a package configuration file provided by "glog" with any of
  the following names:

    glogConfig.cmake
    glog-config.cmake

  Add the installation prefix of "glog" to CMAKE_PREFIX_PATH or set
  "glog_DIR" to a directory containing one of the above files.  If "glog"
  provides a separate development package or SDK, be sure it has been
  installed.

My Os is ubuntu 20.04, and setup_ubuntu.sh is alreay called, however it works in My macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants