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

cmake can not find thrift #2073

Closed
springile opened this issue Mar 27, 2023 · 4 comments
Closed

cmake can not find thrift #2073

springile opened this issue Mar 27, 2023 · 4 comments

Comments

@springile
Copy link

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

I'm in centos7

Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.

  1. Build thrift and install it to /third_party/thrift/, which will have include, lib in /third_party/thrift, there is pkgconfig in lib.
  2. Build opentelemetry with cmake -DBUILD_TESTING=OFF -DWITH_JAEGER=ON -DWITH_OTLP=ON -DWITH_OTLP_HTTP=ON -DWITH_OTLP_GRPC=ON -DWITH_ABSEIL=ON ..
  3. this error will come:
    CMake Error at /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find Thrift (missing: Thrift_LIBRARIES Thrift_INCLUDE_DIR)
    Call Stack (most recent call first):
    /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
    cmake/modules/FindThrift.cmake:20 (find_package_handle_standard_args)
    exporters/jaeger/CMakeLists.txt:3 (find_package)

export PKG_CONFIG_PATH="/third_party/thrift/lib/pkgconfig:$PKG_CONFIG_PATH"

does not fix the error.

  1. it works if I install thrift to /usr/local.

Please check.

Thanks.

@springile springile added the bug Something isn't working label Mar 27, 2023
@marcalff
Copy link
Member

When a package is installed in a non standard location, CMake needs to be told where to look.

I think the variable to use is CMAKE_PREFIX_PATH, not PKG_CONFIG_PATH.

Now, regarding Jaeger, be advised:

@esigo esigo added the triage/unresolved Indicates an issue that can not or will not be resolved. label Mar 27, 2023
@marcalff
Copy link
Member

@springile

Please check if using CMAKE_PREFIX_PATH fixes the build, and let us know so this issue can be closed.

Thanks.

@springile
Copy link
Author

springile commented Mar 28, 2023 via email

@marcalff
Copy link
Member

Thanks for the details.

Closing as resolved.

@marcalff marcalff removed triage/unresolved Indicates an issue that can not or will not be resolved. bug Something isn't working labels Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants