After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662143 - libdl not present on various systems
libdl not present on various systems
Status: RESOLVED FIXED
Product: glom
Classification: Other
Component: general
1.19.x
Other OpenBSD
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2011-10-18 21:32 UTC by Jasper Lievisse Adriaanse
Modified: 2011-10-20 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check of libdl instead of unconditionally linking with it. (2.03 KB, patch)
2011-10-19 12:27 UTC, Jasper Lievisse Adriaanse
none Details | Review

Description Jasper Lievisse Adriaanse 2011-10-18 21:32:58 UTC
libdl isn't found on various system, including OpenBSD. Thus hardcoding -ldl in Makefile's: tests_python_test_load_python_library_LDADD breaks on those systems. Perhaps a configure check could be added that checks for libdl?
Comment 1 Murray Cumming 2011-10-19 09:53:31 UTC
Sure, a patch for that would be welcome.

However, is there some alternative to the dlopen(), dlerror(), and dlclose() functions on that platform? It would be nice for the test to work.
Comment 2 Jasper Lievisse Adriaanse 2011-10-19 11:30:58 UTC
Those functions are present (dlfcn.h) but don't need libdl to work.
Comment 3 Jasper Lievisse Adriaanse 2011-10-19 12:27:43 UTC
Created attachment 199419 [details] [review]
Check of libdl instead of unconditionally linking with it.
Comment 4 Murray Cumming 2011-10-19 20:13:49 UTC
Please push, adding a comment before AC_CHECK_LIB() saying that it is not needed on (non-Linux) platforms that don't have it.
Comment 5 Jasper Lievisse Adriaanse 2011-10-19 21:14:58 UTC
Thanks, I've pushed it in b8693a503ac0bae9cf7d3feca3a99a8d121bacf5.
Comment 6 David King 2011-10-19 21:25:49 UTC
Review of attachment 199419 [details] [review]:

::: configure.ac
@@ -70,2 +70,3 @@
 AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name.])
 
+AC_CHECK_LIB([dl], [dlopen], DL_LIB="-ldl")

If DL_LIB is used in a Makefile.am, it will need to be substituted for an output variable with AC_SUBST, as it is not in the list of default output variables:

http://www.gnu.org/software/autoconf/manual/autoconf.html#Preset-Output-Variables
Comment 7 Jasper Lievisse Adriaanse 2011-10-19 21:28:26 UTC
Hmm, AC_SUBST(DL_LIB) will do the trick?
Comment 8 David King 2011-10-20 05:32:16 UTC
(In reply to comment #7)
> Hmm, AC_SUBST(DL_LIB) will do the trick?

Correct. It would probably be simpler to replace the ‘DL_LIB="-ldl"’ inside the AC_CHECK_LIB with ‘AC_SUBST([DL_LIB], ["-ldl"])’.
Comment 9 Jasper Lievisse Adriaanse 2011-10-20 07:05:56 UTC
Thanks for the auto-bat ;-) I've adjusted the script.