Error again ...
asprintf doesn't exist ? I am trying to find a solution ....
gcc -g -O2 -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c=20
dbhandlers-2x.o io.o utils.o db.o -lnsl -lsocket -lmysqlclient -lm
Undefined first referenced
symbol in file
asprintf dbhandlers-2x.o
ld: fatal: Symbol referencing errors. No output written to ndo2db-2x
collect2: ld returned 1 exit status
Damien
Le 15 avr. 06, =E0 01:33, Damien Basti=E9 a =E9crit :
> Another error ...
>
> gcc -g -O2 -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c=20=
> dbhandlers-2x.o io.o utils.o db.o -lnsl -lsocket -lmysqlclient
> ndo2db.c:14:20: mcheck.h: No such file or directory
>
> mcheck doesn't exist on Solaris ?
>
> I have tried to comment #define DEBUG_MEMORY 1
>
> After i have :
>
> gcc -g -O2 -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c=20=
> dbhandlers-2x.o io.o utils.o db.o -lnsl -lsocket -lmysqlclient
> Undefined first referenced
> symbol in file
> ceil utils.o (symbol belongs to=20
> implicit dependency /usr/lib/libm.so.2)
> asprintf dbhandlers-2x.o
> ld: fatal: Symbol referencing errors. No output written to ndo2db-2x
> collect2: ld returned 1 exit status
>
> I have corrected "ceil" problem by adding $(MATHLIBS) in src/Makefile=20=
> to :
>
> ndo2db-2x: ndo2db.c $(NDO_INC) $(NDO_OBJS) $(COMMON_INC)=20
> $(COMMON_OBJS) dbhandlers-2x.o
> $(CC) $(CFLAGS) $(DBCFLAGS) -D BUILD_NAGIOS_2X -o ndo2db-2x=20
> ndo2db.c dbhandlers-2x.o $(COMMON_OBJS) $(NDO_OBJS) $(LDFLAGS)=20
> $(DBLDFLAGS) $(LIBS) $(SOCK
> ETLIBS) $(DBLIBS) $(OTHERLIBS)
>
>
> Damien
>
> Le 14 avr. 06, =E0 20:54, Damien Basti=E9 a =E9crit :
>
>> Hi,
>>
>> I have corrected the problem by adding in io.c file :
>>
>> #define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)=20=
>> + strlen ((ptr)->sun_path))
>>
>> Damien
>>
>> Le 14 avr. 06, =E0 18:25, Damien Basti=E9 a =E9crit :
>>
>>> Hi,
>>>
>>> I tried to compil ndoutils with my Solaris 10 box, and i have these=20=
>>> following errors :
>>> # make
>>>
>>> cd ./src/; make ; cd ..
>>> make[1]: Entering directory=20
>>> `/export/home/compilation/ndoutils-1.3.1/src'
>>> gcc -g -O2 -DHAVE_CONFIG_H -c -o io.o io.c
>>> gcc -g -O2 -DHAVE_CONFIG_H -c -o utils.o utils.c
>>> gcc -g -O2 -DHAVE_CONFIG_H -o file2sock file2sock.c io.o utils.o =20=
>>> -lm -lnsl -lsocket
>>> Symbole premi=E8re r=E9f=E9rence
>>> non d=E9fini dans le fichier
>>> SUN_LEN io.o
>>> ld: fatal : Erreurs dans le r=E9f=E9rencement des symboles. Aucun=20=
>>> r=E9sultat n'a =E9t=E9 =E9crit dans file2sock
>>> collect2: ld returned 1 exit status
>>> make[1]: *** [file2sock] Error 1
>>> make[1]: Leaving directory=20
>>> `/export/home/compilation/ndoutils-1.3.1/src'
>>>
>>>
>>> (Sorry i have french box)
>>>
>>> It seems that SUN_LEN doesn't exist on Solaris...
>>>
>>> Anyone have a small patch ?
>>>
>>> Thx in advance,
>>>
>>> Damien
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by xPML, a groundbreaking scripting=20=
>>> language
>>> that extends applications into web and mobile media. Attend the live=20=
>>> webcast
>>> and join the prime developer group breaking into this new coding=20
>>> territory!
>>> http://sel.as-us.falkag.net/sel?cmd=3Dl ... &dat=1216=
42
>>> _______________________________________________
>>> Nagios-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/lis ... gios-devel
>>
>>
>> Damien Basti=E9
>> Administrateur Syst=E8me et R=E9seau.
>> BRAINTEC
>> 9 rue Santos Dumont, 75015 PARIS
>> T=E9l : 33 156085200 - Fax : 33 156085239
>> http://www.braintec.fr
>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting=20
> language
> that ex
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]