cactid 0.8.6
Moderators: Developers, Moderators
This is what I get when I modify the line to say
char *result_string = malloc(BUFSIZE);
-->
source='poller.c' object='poller.o' libtool=no depfile='.deps/poller.Po' tmpdepfile='.deps/poller.TPo' depmode=gcc /bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'poller.c' || echo './'`poller.c
poller.c: In function `exec_poll':
poller.c:482: syntax error before `char'
poller.c:505: `result_string' undeclared (first use in this function)
poller.c:505: (Each undeclared identifier is reported only once
poller.c:505: for each function it appears in.)
*** Error code 1
Any ideas?
char *result_string = malloc(BUFSIZE);
-->
source='poller.c' object='poller.o' libtool=no depfile='.deps/poller.Po' tmpdepfile='.deps/poller.TPo' depmode=gcc /bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'poller.c' || echo './'`poller.c
poller.c: In function `exec_poll':
poller.c:482: syntax error before `char'
poller.c:505: `result_string' undeclared (first use in this function)
poller.c:505: (Each undeclared identifier is reported only once
poller.c:505: for each function it appears in.)
*** Error code 1
Any ideas?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Another user was having this problem and corrected it by upgrading to GCC 3.4. Give it a shot. If it won't make, you might have to seek out a binary distribution for your platform.
www.gnu.org
Until then cmd.php works pretty well when you bump up the concurrent processes to somethin about 3 times the number of processors you have or until your CPU get's around 80%.
TheWitness
www.gnu.org
Until then cmd.php works pretty well when you bump up the concurrent processes to somethin about 3 times the number of processors you have or until your CPU get's around 80%.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Hi All,
On one of my cacti machine's running FreeBSD 4.10 (cvsup to the latest version today) i also notice this problem.
When compiling cactid i am getting the error:
poller.c: In function `exec_poll':
poller.c:482: syntax error before `char'
poller.c:505: `result_string' undeclared (first use in this function)
poller.c:505: (Each undeclared identifier is reported only once
poller.c:505: for each function it appears in.)
*** Error code 1
I also tried changing the code as mentioned in one of the previous posts but still no luck.
Commenting out the following line's (479 & 480) seems to fix the problem:
timeout.tv_sec = 5;
timeout.tv_usec = 0;
I can imagine that commenting out line's of code isnt a real fix but perhaps it can take us closer to the solution.
Regards,
BadKarma
On one of my cacti machine's running FreeBSD 4.10 (cvsup to the latest version today) i also notice this problem.
When compiling cactid i am getting the error:
poller.c: In function `exec_poll':
poller.c:482: syntax error before `char'
poller.c:505: `result_string' undeclared (first use in this function)
poller.c:505: (Each undeclared identifier is reported only once
poller.c:505: for each function it appears in.)
*** Error code 1
I also tried changing the code as mentioned in one of the previous posts but still no luck.
Commenting out the following line's (479 & 480) seems to fix the problem:
timeout.tv_sec = 5;
timeout.tv_usec = 0;
I can imagine that commenting out line's of code isnt a real fix but perhaps it can take us closer to the solution.
Regards,
BadKarma
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
BadKarma,
You and I are right on top of each other. That timeout is important. Make sure you upgrade GCC and try again.
TheWitness
You and I are right on top of each other. That timeout is important. Make sure you upgrade GCC and try again.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Move this line:webalign wrote:This is what I get when I modify the line to say
char *result_string = malloc(BUFSIZE);
-->
source='poller.c' object='poller.o' libtool=no depfile='.deps/poller.Po' tmpdepfile='.deps/poller.TPo' depmode=gcc /bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'poller.c' || echo './'`poller.c
poller.c: In function `exec_poll':
poller.c:482: syntax error before `char'
poller.c:505: `result_string' undeclared (first use in this function)
poller.c:505: (Each undeclared identifier is reported only once
poller.c:505: for each function it appears in.)
*** Error code 1
Any ideas?
char *result_string = (char *) malloc(BUFSIZE);
Up a few lines to be above the "timeout.tv_sec" lines.
Then it should compile just fine. This is because slighly older C compilers make you do all of your declarations before any statements.
Perhaps the cactid authors could make that simple change in their next version so ease this for more users.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Kelp,
If this turns out true, remind me to buy you something.
TheWitness
If this turns out true, remind me to buy you something.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Hi Guys,
I finally got gcc34 compiled and its looking better than the old gcc versions.
I also can confirm that the option that kelp gave seems to work.
But both resolutions gave me another error:
poller.o: In function `poll_host':
/poller.c:228: undefined reference to `atoll'
/poller.c:228: undefined reference to `atoll'
/poller.c:238: undefined reference to `atoll'
/poller.c:238: undefined reference to `atoll'
*** Error code 1
This problem seems to be related to atoll() not being part of FreeBSD 4 and 5 release.
I found multiple references that you can change the atoll() string to atol() with just one l.
After changing all four atoll statement cactid seems to compile just fine.
BadKarma
I finally got gcc34 compiled and its looking better than the old gcc versions.
I also can confirm that the option that kelp gave seems to work.
But both resolutions gave me another error:
poller.o: In function `poll_host':
/poller.c:228: undefined reference to `atoll'
/poller.c:228: undefined reference to `atoll'
/poller.c:238: undefined reference to `atoll'
/poller.c:238: undefined reference to `atoll'
*** Error code 1
This problem seems to be related to atoll() not being part of FreeBSD 4 and 5 release.
I found multiple references that you can change the atoll() string to atol() with just one l.
After changing all four atoll statement cactid seems to compile just fine.
BadKarma
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Great suggestion. We will incorporate into the poller.c code. However, could you see if there is any other method to gain additional precision? I will also need to know the compiler variable to look for with freebsd. If you could provide that, I would be especially greatful.
Thanks,
TheWitness
Thanks,
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Hi,
As far as i understand atoll is an equivalant of:
strtoll(nptr, (char **)NULL, 10)
FreeBSD does understand strtoll().
Its ugly but perhaps a fix is to make a define somewhere to atoll with the strtoll() routine.
Another option would be to change the atoll calls into:
strtoll(nptr, (char **)NULL, 10) in the poller.c code.
Regards,
Bad
As far as i understand atoll is an equivalant of:
strtoll(nptr, (char **)NULL, 10)
FreeBSD does understand strtoll().
Its ugly but perhaps a fix is to make a define somewhere to atoll with the strtoll() routine.
Another option would be to change the atoll calls into:
strtoll(nptr, (char **)NULL, 10) in the poller.c code.
Regards,
Bad
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
BadKarma,
Took your advice 0.8.6a will be posed on the website tomorrow under the beta distribution for 0.8.6a.
http://www.cacti.net/downloads
TheWitness
Took your advice 0.8.6a will be posed on the website tomorrow under the beta distribution for 0.8.6a.
http://www.cacti.net/downloads
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Okay,
I got it compiled with gcc 2.95.4 on FreeBSD 4.9 by moving the line " char *result_string = (char *) malloc(BUFSIZE);" before the timeout.tv_xxx settings and changing all "atoll" to "atol".
I am no programer, so can I use it this way or is there a big difference between atol and atoll ? Also, I see these messages in the log:
cactid in free(): warning: junk pointer, too high to make sense
and
09/16/2004 11:04:49 PM - POLLER: Poller[0] Host[101] WARNING: Recache Event Detected for Host
09/16/2004 11:05:06 PM - POLLER: Poller[0] Host[102] WARNING: Recache Event Detected for Host
Any ideas?
THANKS!
I got it compiled with gcc 2.95.4 on FreeBSD 4.9 by moving the line " char *result_string = (char *) malloc(BUFSIZE);" before the timeout.tv_xxx settings and changing all "atoll" to "atol".
I am no programer, so can I use it this way or is there a big difference between atol and atoll ? Also, I see these messages in the log:
cactid in free(): warning: junk pointer, too high to make sense
and
09/16/2004 11:04:49 PM - POLLER: Poller[0] Host[101] WARNING: Recache Event Detected for Host
09/16/2004 11:05:06 PM - POLLER: Poller[0] Host[102] WARNING: Recache Event Detected for Host
Any ideas?
THANKS!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
BadKarma is correct, please follow the link to http://www.cacti.net/downloads to obtain the latest pre-release of cactid 0.8.6a. This will resolve your problem. And special thanks to BadKarma (not so bad after all....).
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
All,
Please read and heed. More information in the next few days.
http://forums.cacti.net/viewtopic.php?t=4908
TheWitness
Please read and heed. More information in the next few days.
http://forums.cacti.net/viewtopic.php?t=4908
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 2 guests