[vlc-devel] [PATCH] configure: disable -z defs linker check for OpenBSD.

Brad Smith brad at comstyle.com
Thu Apr 2 08:59:12 CEST 2020

configure: disable -z defs linker check for OpenBSD.

When linking libvlccore with -z defs, the following happens:

ld: error: undefined symbol: (daemon / getpid / fprintf / fclose / free / etc.)
>>> referenced by libvlc.c
>>>               .libs/libvlc.o:(libvlc_InternalInit)

Shared libraris on OpenBSD are not linked against libc thus this is expected.
-z defs cannot be used for shared libaries if they reference any libc functions.
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 9aba863449..269fb1f36b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,7 @@ case "${host_os}" in
     CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
     LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
+    ac_cv_ld_z_defs=no

More information about the vlc-devel mailing list