[collectd] perl compilation error
Oleg King
king2 at kaluga.ru
Mon Apr 28 13:28:46 CEST 2008
Hi!
> Just to make sure, we're talking about the same thing: What does line
> 1367 in src/perl.c say? Is it "PERL_SYS_INIT3 (&argc, &argv,
> &environ);"?
Yes, this line.
> If that's the case, please check what it expands to on your platform:
> cd src
> gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -Wall \
> -I/usr/local/lib/perl5/5.8.8/mach/CORE \
> -DAPPLLIB_EXP=/usr/local/lib/perl5/5.8.8/BSDPAN \
> -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DXS_VERSION=\"4.3.3\" \
> .deps/perl_la-perl.Tpo \
> -g -O2 -MT perl_la-perl.lo -MD -MP -MF -E -fPIC -DPIC perl.c
I made:
make distclean
./configure
make
cd src
sh doit (having gсс... lines pasted inside 'doit' file :))
It is output:
perl.c: In function 'init_pi':
perl.c:1367: warning: value computed is not used
/usr/bin/ld:.deps/perl_la-perl.Tpo: file format not recognized; treating as linker script
/usr/bin/ld:.deps/perl_la-perl.Tpo:1: syntax error
and I have new file named '-E' in src directory. It started with lines:
perl_la-perl.lo: perl.c collectd.h config.h /usr/include/stdio.h \
/usr/include/sys/cdefs.h /usr/include/sys/_null.h \
/usr/include/sys/_types.h /usr/include/machine/_types.h \
/usr/include/sys/types.h /usr/include/machine/endian.h \
... etc (something about 8k bytes of such text)
I have read man gcc, looked on make output and odified your line this
way:
gcc -E -DHAVE_CONFIG_H -I. -I/usr/local/include -Wall \
-I/usr/local/lib/perl5/5.8.8/mach/CORE \
-DAPPLLIB_EXP=/usr/local/lib/perl5/5.8.8/BSDPAN \
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DXS_VERSION=\"4.3.3\" \
-g -O2 -MT perl_la-perl.lo -MD -MP -MF .deps/perl_la-perl.Tpo \
-fPIC -DPIC perl.c
After that I got BIG OUTPUT of parsed text. :)
> If you're unsure how to get the relevant parts out of that output,
> please send all of the output to the list.
I found parsed line:
if (0 != pthread_key_create (&perl_thr_key, c_ithread_destructor)) {
plugin_log (3, "perl: " "init_pi: pthread_key_create failed");
exit (1);
}
>>> ((int) (~__fpsetreg(~(0), 0, 0x3f, 0)) & (0x3f >> 0)); ;
perl_threads = (c_ithread_list_t *)smalloc (sizeof (c_ithread_list_t));
memset (perl_threads, 0, sizeof (c_ithread_list_t));
Indeed, value calculated here is not used...
What should I do to make 'make' happier? :)
--
WBR,
Oleg mailto:king2 at kaluga.ru
More information about the collectd
mailing list