[Snort-devel] Re: [Barnyard-devel] Barnyard compilation/linking bugs

Jeff Nathan jeff at ...835...
Thu Dec 16 11:32:25 EST 2004


Replying to my own post....

Thanks to Jason Brvenik, some problems were discovered in the patch I 
sent on Tuesday.  I've created an updated patch.

Problem 1:
I was mistaken in that AC_REPLACE_FUNCS adds the functions to LIBOBJS 
and not _SOURCES.  Therefore, you must add @LIBOBJS@ to _LDADD in 
src/Makefile.am and specify the directory containing the replacement 
functions using AC_CONFIG_LIBOBJ_DIR(src).  This fix is needed so that 
barnyard will compile under OS X, period.  The linker is very picky.  
I've generated a new patch that does this correctly.

Problem 2:
I forgot to rename event.h to byevent.h in src.  The new patch 
correctly renames event.h to byevent.h everywhere including renaming 
the header itself.

Problem 3:
No change, in the new diff

Problem 4:
No change, in the new diff

Problem 5:
No change, nothing I can fix.

Problem 6:
I've added /sw/include to extra_incl and /sw/lib to LDFLAGS for OS 
X/darwin in configure.in to improve portability.  The new patch 
includes this change.

-Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: barnyard.diff.gz
Type: application/x-gzip
Size: 5267 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20041216/0ace2add/attachment.bin>
-------------- next part --------------



On Dec 14, 2004, at 1:45 PM, Jeff Nathan wrote:

> Hey Andrew,
>
> I've come across a few minor bugs in Barnyard CVS HEAD.
>
>
> Problem 1:
> Barnyard, and Snort, incorrectly use autoconf checks for strlcpy and 
> strlcat using AC_CHECK_FUNCS.  This should be done using 
> AC_REPLACE_FUNCS as the source repository includes a local version of 
> both functions.  When AC_REPLACE_FUNCS is used, the function tested is 
> automatically added to *_SOURCES in Makefile.am, but the name of the 
> source file must match the function autoconf tests.  Therefore to test 
> for strlcpy or strlcat with AC_REPLACE_FUNCS, you include strlcat.c 
> and strlcpy.c in your repository  but don't list either file in 
> Makefile.am.  The attached patch fixes this problem in Barnyard.
>
> Problem 2:
> Barnyard, and formerly Snort, includes a local event.h header.  As 
> Marty learned in his libevent experiments, this makes use of libevent 
> difficult to say the least.  Therefore, event.h has been renamed 
> byevent.h and all places it's included have been changed.  The 
> attached patch fixes this problem in Barnyard.
>
> Problem 3:
> Uses of uint* require stdint.h, per C99.  My Mac barfs when compiling 
> barnyard.  Since autoconf already tests for stdint.h, it's now 
> included in output-plugins/op_decode.c . The attached patch fixes this 
> problem in Barnyard.
>
> Problem 4:
> In several places config.h is included without using a CPP test.  This 
> is annoying if you're compiling code by hand.  All inclusions of 
> config.h are now wrapped in a CPP ifdef test.  The attached patch 
> fixes this problem in Barnyard.
>
> Problem 5: <-- (I'm only half joking here)
> Potentially the most annoying is the SourceForge CVS configuration 
> that prohibits additions and deletions of files to and from a working 
> CVS repository.  How utterly annoying!@  Great free service 
> SourceForge folks, but cumbersome in this respect.
>
> Applying this patch ASAP would be very helpful as I'm finishing a 
> barnyard output plugin and would LOVE to be able to compile checkouts 
> of CVS HEAD on my Mac.
>
> As a result of Problem 5, you'll have to use -p1 when applying the 
> attached patch.
>
> Regards,
>
> -Jeff
>
> <by.diff.gz>
> --
> http://cerberus.sourcefire.com/~jeff       (DSA key id 6923D3FD)
> "Problems cannot be solved at the same level of awareness that
> created them."   - Albert Einstein
>

--
Top security experts.  Cutting edge tools, techniques and information.
Tokyo, Japan   November, 2004   http://www.pacsec.jp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20041216/0ace2add/attachment.sig>


More information about the Snort-devel mailing list