[collectd] perl compilation error

Sebastian Harl sh at tokkee.org
Mon Apr 28 14:00:44 CEST 2008


Hi,

On Mon, Apr 28, 2008 at 03:28:46PM +0400, Oleg King wrote:
> I have read man gcc, looked on make output and odified your line this
> way:

Sorry, I did not test the gcc-call I've provided in my last mail. I just
took out the important parts of the call as provided by the autotools...
guess I've missed something ;-)

> After that I got BIG OUTPUT of parsed text. :)

Yes, that's expected ;-)

> >>> ((int) (~__fpsetreg(~(0), 0, 0x3f, 0)) & (0x3f >> 0)); ;
[...]
>  Indeed, value calculated here is not used...
>  What should I do to make 'make' happier? :)

Hrm... I couldn't really find where exactly that comes from - that's
just a hell of nested macros. I could not find "fpsetreg" anywhere in
the perl sources though, so I expect it comes from some macro defined in
a system header which is then used by any of the Perl macros. The best
place to fix this would be wherever that last expanded macro is used
which is out of our scope. Anyway, as a (probably no-so-)temporary
workaround you can try the attached patch. I hope, the compiler is not
smart enough to still complain about it...

If anybody comes up with a better solution, I'd be quite happy! :-)

HTH,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
diff --git a/src/perl.c b/src/perl.c
index 6d3326f..9bdf68d 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -1364,7 +1364,10 @@ static int init_pi (int argc, char **argv)
 		exit (1);
 	}
 
-	PERL_SYS_INIT3 (&argc, &argv, &environ);
+	{
+		/* make gcc on FreeBSD happy :-/ */
+		int dummy = PERL_SYS_INIT3 (&argc, &argv, &environ);
+	}
 
 	perl_threads = (c_ithread_list_t *)smalloc (sizeof (c_ithread_list_t));
 	memset (perl_threads, 0, sizeof (c_ithread_list_t));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080428/66ae32ab/attachment.pgp 


More information about the collectd mailing list