lukester1975 commented on issue #15139:
URL: https://github.com/apache/arrow/issues/15139#issuecomment-1368782984

   > Could you show the full output of `cmake`?
   > 
   > Could you show the output of `pkg-config --list-all --debug`?
   
   [cmake-cfg.txt](https://github.com/apache/arrow/files/10330748/cmake-cfg.txt)
   
   I don't have a `PKG_CONFIG_PATH` set, so essentially nothing:
   
   ```
   pkg-config --list-all --debug
   Error printing enabled by default due to use of output options besides 
--exists or --atleast/exact/max-version. Value of --silence-errors: 0
   Error printing enabled
   Adding virtual 'pkg-config' package to list of known packages
   Cannot open directory 'C:/Program Files/Git/usr/lib/pkgconfig' in package 
search path: No such file or directory
   Cannot open directory 'C:/Program Files/Git/usr/share/pkgconfig' in package 
search path: No such file or directory
   Cannot open directory 'C:/Program Files/Git/lib/pkgconfig' in package search 
path: No such file or directory
   Cannot open directory 
'C:/ProgramData/chocolatey/lib/pkgconfiglite/tools/pkg-config-lite-0.28-1/lib/pkgconfig'
 in package search path: No such file or directory
   Cannot open directory 
'C:/ProgramData/chocolatey/lib/pkgconfiglite/tools/pkg-config-lite-0.28-1/share/pkgconfig'
 in package search path: No such file or directory
   ```
   
   (As an aside, I wondered if the Fedora build generates a sane looking pc 
file because it's finding the compression deps using system-wide pkg-config. 
However, I tried unsetting `PKG_CONFIG_PATH` and the generated arrow.pc file 
still looks good...)
   
   Regarding the patch for bzip2, that doesn't work quite right. 
`BZIP2_LIBRARY_RELEASE`, `BZIP2_LIBRARY_DEBUG` and `BZIP2_LIBRARY` are all set, 
so it's just a function of ordering as to what gets generated (so I ended up 
with bz2 rather than bz2d for a debug build).
   
   FWIW, this largely fixes a cmake build (again I'm sure it's bad for other 
reasons, so just for info):
   
   ```
   diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   index d0c8c600d..8354f4912 100644
   --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
   +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   @@ -291,7 +291,6 @@ macro(resolve_dependency DEPENDENCY_NAME)
        foreach(ARG_PC_PACKAGE_NAME ${ARG_PC_PACKAGE_NAMES})
          pkg_check_modules(${ARG_PC_PACKAGE_NAME}_PC
                            ${ARG_PC_PACKAGE_NAME}
   -                        NO_CMAKE_PATH
                            NO_CMAKE_ENVIRONMENT_PATH
                            QUIET)
          if(${${ARG_PC_PACKAGE_NAME}_PC_FOUND})
   @@ -2546,8 +2545,8 @@ macro(build_bzip2)
    endmacro()
    
    if(ARROW_WITH_BZ2)
   -  resolve_dependency(BZip2)
   -  if(${BZip2_SOURCE} STREQUAL "SYSTEM")
   +  resolve_dependency(BZip2 PC_PACKAGE_NAMES bzip2)
   +  if(${BZip2_SOURCE} STREQUAL "SYSTEM" AND NOT bzip2_PC_FOUND)
        string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}")
      endif()
   ```
   
   Generates a resaonable `arrow.pc`:
   
   ```
   Requires: libbrotlidec libbrotlienc zlib liblz4 libzstd bzip2
   Requires.private:
   Libs: -L${libdir} -larrow 
D:/dev/checkouts/external/arrow.git/cpp/vcpkg_installed/x64-windows-static-md/lib/snappy.lib
   Libs.private:
   Cflags: -I${includedir} -DARROW_STATIC
   Cflags.private:
   ```
   
   (snappy weirdness would presumably go away if a snappy.pc actually existed)
   
   I tried adding this as a patch to vcpkg's arrow portfile but no joy (still 
missing compression deps). I notice it uses `-DARROW_DEPENDENCY_SOURCE=SYSTEM 
-DARROW_PACKAGE_KIND=vcpkg` there rather than `-DARROW_DEPENDENCY_SOURCE=vcpkg` 
which I haven't investigated but presumably explains why this patch doesn't 
work there, somehow...
   
   Thanks
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to