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

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


The following commit(s) were added to refs/heads/main by this push:
     new 0dfd2c708 fix(c): Add libdl as dependency of driver manager in Meson 
(#2735)
0dfd2c708 is described below

commit 0dfd2c7089ea988cd8473c10d1ca02f827ad80c0
Author: William Ayd <[email protected]>
AuthorDate: Tue Apr 22 19:27:41 2025 -0400

    fix(c): Add libdl as dependency of driver manager in Meson (#2735)
    
    Not sure how this was working before, but on main I get the following
    issues without this:
    
    ```
    adbc_driver_manager.cc:(.text.AdbcLoadDriver+0xbe): undefined reference to 
`dlopen'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0xf8): undefined reference to 
`dlsym'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0x33e): undefined reference to 
`dlsym'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0x43b): undefined reference to 
`dlerror'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0x6b0): undefined reference to 
`dlopen'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0xab6): undefined reference to 
`dlerror'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0xd34): undefined reference to 
`dlerror'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0xfbe): undefined reference to 
`dlerror'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0x108f): undefined reference to 
`dlsym'
    
/home/willayd/miniforge3/envs/pandas-dev/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
 adbc_driver_manager.cc:(.text.AdbcLoadDriver+0x1148): undefined reference to 
`dlerror'
    collect2: error: ld returned 1 exit status
    ```
---
 c/driver_manager/meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/c/driver_manager/meson.build b/c/driver_manager/meson.build
index 6be37f96f..9eb892a2f 100644
--- a/c/driver_manager/meson.build
+++ b/c/driver_manager/meson.build
@@ -15,12 +15,14 @@
 # specific language governing permissions and limitations
 # under the License.
 
+dl_dep = dependency('dl')
 
 adbc_driver_manager_lib = library(
     'adbc_driver_manager',
     'adbc_driver_manager.cc',
     include_directories: [include_dir],
     install: true,
+    dependencies: [dl_dep],
 )
 
 pkg.generate(

Reply via email to