This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 54697eaefe GH-44465: [GLib][C++] Meson searches libraries with 
specific versions. (#44475)
54697eaefe is described below

commit 54697eaefeb151ad195f3a5812aafa48ba77c45e
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Sat Oct 19 16:00:16 2024 +0900

    GH-44465: [GLib][C++] Meson searches libraries with specific versions. 
(#44475)
    
    
    
    ### Rationale for this change
    
    This PR fixes #44465. Meson selects incorrect Arrow C++ libraries in some 
situations.
    
    ### What changes are included in this PR?
    
    Meson searches arrow libraries with particular versions.
    For example, if the c_glib version number is 18.0.0-SNAPSHOT, Meson 
searches the Arrow C++ library greater than 18.0.0-SNAPSHOT.
    
    ### Are these changes tested?
    
    Yes.
    
    If the required version libraries exist, install it properly.
    
    ```
    Run-time dependency arrow found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-compute found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-csv found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-filesystem found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-json found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-orc found: YES 18.0.0-SNAPSHOT
    Found CMake: /opt/homebrew/bin/cmake (3.30.5)
    WARNING: CMake Toolchain: Failed to determine CMake compilers state
    Run-time dependency arrow-cuda found: NO (tried pkgconfig, framework and 
cmake)
    Run-time dependency arrow-acero found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-dataset found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-flight found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-flight-sql found: YES 18.0.0-SNAPSHOT
    Run-time dependency gandiva found: YES 18.0.0-SNAPSHOT
    Run-time dependency parquet found: YES 18.0.0-SNAPSHOT
    ```
    
    If an environment doesn't install Arrow C++ 18.0.0-SNAPSHOT (Installed 
older version 17.0.0)
    
    ```
    Run-time dependency arrow found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-compute found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-csv found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-filesystem found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-json found: YES 18.0.0-SNAPSHOT
    Run-time dependency arrow-orc found: YES 18.0.0-SNAPSHOT
    Found CMake: /opt/homebrew/bin/cmake (3.30.5)
    WARNING: CMake Toolchain: Failed to determine CMake compilers state
    Run-time dependency arrow-cuda found: NO (tried pkgconfig, framework and 
cmake)
    Run-time dependency arrow-acero found: YES 18.0.0-SNAPSHOT
    Dependency arrow-dataset found: NO. Found 17.0.0 but need: 
'>=18.0.0-SNAPSHOT'
    Run-time dependency arrow-dataset found: NO (tried pkgconfig, framework and 
cmake)
    Dependency arrow-flight found: NO. Found 17.0.0 but need: 
'>=18.0.0-SNAPSHOT'
    Run-time dependency arrow-flight found: NO (tried pkgconfig, framework and 
cmake)
    Dependency arrow-flight-sql found: NO. Found 17.0.0 but need: 
'>=18.0.0-SNAPSHOT'
    Run-time dependency arrow-flight-sql found: NO (tried pkgconfig, framework 
and cmake)
    Dependency gandiva found: NO. Found 17.0.0 but need: '>=18.0.0-SNAPSHOT'
    ...
    Dependency parquet found: NO. Found 17.0.0 but need: '>=18.0.0-SNAPSHOT'
    Run-time dependency parquet found: NO (tried pkgconfig and framework)
    ```
    
    ### Are there any user-facing changes?
    
    Yes.
    
    * GitHub Issue: #44465
    
    Authored-by: Hiroyuki Sato <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 c_glib/meson.build | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/c_glib/meson.build b/c_glib/meson.build
index 214c577470..96ca375716 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -103,23 +103,23 @@ else
 endif
 
 if arrow_cpp_build_lib_dir == ''
-  arrow = dependency('arrow')
+  arrow = dependency('arrow', version: ['>=' + version])
   # They are just for checking required modules are enabled. They are built 
into
   # libarrow.so. So we don't need additional build flags for them.
-  dependency('arrow-compute')
-  dependency('arrow-csv')
-  dependency('arrow-filesystem')
-  dependency('arrow-json')
+  dependency('arrow-compute', version: ['>=' + version])
+  dependency('arrow-csv', version: ['>=' + version])
+  dependency('arrow-filesystem', version: ['>=' + version])
+  dependency('arrow-json', version: ['>=' + version])
 
-  have_arrow_orc = dependency('arrow-orc', required: false).found()
-  arrow_cuda = dependency('arrow-cuda', required: false)
+  have_arrow_orc = dependency('arrow-orc', required: false, version: ['>=' + 
version]).found()
+  arrow_cuda = dependency('arrow-cuda', required: false, version: ['>=' + 
version])
   # we do not support compiling glib without acero engine
-  arrow_acero = dependency('arrow-acero', required: true)
-  arrow_dataset = dependency('arrow-dataset', required: false)
-  arrow_flight = dependency('arrow-flight', required: false)
-  arrow_flight_sql = dependency('arrow-flight-sql', required: false)
-  gandiva = dependency('gandiva', required: false)
-  parquet = dependency('parquet', required: false)
+  arrow_acero = dependency('arrow-acero', required: true, version: ['>=' + 
version])
+  arrow_dataset = dependency('arrow-dataset', required: false, version: ['>=' 
+ version])
+  arrow_flight = dependency('arrow-flight', required: false, version: ['>=' + 
version])
+  arrow_flight_sql = dependency('arrow-flight-sql', required: false, version: 
['>=' + version])
+  gandiva = dependency('gandiva', required: false, version: ['>=' + version])
+  parquet = dependency('parquet', required: false, version: ['>=' + version])
 else
   base_include_directories += [
     include_directories(join_paths(arrow_cpp_build_dir, 'src')),

Reply via email to