Works fine with adding

#include "headers/shared.h"

into debug_op.c


On 6/16/07, Daniel Cid <[EMAIL PROTECTED]> wrote:
>
> Hi Serge,
>
> Thanks for the information. Would the following work?
>
> #ifndef va_copy
> #define va_copy __va_copy
> #endif
>
> It all under the #ifdef SOLARIS on header/shared.h?
>
> Warren, can you try that too? If that works (and doesn't break other versions
> of Solaris, I will commit that).
>
> *btw, you guys can blame sourceforge for it being broken. I used to use the
> compile farm to test ossec on most operating systems, but since they
> disabled it, I have no way of testing it.
>
> Thanks,
>
> --
> Daniel B. Cid
> dcid ( at ) ossec.net
>
> On 6/14/07, Serge Dubrouski <[EMAIL PROTECTED]> wrote:
> >
> > Some additional info. gcc 2.95.3 has definition for __va_copy but not
> > for va_copy:
> >
> > /* Copy __gnuc_va_list into another variable of this type.  */
> > #define __va_copy(dest, src) (dest) = (src)
> >
> > in the lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/stdarg.h.
> >
> >
> > Later versions of gcc have following definition:
> >
> > #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
> > #define va_copy(d,s)    __builtin_va_copy(d,s)
> > #endif
> > #define __va_copy(d,s)  __builtin_va_copy(d,s)
> >
> >
> > On 6/14/07, Serge Dubrouski <[EMAIL PROTECTED]> wrote:
> > > Deifinition for va_copy on Solaris 8 in stdarg.h looks like that:
> > >
> > > /*
> > >  * va_copy is a Solaris extension to provide a portable way to perform
> > >  * a variable argument list ``bookmarking'' function.
> > >  */
> > > #if defined(__EXTENSIONS__) || ((__STDC__ - 0 == 0) && \
> > >        !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))
> > >
> > > #define va_copy(to, from)       ((to) = (from))
> > >
> > > #endif  /* defined(__EXTENSIONS__) || ((__STDC__ - 0 == 0) && ... ) */
> > >
> > >
> > > It looks like that #if doesn't work for OSSEC compilation. I was lazy
> > > to do deeper investigation on this problem so I just added
> > >
> > > #define va_copy(to, from)       ((to) = (from))
> > >
> > > into src/shared/debug_op.c
> > >
> > > After that evrything compiled all right.
> > >
> > > On 6/14/07, Warren Petrofsky <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi Folks,
> > > >
> > > > I have never had a problem building ossec before, and had 0.9-2 and -3
> > > > compiled on this system (solaris 8 with gcc 2.95.3), but I just tried to
> > > > build 1.2 and received the following error:
> > > >
> > > > -------------------------
> > > >
> > > >  *** Making os_maild ***
> > > >
> > > > gcc -g -Wall -I../ -I../headers  -DDEFAULTDIR=\"/var/ossec\" -DCLIENT
> > > > -lsocket -lnsl -lresolv -DSOLARIS -DHIGHFIRST -DARGV0=\"ossec-maild\"
> > > > -DXML_VAR=\"var\" -DOSSECHIDS maild.c config.c os_maild_client.c
> > > > sendmail.c mail_list.c ../config/*.c ../shared/lib_shared.a
> > > > ../os_net/os_net.a ../os_regex/os_regex.a ../os_xml/os_xml.a -o 
> > > > ossec-maild
> > > > Undefined               first referenced
> > > >  symbol                     in file
> > > > va_copy                             ../shared/lib_shared.a(debug_op.o)
> > > > ld: fatal: Symbol referencing errors. No output written to ossec-maild
> > > > collect2: ld returned 1 exit status
> > > > *** Error code 1
> > > > make: Fatal error: Command failed for target `addclient'
> > > > Current working directory /pkg/src/ossec-hids-1.2/src/os_maild
> > > >
> > > > Error Making os_maild
> > > > *** Error code 1
> > > > make: Fatal error: Command failed for target `all'
> > > >
> > > >  Error 0x5.
> > > >  Building error. Unable to finish the installation.
> > > >
> > > > -------------------------
> > > >
> > > > Any suggestions?
> > > >
> > > > Thanks so much,
> > > >
> > > > Warren
> > > > [EMAIL PROTECTED]
> > > >
> > > > p.s. Earlier in the build, I did see a warning re: va_copy:
> > > >
> > > >  *** Making shared ***
> > > >
> > > > gcc -c -g -Wall -I../ -I../headers  -DDEFAULTDIR=\"/var/ossec\" -DCLIENT
> > > >  -lsocket -lnsl -lresolv -DSOLARIS -DHIGHFIRST -DARGV0=\"shared-libs\"
> > > > -DXML_VAR=\"var\" -DOSSECHIDS *.c
> > > > debug_op.c: In function `_log':
> > > > debug_op.c:62: warning: implicit declaration of function `va_copy'
> > > > gcc: -lsocket: linker input file unused since linking not done
> > > > gcc: -lnsl: linker input file unused since linking not done
> > > > gcc: -lresolv: linker input file unused since linking not done
> > > > ar cru lib_shared.a *.o
> > > > ranlib lib_shared.a
> > > >
> > >
> > >
> > > --
> > > Serge Dubrouski.
> > >
> >
> >
> > --
> > Serge Dubrouski.
> >
>


-- 
Serge Dubrouski.

Reply via email to