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

[C++] Dependency issue for cmake #44623

Open
jtristano opened this issue Nov 2, 2024 · 4 comments
Open

[C++] Dependency issue for cmake #44623

jtristano opened this issue Nov 2, 2024 · 4 comments

Comments

@jtristano
Copy link

Describe the usage question you have. Please include as many useful details as possible.

Hi,
I'm trying to build arrow into my cmake c++ project.

I installed all of the packages here --- https://arrow.apache.org/install/

I followed the instructions on the build page for cmake but that wasnt enough....

I had to do this

# Add re2 package
FetchContent_Declare(
  re2
  GIT_REPOSITORY https://github.com/google/re2.git
  GIT_TAG 2024-07-02
)
FetchContent_MakeAvailable(re2)

Then cmake complained some more about abseil.. added this

# Add Abseil
FetchContent_Declare(
  abseil
  GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
  GIT_TAG        20230125.1
)
FetchContent_MakeAvailable(abseil)

I also use nlohmann so I had to do this

if(NOT TARGET nlohmann_json)
  FetchContent_Declare(
    json
    URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
  )
  FetchContent_MakeAvailable(json)
endif()

Then I had to ask copilot for help in resolving all of this....

-- Configuring done (12.8s)
CMake Error: install(EXPORT "re2Targets" ...) includes target "re2" which requires target "absl_absl_check" that is not in any export set.
CMake Error: install(EXPORT "re2Targets" ...) includes target "re2" which requires target "absl_absl_log" that is not in any export set.
-- Generating done **(0.3s)**

Not being a cmake expert, I'm stuck between removing this and getting re2 included twice. Copilot is stuck here and so am I.

Any help in being able to successfully link against developer packages. I dont want to build from source if I dont have to.

Some cmake info if it helps

-- The C compiler identification is Clang 14.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Using Conan toolchain: /home/xxx/xxx/Release/conan_toolchain.cmake
-- The CUDA compiler identification is NVIDIA 12.2.140
-- The CXX compiler identification is Clang 14.0.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/mpicxx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

Component(s)

C++, Continuous Integration, Developer Tools, Documentation, Packaging

@jtristano jtristano added the Type: usage Issue is a user question label Nov 2, 2024
@kou kou changed the title Dependency issue for cmake [C++] Dependency issue for cmake Nov 3, 2024
@kou
Copy link
Member

kou commented Nov 3, 2024

I installed all of the packages here --- https://arrow.apache.org/install/

What is your environment? What packages were you installed?

I followed the instructions on the build page for cmake but that wasnt enough....

Could you show the URL of "the build page for cmake"?

Could you show what you did in your CMake configuration?
It seems that you didn't use find_package(Arrow REQUIRED) or something.

@jtristano
Copy link
Author

I have

find_package(Arrow REQUIRED)

in my cmake as well as all of the instructions found here:
https://arrow.apache.org/docs/cpp/build_system.html

@kou
Copy link
Member

kou commented Nov 4, 2024

Could you answer all of my questions?
I can't help you without them.

@joetristano
Copy link

It seems that a combination of the minimal docker compose and the instructions on the build
Page are getting me there. I need to update my docker file from all of the manual edits that I made and will update this thread with the results. The documentation may just need some updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants