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

[arrow] CMake Linker Usage? #18538

Closed
xanderdunn opened this issue Jun 18, 2021 · 1 comment · Fixed by #22387
Closed

[arrow] CMake Linker Usage? #18538

xanderdunn opened this issue Jun 18, 2021 · 1 comment · Fixed by #22387
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@xanderdunn
Copy link

@ianmcook Thanks a lot for upgrading arrow to 4.0.0 in #17975.

I'm installing arrow 4.0.0 with vcpkg install arrow[dataset,s3,parquet].

vcpkg prints this usage text after installation:

The package arrow:x64-linux provides CMake targets:

    find_package(arrow CONFIG REQUIRED)
    # Note: 9 target(s) were omitted.
    target_link_libraries(main PRIVATE LZ4::lz4 re2::re2 arrow_static zstd::libzstd)

When I add find_package(Arrow CONFIG REQUIRED) to my CMakeLists.txt, the linker doesn't find the library at all:

target_link_libraries(main PRIVATE arrow_static)

Linker error:

/usr/bin/ld: cannot find -larrow_static

I see the libs are at:

$ l vcpkg/installed/x64-linux/lib/ | grep arrow
-rw-r--r-- 1 xander xander   32M Jun 18 07:24 libarrow.a
-rw-r--r-- 1 xander xander  3.2M Jun 18 07:24 libarrow_dataset.a

What is the expected usage of linking against arrow using vcpkg? The given arrow_static isn't working for me.

@PhoebeHui PhoebeHui added the category:port-bug The issue is with a library, which is something the port should already support label Jun 21, 2021
@ianmcook
Copy link
Contributor

Hi @xanderdunn, sorry I didn't see this earlier.

The CMake examples I have seen use find_package(Arrow REQUIRED). Does that work? There's more info at https://arrow.apache.org/docs/cpp/build_system.html.

PS I just opened #19229 to update the arrow port to 5.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants