tcpdump mailing list archives

Re: Need precompiled source files in libpcap


From: Guy Harris <guy () alum mit edu>
Date: Sat, 25 Jun 2016 00:09:12 -0700

On Jun 24, 2016, at 8:58 PM, Yang Luo <hsluoyb () gmail com> wrote:

I found that there are a lot of “precompiled source code files" like grammar.c, scanner.c, grammar.h, ,scanner.h, 
etc. (which are also listed in .gitignore). They are NOT contained in the libpcap repo.

I personally want to ship them in the "Win32-Extensions" folder of the Npcap repo, so the Npcap developers can just 
build the "libpcap.sln" project with one click, and will get the wpcap.dll.

Do you think this is a good idea? Or Windows developers should also build everything from the bottom?

You can either

        1) install Flex and Bison yourself, use them to build those files, and ship them with the Npcap source (along 
with the .y and .l files!)

or

        2) require that developers install Flex and Bison.

You will need Flex 2.5.31 or later.  See, for example

        https://sourceforge.net/projects/winflexbison/

for Flex and Bison for Windows.

I noticed this docs: https://github.com/the-tcpdump-group/libpcap/blob/master/INSTALL.txt, and it seems to require to 
run "./configure" (a shell script), which is for Linux. So I think there's no Windows alternative config command for 
now?

The autoconf script is UN*X-only.  (It's not "for Linux", it's for Linux and OS X and FreeBSD and NetBSD and OpenBSD 
and DragonFly BSD and Solaris and HP-UX and AIX and even, assuming it still works, older dead UN*Xes.)

We also support CMake:

        https://cmake.org

on both UN*X *and* Windows.

And installing flex and bison for Windows are not also very friendly.

        https://twitter.com/geraldcombs/status/735870968451629056

And I think those source files are less likely to change as frequently as other sources.

That is not necessarily true.  Any time new operators are added to the packet filter language, either scanner.l or 
grammar.y or both will be changed.

I think just ship them in Npcap repo will be a good idea?

We won't be putting the generated versions into the libpcap repository, and I would *not* recommend putting them into 
the Npcap repository.  *If* you want to provide the generated source files in the Npcap source release, as they're 
provided in libpcap source releases, I would recommend that you generate them as part of the process of building an 
Npcap source release.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: