Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


cactid svn revision 4002 - undefined reference errors

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
nebj00la
Cacti User


Joined: 17 Feb 2006
Posts: 56
Location: Massachusetts, USA

PostPosted: Fri Jul 20, 2007 1:42 pm    Post subject: cactid svn revision 4002 - undefined reference errors Reply with quote

I get the following output when trying to compile cactid rev. 4002, after running autoconf and ./configure.

/usr/local/src/svn/cacti/branches/BRANCH_0_8_6/cactid/cactid.c:151: undefined reference to `install_cactid_signal_handler'

Code:
/* install the cactid signal handler */ install_cactid_signal_handler();


/usr/local/src/svn/cacti/branches/BRANCH_0_8_6/cactid/cactid.c:621: undefined reference to `uninstall_cactid_signal_handler'

Code:
 /* uninstall the cactid signal handler */ uninstall_cactid_signal_handler();
exit(EXIT_SUCCESS);


Thanks,
nebj00la

UPDATE: commented out the calls to install_cactid_signal_handler and uninstall_cactid_signal_handler within cactid.c, as mentioned in a previous post http://forums.cacti.net/viewtopic.php?t=15661.

Quote:
4. There are a couple functions called in cactid.c, install_cactid_signal_handler and uninstall_cactid_signal_handler, these are prototyped in error.h and defined in error.c. Unfortunately, the function definitions are commented out. I'm not sure what the intent is here (whether or not we should be calling these), so I commented out the calls in cactid.c. It may be that the correct answer is to remove the comments in error.c, I'm not sure.



I'm not sure this should be allowed by design. cactid compiles fine after commenting out the calls.
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Tue Jul 24, 2007 2:08 am    Post subject: Reply with quote

Hi

I'm getting the same (system is CentOS 4.5, up to date) :
Code:
gcc  -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2  -L/usr/lib -L/usr/lib/mysql  -o cactid  sql.o cactid.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o  -lnetsnmp -lmysqlclient_r -lmysqlclient_r -lcrypto -lz -lpthread -lm -lnsl
cactid.o(.text+0x6b): In function `main':
/home/frederic/cactid/cactid.c:151: undefined reference to `install_cactid_signal_handler'
cactid.o(.text+0x8fc):/home/frederic/cactid/cactid.c:621: undefined reference to `uninstall_cactid_signal_handler'
collect2: ld returned 1 exit status
make: *** [cactid] Error 1

and
Code:
gcc  -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2  -L/usr/lib -L/usr/lib/mysql  -o cactid  sql.o cactid.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o  -lnetsnmp -lmysqlclient_r -lmysqlclient_r -lcrypto -lz -lpthread -lm -lnsl
cactid.o(.text+0x6b): In function `main':
/home/frederic/cactid/cactid.c:151: undefined reference to `install_cactid_signal_handler'
collect2: ld returned 1 exit status
make: *** [cactid] Error 1

After commenting the uninstall_cactid_signal_handler and install_cactid_signal_handler in cactid.c, it builds fine.
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Jul 24, 2007 6:21 am    Post subject: Reply with quote

Can you revert and then go through the sequence:

aclocal
autoheader
automake
autoconf
make clean
make

TheWitness
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Tue Jul 24, 2007 6:44 am    Post subject: Reply with quote

It works fine
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Jul 24, 2007 6:52 am    Post subject: Reply with quote

Heading to the office not. Going dark.

TheWitness
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group