tcpdump mailing list archives
Re: Need precompiled source files in libpcap
From: Yang Luo <hsluoyb () gmail com>
Date: Sat, 25 Jun 2016 22:25:47 +0800
Hi Guy, On Sat, Jun 25, 2016 at 3:09 PM, Guy Harris <guy () alum mit edu> wrote:
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" likegrammar.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 theNpcap 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 alsobuild 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!)
I have successfully built libpcap on my Ubuntu, and got the generated source files. They can be used in the Windows build process. Currently, I assume that Npcap has those files (but I didn't push them to the remote). I just made a pull request about the current progress.
or 2) require that developers install Flex and Bison.
In future, I will make sure that the Windows developers compile those generated source files.
You will need Flex 2.5.31 or later. See, for example https://sourceforge.net/projects/winflexbison/ for Flex and Bison for Windows.
I will try the Windows version Flex and Bison later. Besides these two things, are there other files that need to be prebuilt? I know I need to read the "configure" file in the root dir to see what it does, but this file is too long.. If you can tell me what needs to be pre-built besides those two, it would be great..
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.)
OK. I usually say all UNIX, LINUX systems as Linux for short.. At least for me, they don't differ too much.. I will try to say UN*X instead of Linux.
We also support CMake: https://cmake.org on both UN*X *and* Windows.
Can CMake do what the UN*X "./configure" command does? On Windows, the build is very easy, just click "build" in Visual Studio. But the ".configure" process seems to have no replacement on Windows. Is that CMake?
And installing flex and bison for Windows are not also very friendly.https://twitter.com/geraldcombs/status/735870968451629056And I think those source files are less likely to change as frequentlyas 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.
This is why I think Npcap will build those generated source files too.
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.
Have you put the generated source files into the source release? I didn't see it. I have downloaded libpcap-libpcap-1.7.4.zip from https://github.com/the-tcpdump-group/libpcap/releases/tag/libpcap-1.7.4. (I don't know why the zip file name has two "libpcap" strings). Then unzipped it. I didn't see any of grammar.c, scanner.c, grammar.h, ,scanner.h. I only see a file named "scanner.c.top". Cheers, Yang _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Need precompiled source files in libpcap Yang Luo (Jun 24)
- Re: Need precompiled source files in libpcap Guy Harris (Jun 25)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 25)
- Re: Need precompiled source files in libpcap Guy Harris (Jun 25)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 30)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 25)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 30)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 30)
- Re: Need precompiled source files in libpcap Guy Harris (Jun 30)
- Re: Need precompiled source files in libpcap Yang Luo (Jun 30)
- Re: Need precompiled source files in libpcap Guy Harris (Jun 25)