You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "zfoobar (via GitHub)" <gi...@apache.org> on 2023/04/02 03:47:33 UTC

[GitHub] [arrow] zfoobar opened a new issue, #34841: Suggested CMake config doesn't work in C++ Getting Started Documentation

zfoobar opened a new issue, #34841:
URL: https://github.com/apache/arrow/issues/34841

   ### Describe the enhancement requested
   
   On a Mac M1 the suggested CMake configuration here did not work:
   
   https://arrow.apache.org/docs/cpp/build_system.html
   
   Here is the patch. You're already aware of the cxx_std_17 bug - but it should be reflected in the docs for consistency. 
   
   Curious - as I haven't tried this on Linux yet - why did I have to change Arrow::arrow_shared to arrow? Are you expecting the user has a cmake module in the environment already that aliases this? 
   
   --- foobar	2023-04-01 20:45:00
   +++ CMakeLists.txt	2023-04-01 20:03:36
   @@ -1,6 +1,10 @@
   -project(MyExample)
   +project(compute_and_write_csv_example)
    
    find_package(Arrow REQUIRED)
    
   -add_executable(my_example my_example.cc)
   -target_link_libraries(my_example PRIVATE Arrow::arrow_shared)
   +add_executable(compute_and_write_csv_example compute_and_write_csv_example.cc)
   +
   +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
   +
   +target_link_libraries(compute_and_write_csv_example PRIVATE arrow)
   +#target_link_libraries(compute_and_write_csv_example PRIVATE Arrow::arrow_shared)
   
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1493509850

   Thanks.
   Could you also show your `cmake ...` command line and its full output?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1496445638

   Here is the result of the build installation (not the source tree)
   pyarrow-dev) Zacharys-MacBook-Air:pyarrow-dev zacharyfierstadt$ find $CONDA_HOME -name Arrow
   /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev//lib/cmake/Arrow
   (pyarrow-dev) Zacharys-MacBook-Air:pyarrow-dev zacharyfierstadt$ find $CONDA_HOME -name FindArrow.cmake
   (pyarrow-dev) Zacharys-MacBook-Air:pyarrow-dev zacharyfierstadt$ 
   
   Here is the result of the source code checkout:
   (pyarrow-dev) Zacharys-MacBook-Air:pyarrow-dev zacharyfierstadt$ find ~/projects/arrow -name FindArrow.cmake
   /Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindArrow.cmake
   
   Assuming CMAKE_PREFIX_PATH should point to the installation (per the doc) and not the source checkout - if that is the case, CONFIG parameter is required to find that Arrow/ folder above. Without CONFIG parameter, FindArrow.cmake will be required in the installation... shouldn't it be copied here? 
   
   (pyarrow-dev) Zacharys-MacBook-Air:pyarrow-dev zacharyfierstadt$ ls $CONDA_HOME/lib/cmake/Arrow
   ArrowConfig.cmake		FindBrotliAlt.cmake		Findre2Alt.cmake
   ArrowConfigVersion.cmake	FindOpenSSLAlt.cmake		Findutf8proc.cmake
   ArrowOptions.cmake		FindSnappyAlt.cmake		FindzstdAlt.cmake
   ArrowTargets-debug.cmake	FindThriftAlt.cmake		arrow-config.cmake
   ArrowTargets.cmake		Findlz4Alt.cmake


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou closed issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #34841: [C++][Docs] Suggested CMake config doesn't work in  C++ Getting Started Documentation 
URL: https://github.com/apache/arrow/issues/34841


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1495376890

   Could you show `find $CMAKE_PREFIX_PATH -name 'FindArrow.cmake`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1497008500

   Old Apache Arrow C++ provides `FindArrow.cmake` but recent Apache Arrow C++ doesn't provide `FindArrow.cmake`.
   
   If `find_package(Arrow REQUIRED CONFIG)` works but `find_package(Arrow REQUIRED)` doesn't work. You must have `FindArrow.cmake`. And it's strange because recent Apache Arrow C++ doesn't provide `FindArrow.cmake`. So I ask you to run `find ...`.
   
   Could you try `cmake -DCMAKE_FIND_DEBUG_MODE=ON ...` and attach the full output of it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1498286905

   > It always creates a config module, never a FindArrow.cmake.
   
   This means that `ArrowConfig.cmake` is created but `FindArrow.cmake` is NOT created, right?
   If so, it's expected. And `find_package(Arrow REQUIRED)` (no `CONFIG`) should work. Do you still need `find_package(Arrow REQUIRED CONFIG)` with the fresh conda environment?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499605206

   Sutou,
   
   If it would be easier, I am happy to setup a Google Hangout and show you
   exactly the behavior, the documentation, and the environment.  I want this
   to be productive for you. Let me know. Cheers :)
   
   On Thu, Apr 6, 2023 at 1:45 PM Sutou Kouhei ***@***.***>
   wrote:
   
   > If FindArrow.cmake doesn't exist on your environment, find_package(Arrow
   > REQUIRED) must work. But you said you need to use find_package(Arrow
   > REQUIRED CONFIG). It shows that FindArrow.cmake exists on your
   > environment. And it's not expected.
   >
   > I think that we don't need to update the documents with the current
   > information. I think that it's a problem only on your environment with the
   > current information.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1499602115>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGN3MMZ4H262LD7OTFDW74TPJANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499603741

   No, it does not show that. CONFIG looks for Arrow/<module> - NOT
   FindArrow.cmake.
   
   On Thu, Apr 6, 2023 at 1:45 PM Sutou Kouhei ***@***.***>
   wrote:
   
   > If FindArrow.cmake doesn't exist on your environment, find_package(Arrow
   > REQUIRED) must work. But you said you need to use find_package(Arrow
   > REQUIRED CONFIG). It shows that FindArrow.cmake exists on your
   > environment. And it's not expected.
   >
   > I think that we don't need to update the documents with the current
   > information. I think that it's a problem only on your environment with the
   > current information.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1499602115>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGN3MMZ4H262LD7OTFDW74TPJANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499598599

   We are going in circles. The whole point of this thread is there is no
   FindArrow.cmake installed.  I am moving on - thank you for your attention,
   this thread contains all the information required to update the docs.
   
   
   
   On Thu, Apr 6, 2023 at 1:39 PM Sutou Kouhei ***@***.***>
   wrote:
   
   > Then, could you identify what conda package installs FindArrow.cmake on
   > your environment?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1499597047>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGMPY7YTYALXHEVZAITW74SZTANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1493383979

   Could you show the full error log on your environment?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499652788

   OK. I close this.
   
   I noticed that I misread https://github.com/apache/arrow/issues/34841#issuecomment-1497795644 . Sorry. (But "`find_package(Arrow REQUIRED)` should work" isn't changed.)
   
   If you reproduce this again, please provide FULL `cmake ...` and `make` logs like https://github.com/apache/arrow/issues/34841#issuecomment-1494925039 .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499608127

   Sorry. I can't speak/listen English. :-<
   
   I think that running `cmake -DCMAKE_FIND_DEBUG_MODE=ON ...` again with your new environment helps us.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1494934285

   Note: the libraries live in a conda env, which is activated prior to build. 
   
   Here are the output of these 3 env variables - it looks like ARROW isn't found at all by CMake. 
   
   ${Arrow_FOUND} is true if the Arrow C++ libraries have been found
   **value: $()**
   
   ${ARROW_VERSION} contains the Arrow version string
   **$(12.0.0-SNAPSHOT)**
   
   ${ARROW_FULL_SO_VERSION} contains the Arrow DLL version string
   **$()**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1496579660

   Even if FindArrow.cmake was generated at build time - which it isn't - you would have to update the documentation to set CMAKE_MODULE_PATH to point to the install dir's cmake FindArrow.cmake. 
   
   You can verify this by symlinking FindArrow.cmake to ArrowConfig.cmake - it will then work. 
   
   The parsimonious approach is to just add CONFIG to the doc and be done with it, unless the build system is tweaked to build FindArrow.cmake, or symlink it to ArrowConfig.cmake
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499602115

   If `FindArrow.cmake` doesn't exist on your environment, `find_package(Arrow REQUIRED)` must work. But you said you need to use `find_package(Arrow REQUIRED CONFIG)`. It shows that `FindArrow.cmake` exists on your environment. And it's not expected.
   
   I think that we don't need to update the documents with the current information. I think that it's a problem only on your environment with the current information.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1497795644

   See requested output below - it's what is expected. Who is the official decision maker on the most recent logic to use Config vs. Module mode? It seems obvious to me that the Module mode was abandoned for Config mode - which is fine - but the doc needs to be updated.
   
   **------ The output without CONFIG set:**
   
   CMake Debug Log at CMakeLists.txt:3 (find_package):
     find_package considered the following paths for FindArrow.cmake:
   
       /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/FindArrow.cmake
       /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/FindArrow.cmake
   
     The file was not found.
   
       /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/ArrowConfig.cmake
   
   
   
   CMake Warning (dev) in CMakeLis
   
   **The output with CONFIG set**
   
   -- Arrow version: 12.0.0
   -- Found the Arrow shared library: /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/libarrow.1200.0.0.dylib
   -- Found the Arrow import library: ARROW_IMPORT_LIB-NOTFOUND
   -- Found the Arrow static library: 
   CMake Debug Log at CMakeLists.txt:3 (find_package):
       /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/ArrowConfig.cmake
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1494925039

   Sure, here you go:
   
   (pyarrow-dev) Zacharys-MacBook-Air:arrow_scratch zacharyfierstadt$ cmake .
   CMake Warning (dev) at CMakeLists.txt:1 (project):
     cmake_minimum_required() should be called prior to this top-level project()
     call.  Please see the cmake-commands(7) manual for usage documentation of
     both commands.
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   -- Arrow include path: /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/include
   -- Found the Arrow library: /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/libarrow.dylib
   CMake Warning (dev) at CMakeLists.txt:4 (add_executable):
     Policy CMP0002 is not set: Logical target names must be globally unique.
     Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
     command to set the policy and suppress this warning.
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   CMake Warning (dev) in CMakeLists.txt:
     No cmake_minimum_required command is present.  A line of code such as
   
       cmake_minimum_required(VERSION 3.26)
   
     should be added at the top of the file.  The version specified may be lower
     if you wish to support older CMake versions for this project.  For more
     information run "cmake --help-policy CMP0000".
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   -- Configuring done (0.1s)
   CMake Warning (dev) at CMakeLists.txt:6 (target_link_libraries):
     Policy CMP0028 is not set: Double colon in target name means ALIAS or
     IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
     Use the cmake_policy command to set the policy and suppress this warning.
   
     Target "compute_and_write_csv_example" links to:
   
       Arrow::arrow_shared
   
     but the target was not found.  Possible reasons include:
   
       * There is a typo in the target name.
       * A find_package call is missing for an IMPORTED target.
       * An ALIAS target is missing.
   
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   -- Generating done (0.0s)
   -- Build files have been written to: /Users/zacharyfierstadt/projects/arrow_scratch
   (pyarrow-dev) Zacharys-MacBook-Air:arrow_scratch zacharyfierstadt$ make
   [ 50%] Building CXX object CMakeFiles/compute_and_write_csv_example.dir/compute_and_write_csv_example.o
   [100%] Linking CXX executable compute_and_write_csv_example
   ld: library not found for -lArrow::arrow_shared
   clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
   make[2]: *** [CMakeFiles/compute_and_write_csv_example.dir/build.make:97: compute_and_write_csv_example] Error 1
   make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/compute_and_write_csv_example.dir/all] Error 2
   make: *** [Makefile:91: all] Error 2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1498203426

   I got rid of homebrew completely to make this simpler. That FindArrow.cmake
   was left over from a forced attempt I tried previously.
   
   If I start with a 100% fresh conda environment (tried multiple times,
   different compile options) - same result. It always creates a config
   module, never a FindArrow.cmake.
   
   Seems like this was by design. Which is fine - doc just needs to be updated.
   
   On Wed, Apr 5, 2023 at 2:47 PM Sutou Kouhei ***@***.***>
   wrote:
   
   >
   > /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/FindArrow.cmake
   >
   > It's strange. Could you try with a newly created env again?
   >
   > /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/FindArrow.cmake
   >
   > It's strange. CMake itself doesn't provide FindArrow.cmake:
   > https://gitlab.kitware.com/cmake/cmake/-/tree/master/Modules
   >
   > Could you reinstall Homebrew's CMake? brew install --reinstall cmake
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1498200287>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGKP6HL72R3VXGXPQYTW7XR5RANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1495352819

   Kou,
   
   After a lot of hunting I figured out the crux the issue:
   
    find_package(Arrow REQUIRED CONFIG) 
   
   Note the addition of CONFIG parameter above. By default, CMake will search for Find<Module> if you use the short parameter signature. Apache Arrow does not install a FindArrow.cmake in the make install phase - I tried this on a M1 Mac for both Release and Debug presets.
   
   It does install a Arrow/ dir in lib/cmake. By adding the CONFIG parameter above, cmake will search and locate this module with no issue. 
   
   Interested to hear your thoughts...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1493395462

   error below: 
   
   (pyarrow-dev) Zacharys-MacBook-Air:arrow_scratch zacharyfierstadt$ make
   [ 50%] Building CXX object CMakeFiles/compute_and_write_csv_example.dir/compute_and_write_csv_example.o
   [100%] Linking CXX executable compute_and_write_csv_example
   ld: library not found for -lArrow::arrow_shared
   clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
   make[2]: *** [CMakeFiles/compute_and_write_csv_example.dir/build.make:97: compute_and_write_csv_example] Error 1
   make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/compute_and_write_csv_example.dir/all] Error 2
   make: *** [Makefile:91: all] Error 2
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1496744959

   OK - so the fact that the build system installs Arrow/arrow-config.cmake in the install dir means it's expecting config mode.  The simplest thing to do in the docs is just change find_package(Arrow) to find_package(Arrow CONFIG). If you don't change the docs, you're going to have to change the build system to produce a FindArrow.cmake - but why bother? 
   
   see https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html
   
   _The [find_package()](https://cmake.org/cmake/help/latest/command/find_package.html#command:find_package) command may be used to search for the package configuration file. This command constructs a set of installation prefixes and searches under each prefix in several locations. Given the name Foo, it looks for a file called FooConfig.cmake or **foo-config.cmake**. The full set of locations is specified in the [find_package()](https://cmake.org/cmake/help/latest/command/find_package.html#command:find_package) command documentation. One place it looks is:_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1498200287

   > /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/FindArrow.cmake
   
   It's strange. Could you try with a newly created env again?
   
   > /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/FindArrow.cmake
   
   It's strange. CMake itself doesn't provide `FindArrow.cmake`: https://gitlab.kitware.com/cmake/cmake/-/tree/master/Modules
   
   Could you reinstall Homebrew's CMake? `brew install --reinstall cmake`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1495011504

   How did you install Apache Arrow C++?
   Could you show full command lines and logs of them?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499541798

   Yes, CONFIG is still required - breaks otherwise.
   
   This seems consistent with the documentation here:
   https://cmake.org/cmake/help/latest/command/find_package.html#basic-signature
   
   It will fall back to the ArrowConfig.cmake in Arrow/ dir only if you
   specify CONFIG. Otherwise, it looks like FindPackage.
   
   
   
   On Wed, Apr 5, 2023 at 4:39 PM Sutou Kouhei ***@***.***>
   wrote:
   
   > It always creates a config module, never a FindArrow.cmake.
   >
   > This means that ArrowConfig.cmake is created but FindArrow.cmake is NOT
   > created, right?
   > If so, it's expected. And find_package(Arrow REQUIRED) (no CONFIG) should
   > work. Do you still need find_package(Arrow REQUIRED CONFIG) with the
   > fresh conda environment?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1498286905>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGPBACWHTUBNVXK4NVLW7X7EBANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499648908

   Soutou,
   
   Good (but frustrating news):
   
   I created *yet* another conda environment, and it works. I have absolutely
   no idea what has changed. This was demonstrably broken for days.
   
   Feel free to close this - if it comes back, I can reopen. What a bizarre
   situation...
   
   
   On Thu, Apr 6, 2023 at 1:56 PM Zach Fierstadt ***@***.***> wrote:
   
   > Soutou:
   >
   > Question: have you tried a fresh install with conda and using the getting
   > started c++ cmake config we've been troubleshooting? did it work? If so,
   > which OS are you using, and I can try to replicate.
   >
   > Here is the output with -DCMAKE_FIND_DEBUG_MODE=ON with the doc's
   > suggested cmake config (find_package(Arrow REQUIRED)). Note below that in
   > this mode, it wants FindArrow.cmake, but it can't find it - because it
   > doesn't exist.
   >
   > (pyarrow-dev) Zacharys-MacBook-Air:arrow_scratch zacharyfierstadt$ cmake
   > -DCMAKE_FIND_DEBUG_MODE=on .
   >
   > CMake Warning (dev) at CMakeLists.txt:1 (project):
   >
   >   cmake_minimum_required() should be called prior to this top-level
   > project()
   >
   >   call.  Please see the cmake-commands(7) manual for usage documentation
   > of
   >
   >   both commands.
   >
   > This warning is for project developers.  Use -Wno-dev to suppress it.
   >
   >
   > -- Arrow version: 12.0.0
   >
   > -- Found the Arrow shared library:
   > /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/libarrow.1200.0.0.dylib
   >
   > -- Found the Arrow import library: ARROW_IMPORT_LIB-NOTFOUND
   >
   > -- Found the Arrow static library:
   >
   > CMake Debug Log at CMakeLists.txt:3 (find_package):
   >
   >   find_package considered the following paths for FindArrow.cmake:
   >
   >
   >
   > /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/share/cmake-3.26/Modules/FindArrow.cmake
   >
   >
   >   The file was not found.
   >
   >
   >
   > /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/ArrowConfig.cmake
   >
   >
   >
   >
   > CMake Warning (dev) in CMakeLists.txt:
   >
   >   No cmake_minimum_required command is present.  A line of code such as
   >
   >
   >     cmake_minimum_required(VERSION 3.26)
   >
   >
   >   should be added at the top of the file.  The version specified may be
   > lower
   >
   >   if you wish to support older CMake versions for this project.  For more
   >
   >   information run "cmake --help-policy CMP0000".
   >
   > This warning is for project developers.  Use -Wno-dev to suppress it.
   >
   >
   > -- Configuring done (0.0s)
   >
   > -- Generating done (0.0s)
   >
   > -- Build files have been written to:
   > /Users/zacharyfierstadt/projects/arrow_scratch
   >
   >
   >
   > On Thu, Apr 6, 2023 at 1:50 PM Sutou Kouhei ***@***.***>
   > wrote:
   >
   >> Sorry. I can't speak/listen English. :-<
   >>
   >> I think that running cmake -DCMAKE_FIND_DEBUG_MODE=ON ... again with
   >> your new environment helps us.
   >>
   >> —
   >> Reply to this email directly, view it on GitHub
   >> <https://github.com/apache/arrow/issues/34841#issuecomment-1499608127>,
   >> or unsubscribe
   >> <https://github.com/notifications/unsubscribe-auth/AC74BGIZK6LC7MTKITLRIMLW74UDDANCNFSM6AAAAAAWQBGRHM>
   >> .
   >> You are receiving this because you authored the thread.Message ID:
   >> ***@***.***>
   >>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1496456484

   shouldn't FindArrow.cmake be in here?
   
   (pyarrow-dev) Zacharys-MacBook-Air:build zacharyfierstadt$ cat cmake_install.cmake | grep -i Find
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindSnappyAlt.cmake")
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindBrotliAlt.cmake")
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindOpenSSLAlt.cmake")
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindThriftAlt.cmake")
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/Findlz4Alt.cmake")
     file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/Arrow" TYPE FILE FILES "/Users/zacharyfierstadt/projects/arrow/cpp/cmake_modules/FindzstdAlt.cmake")
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499597047

   Then, could you identify what conda package installs `FindArrow.cmake` on your environment?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zfoobar commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "zfoobar (via GitHub)" <gi...@apache.org>.
zfoobar commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499619827

   Soutou:
   
   Question: have you tried a fresh install with conda and using the getting
   started c++ cmake config we've been troubleshooting? did it work? If so,
   which OS are you using, and I can try to replicate.
   
   Here is the output with -DCMAKE_FIND_DEBUG_MODE=ON with the doc's suggested
   cmake config (find_package(Arrow REQUIRED)). Note below that in this mode,
   it wants FindArrow.cmake, but it can't find it - because it doesn't exist.
   
   (pyarrow-dev) Zacharys-MacBook-Air:arrow_scratch zacharyfierstadt$ cmake
   -DCMAKE_FIND_DEBUG_MODE=on .
   
   CMake Warning (dev) at CMakeLists.txt:1 (project):
   
     cmake_minimum_required() should be called prior to this top-level
   project()
   
     call.  Please see the cmake-commands(7) manual for usage documentation of
   
     both commands.
   
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   
   -- Arrow version: 12.0.0
   
   -- Found the Arrow shared library:
   /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/libarrow.1200.0.0.dylib
   
   -- Found the Arrow import library: ARROW_IMPORT_LIB-NOTFOUND
   
   -- Found the Arrow static library:
   
   CMake Debug Log at CMakeLists.txt:3 (find_package):
   
     find_package considered the following paths for FindArrow.cmake:
   
   
   
   /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/share/cmake-3.26/Modules/FindArrow.cmake
   
   
     The file was not found.
   
   
   
   /Users/zacharyfierstadt/miniconda3/envs/pyarrow-dev/lib/cmake/Arrow/ArrowConfig.cmake
   
   
   
   
   CMake Warning (dev) in CMakeLists.txt:
   
     No cmake_minimum_required command is present.  A line of code such as
   
   
       cmake_minimum_required(VERSION 3.26)
   
   
     should be added at the top of the file.  The version specified may be
   lower
   
     if you wish to support older CMake versions for this project.  For more
   
     information run "cmake --help-policy CMP0000".
   
   This warning is for project developers.  Use -Wno-dev to suppress it.
   
   
   -- Configuring done (0.0s)
   
   -- Generating done (0.0s)
   
   -- Build files have been written to:
   /Users/zacharyfierstadt/projects/arrow_scratch
   
   
   
   On Thu, Apr 6, 2023 at 1:50 PM Sutou Kouhei ***@***.***>
   wrote:
   
   > Sorry. I can't speak/listen English. :-<
   >
   > I think that running cmake -DCMAKE_FIND_DEBUG_MODE=ON ... again with your
   > new environment helps us.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/arrow/issues/34841#issuecomment-1499608127>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC74BGIZK6LC7MTKITLRIMLW74UDDANCNFSM6AAAAAAWQBGRHM>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #34841: [C++][Docs] Suggested CMake config doesn't work in C++ Getting Started Documentation

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #34841:
URL: https://github.com/apache/arrow/issues/34841#issuecomment-1499604383

   FYI: Our CI uses the CMake config and the job is passing: https://github.com/apache/arrow/actions/runs/4630481831/jobs/8192106802


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org