Skip to contentSkip to conversation

meson: FreeBSD: make inotify dependency optional

PATCH In review Marian Cingel 2 participants 2 messages Jan 25 – Jan 26 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: FreeBSD: make inotify dependency optional

- 'libinitofy' is not a base package, therefore installed to /usr/local
- 'find_library' invokes clang, which by default *does not* search '/usr/local/lib', so even when libinotify.so is present in system, the detection does not work and 'configure' reports an error.
- tested on FreeBSD-15

---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index a84f14258b..ac1c02d7da 100644
@@ -2661,7 +2661,7 @@ have_inotify_init1 = cc.has_header_symbol('sys/inotify.h', 'inotify_init1')
 inotify = not_found
 if (have_inotify_init or have_inotify_init1) and host_os == 'freebsd'
   # libinotify-kqueue
-  inotify = cc.find_library('inotify')
+  inotify = cc.find_library('inotify', required: false)
   if have_inotify_init
     have_inotify_init = inotify.found()
   endif
Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · Marian Cingel

- 'libinitofy' is not a base package, therefore installed to /usr/local
- 'find_library' invokes clang, which by default *does not* search '/usr/local/lib', so even when libinotify.so is present in system, the detection does not work and 'configure' reports an error.
- tested on FreeBSD-15

Shouldn't we not use inotify at all on 15 now that FreeBSD has a native inotify?

Warner

Quoted 23 lines
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index a84f14258b..ac1c02d7da 100644
@@ -2661,7 +2661,7 @@ have_inotify_init1 =
 cc.has_header_symbol('sys/inotify.h', 'inotify_init1')
 inotify = not_found
 if (have_inotify_init or have_inotify_init1) and host_os == 'freebsd'
   # libinotify-kqueue
-  inotify = cc.find_library('inotify')
+  inotify = cc.find_library('inotify', required: false)
   if have_inotify_init
     have_inotify_init = inotify.found()

endif
--
2.43.0