I have tested option 3. I get the following error:<br><br>Making all in libltdl<br>make[1]: Entering directory `/usr/src/redhat/SOURCES/collectd-4.3.1/libltdl&#39;<br>make&nbsp; all-am<br>make[2]: Entering directory `/usr/src/redhat/SOURCES/collectd-4.3.1/libltdl&#39;<br>
/bin/sh ./libtool --tag=CC&nbsp;&nbsp; --mode=compile gcc -DHAVE_CONFIG_H -I.&nbsp;&nbsp;&nbsp;&nbsp; -DLT_LAZY_OR_NOW=RTLD_LAZY|RTLD_GLOBAL -c -o ltdl.lo ltdl.c<br>/bin/sh: RTLD_GLOBAL: command not found<br>libtool: compile: cannot determine name of library object from `-DLT_LAZY_OR_NOW=RTLD_LAZY&#39;<br>
make[2]: *** [ltdl.lo] Error 127<br>make[2]: Leaving directory `/usr/src/redhat/SOURCES/collectd-4.3.1/libltdl&#39;<br>make[1]: *** [all] Error 2<br>make[1]: Leaving directory `/usr/src/redhat/SOURCES/collectd-4.3.1/libltdl&#39;<br>
make: *** [all-recursive] Error 1<br><br>my configure statement is: ./configure CFLAGS=-DLT_LAZY_OR_NOW=&#39;RTLD_LAZY|RTLD_GLOBAL&#39; --prefix=/usr --sbindir=/usr/sbin --mandir=/usr/share/man --libdir=/usr/lib --sysconfdir=/etc --enable-apache --enable-email --enable-mysql --enable-dns<br>
<br><br><br><div><span class="gmail_quote">On 3/10/08, <b class="gmail_sendername">Sebastian Harl</b> &lt;<a href="mailto:sh@tokkee.org">sh@tokkee.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> <br><br> On Sun, Mar 09, 2008 at 08:11:01PM -0700, Thorsten von Eicken wrote:<br> &gt; I&#39;m having trouble getting the perl plugin to work on CentOS 5.0. As<br> &gt; soon as I put a LoadPlugin line into the perl conf section I get:<br>
 &gt;<br> &gt; [2008-03-09 23:02:22] perl: Initializing Perl interpreter...<br> &gt; /usr/sbin/collectd: symbol lookup error:<br> &gt; /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so: undefined<br> &gt; symbol: Perl_Tstack_sp_ptr<br>
 <br> <br>This is a know bug/problem with libtool/call it whatever you like. I<br> guess this should be put in the FAQ or possibly the collectd-perl<br> manpage...<br> <br> (Skip the following two paragraphs if you&#39;re not interested in the<br>
 technical details.)<br> <br> Anyway, the problem is that, by default, libtool/libltdl only uses the<br> RTDL_LAZY or RTDL_NOW flag when doing dlopen(3) and there is no (sane)<br> way to tell libltdl to use any other flags. Now, when the perl plugin is<br>
 loaded using lt_dlopen() (the dlopen wrapper provided by libltdl), the<br> RTLD_LOCAL flag is used (that&#39;s the default in glibc and presumably<br> other libc implementations) which causes all symbols defined in this<br>
 library to not be made available to subsequently loaded libraries. As<br> libperl is loaded as a dependency of the perl plugin, none of its<br> symbols will be made available to subsequently loaded libraries either.<br> <br>
 Now, if you try to load a Perl module from a collectd Perl plugin which<br> uses DynaLoader to load further libraries (like IO.so in this case) this<br> library will depend on libperl as well. However, libperl has already<br>
 been loaded before and the linker will not do so again but will be<br> unable to resolve any symbols as they have not been made available<br> before. This could be solved by using dlopen()&#39;s RTLD_GLOBAL flag in the<br>
 first place. Supposedly, this flag would cause libltdl not to be as<br> portable as the developers want it to be and thus it&#39;s not supported.<br> <br> (I hope this did not get too confusing... ;-)<br> <br> There are four ways to solve this. The first two will probably take some<br>
 time and require modifications of collectd. The latter ones are rather<br> hacks but may be used now.<br> <br> 1. Do not use libtool/libltdl in collectd. We&#39;d then have to take care<br> of portable code ourselves. I did not have a look at that so far but I<br>
 assume it&#39;s not trivial - else something like libtool would not be<br> justified (well, we&#39;re in the OpenSource world, so basically anything is<br> justified... ;-).<br> <br> 2. Wait for libtool to provide something like lt_dlopen_flags(). This<br>
 has already been discussed on the developer&#39;s mailing list but I don&#39;t<br> know the current state. collectd might not work on whatever platform(s)<br> that do(es)n&#39;t support RTLD_GLOBAL then.<br> <br> 3. Use &quot;LD_PRELOAD=/path/to/libperl collectd[mon]&quot; to run collectd. This<br>
 way, libperl is loaded at startup and all symbols will be made available<br> to subsequently loaded libraries. I do not recommend this for any<br> packages or the like though as it would fail, if libperl is not<br> available.<br>
 <br> 4. Configure collectd using something like &quot;./configure<br> CFLAGS=-DLT_LAZY_OR_NOW=&#39;RTLD_LAZY|RTLD_GLOBAL&#39;&quot;. This will overwrite<br> the flags used by libltdl. That&#39;s what I&#39;m currently using for the<br>
 Debian package. I don&#39;t really like that but it&#39;s imho the best solution<br> right now. You have to make sure that you&#39;re using the appropriate flags<br> for your architecture - see the dlopen(3) manpage.<br>
 <br> Any feedback and comments would be very appreciated.<br> <br> HTH,<br> Sebastian<br> <br><br> --<br> Sebastian &quot;tokkee&quot; Harl +++ GnuPG-ID: 0x8501C7FC +++ <a href="http://tokkee.org/">http://tokkee.org/</a><br>
 <br> Those who would give up Essential Liberty to purchase a little Temporary<br> Safety, deserve neither Liberty nor Safety.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Benjamin Franklin<br> <br> <br>-----BEGIN PGP SIGNATURE-----<br> Version: GnuPG v1.4.6 (GNU/Linux)<br>
 <br> iD8DBQFH1QbKEFEKc4UBx/wRAtbeAJ9w79sM1MbnkDKPwQpiJnVdftP5ZACfQ32F<br> HN50Ro6CFjQmidf92OXegDI=<br> =g57E<br> -----END PGP SIGNATURE-----<br> <br>_______________________________________________<br> collectd mailing list<br>
 <a href="mailto:collectd@verplant.org">collectd@verplant.org</a><br> <a href="http://mailman.verplant.org/listinfo/collectd">http://mailman.verplant.org/listinfo/collectd</a><br> <br></blockquote></div><br><br clear="all">
<br>-- <br>Thanks, <br><br>Richard Shade<br>RightScale<br><a href="http://www.rightscale.com/">http://www.rightscale.com/</a>