Re: [Nagios-devel] Nagios/CVS HEAD compilation issues on Solaris (strsep patch)
Posted: Sat Nov 22, 2003 4:57 pm
Done - Thanks.
On 22 Nov 2003 at 13:48, Joe Rhett wrote:
> Nagios/CVS HEAD already has a configure script, so I ran that and it
> completed fine. But compilation fails, complaining about symbols that
> are part of Nagios.
>
> gcc -g -O2 -I/opt/imagelib/include -DHAVE_CONFIG_H -DNSCORE -o nagios
> nagios.c broker.o nebmods.o checks.o config.o commands.o events.o
> flapping.o logging.o notifications.o sehandlers.o utils.o
> retention-base.o xretention-base.o comments-base.o xcomments-base.o
> objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o
> perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o
> -L/opt/imagelib/lib -lm -lnsl -lsocket -lpthread -ldl Undefined
> first referenced
> symbol in file
> strsep xretention-base.o
> nanosleep events.o
> ld: fatal: Symbol referencing errors. No output written to nagios
> collect2: ld returned 1 exit status
>
> First, in every file except for the x?ddefaults.c files you replaced
> strsep() with my_strsep(). This patch brings these two together:
>
> *** xdata/xrddefault.c_orig Sat Nov 22 13:36:18 2003
> --- xdata/xrddefault.c Sat Nov 22 13:36:56 2003
> ***************
> *** 633,639 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_host->state_history[x]=atoi(s
> ! trsep(&temp_ptr,","));
> temp_host->state_history_index=0; }
> }
> --- 633,639 ----
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_host->state_history[x]=atoi(m
> ! y_strsep(&temp_ptr,","));
> temp_host->state_history_index=0; }
> }
> ***************
> *** 796,802 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_service->state_history[x]=ato
> ! i(strsep(&temp_ptr,","));
> temp_service->state_history_index=0
> ; } }
> --- 796,802 ----
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_service->state_history[x]=ato
> ! i(my_strsep(&temp_ptr,","));
> temp_service->state_history_index=0
> ; } }
>
> *** xdata/xsddefault.c_orig Sat Nov 22 13:36:31 2003
> --- xdata/xsddefault.c Sat Nov 22 13:37:06 2003
> ***************
> *** 650,656 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_hoststatus->state_history[x]=
> ! atoi(strsep(&temp_ptr,","));
> temp_hosts
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
On 22 Nov 2003 at 13:48, Joe Rhett wrote:
> Nagios/CVS HEAD already has a configure script, so I ran that and it
> completed fine. But compilation fails, complaining about symbols that
> are part of Nagios.
>
> gcc -g -O2 -I/opt/imagelib/include -DHAVE_CONFIG_H -DNSCORE -o nagios
> nagios.c broker.o nebmods.o checks.o config.o commands.o events.o
> flapping.o logging.o notifications.o sehandlers.o utils.o
> retention-base.o xretention-base.o comments-base.o xcomments-base.o
> objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o
> perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o
> -L/opt/imagelib/lib -lm -lnsl -lsocket -lpthread -ldl Undefined
> first referenced
> symbol in file
> strsep xretention-base.o
> nanosleep events.o
> ld: fatal: Symbol referencing errors. No output written to nagios
> collect2: ld returned 1 exit status
>
> First, in every file except for the x?ddefaults.c files you replaced
> strsep() with my_strsep(). This patch brings these two together:
>
> *** xdata/xrddefault.c_orig Sat Nov 22 13:36:18 2003
> --- xdata/xrddefault.c Sat Nov 22 13:36:56 2003
> ***************
> *** 633,639 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_host->state_history[x]=atoi(s
> ! trsep(&temp_ptr,","));
> temp_host->state_history_index=0; }
> }
> --- 633,639 ----
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_host->state_history[x]=atoi(m
> ! y_strsep(&temp_ptr,","));
> temp_host->state_history_index=0; }
> }
> ***************
> *** 796,802 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_service->state_history[x]=ato
> ! i(strsep(&temp_ptr,","));
> temp_service->state_history_index=0
> ; } }
> --- 796,802 ----
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_service->state_history[x]=ato
> ! i(my_strsep(&temp_ptr,","));
> temp_service->state_history_index=0
> ; } }
>
> *** xdata/xsddefault.c_orig Sat Nov 22 13:36:31 2003
> --- xdata/xsddefault.c Sat Nov 22 13:37:06 2003
> ***************
> *** 650,656 ****
> else
> if(!strcmp(var,"state_history")){
> temp_ptr=val;
> for(x=0;x ;x++)
> ! temp_hoststatus->state_history[x]=
> ! atoi(strsep(&temp_ptr,","));
> temp_hosts
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]