From: Sebastian Harl Date: Tue, 5 Feb 2008 21:48:19 +0000 (+0100) Subject: Added workaround for the "dlopen()-issue" of the perl plugin. X-Git-Tag: collectd-4.3.0-1~25 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=88ca5b1c5be3b191ed95df803dffe055dd6525b4;p=pkg-collectd.git Added workaround for the "dlopen()-issue" of the perl plugin. There is no way to tell lt_dlopen() to use the RTLD_GLOBAL flag which is however required by the perl plugin (which would otherwise be unable to find symbols defined in libperl when loading perl modules that require such symbols). This can be worked around by using -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL' when compiling collectd. This is rather a hack but the best solution I can currently think of. --- diff --git a/debian/rules b/debian/rules index fd65b70..19f2aae 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,12 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g -I$(CURDIR)/debian/include +# There is no way to tell lt_dlopen() to use the RTLD_GLOBAL flag which is +# however required by the perl plugin (which would otherwise be unable to find +# symbols defined in libperl when loading perl modules that require such +# symbols). This is a workaround for this issue. +CFLAGS += -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL' + ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else