[gnutls-devel] GnuTLS | Impossible to use dlwrap when cross compiling (#1583)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Sep 25 14:10:38 CEST 2024



Ross Burton created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1583



`configure.ac` uses `AC_TRY_RUN` to determine if `dlopen` works:

```
AC_RUN_IFELSE(
  [AC_LANG_PROGRAM(
    [[#include <dlfcn.h>
      #include <stdlib.h>
    ]],
    [[void *handle = dlopen("$M_LIBRARY_SONAME", RTLD_LAZY | RTLD_GLOBAL);
      return handle != NULL ? 0 : 1;
    ]])],
  [ac_cv_dlopen_soname_works=yes],
  [ac_cv_dlopen_soname_works=no],
  [ac_cv_dlopen_soname_works=cross-compiling])

AM_CONDITIONAL([ENABLE_DLOPEN], [test "$ac_cv_dlopen_soname_works" = yes])
```

This means that it's impossible to use dlwrap in cross-compilation environments.  I suggest a `--with-dlwrap` option to explicitly select whether it should be enable or disabled, and fallback to detection.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1583
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20240925/98a25306/attachment.html>


More information about the Gnutls-devel mailing list