DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-8-24 @ 04:24

If anybody wanted a (win32) build of DosBox ECE with the NE2000 patch implemented, but isn't tech savvy enough to compile it themselves, here it is. The zip I am linking to contains the .exe and (IIRC) ALL required .dll's. Note that it requires that you install winpcap/win10pcap/npcap (for modern computers I recommend npcap in winpcap mode).

edit # 3: Updated to r4168

ORIGINAL POST: I'm trying to install libpcap into msys2/mingw-w64 so I can compile Dosbox ECE with the NE2000 patch added. Unfortunately, libpcap isn't available in the msys2 repositories in any form. No matter what I try (extracting the NPCap SDK or the old WinPCap equivalent...not both at once of course), I get "checking for pcap_open_live in -lpcap... no". Is it impossible to compile with MinGW-W64 using libpcap?
Last edited by Danfun64 on 2018-10-29 @ 22:42, edited 5 times in total.
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: Libpcap in MSYS2/MinGW-W64?

Postby Qbix » 2018-8-24 @ 05:31

the error sounds like you need to check in config.log to see what is actually happening.
At first glance you don't have the -L and -I setup correctly for configure to find the files you installed. or a version difference
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10681
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Libpcap in MSYS2/MinGW-W64?

Postby Danfun64 » 2018-8-25 @ 02:48

Here's an abridged paste. If you'd like the entire contents of config.log , let me know.
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: Libpcap in MSYS2/MinGW-W64?

Postby kjliew » 2018-8-26 @ 16:51

Make sure you are using i686 build of MSYS2/MinGW-w64. The winpcap developer's pack does not include x64 libs in lib.a format.
I was able to build DOSBox SVN with NE2000 patch + winpcap last time. However, I found that it was not very stable, so I gave up maintaining such build myself. That was with the old MSYS/MinGW from MinGW.org.
The GCC linker "-l" requires libs in lib.a format. For eg. -lpcap requires libpcap.a to be in the libs search path. However, the winpcap developer's pack only has libwpcap.a. So I guess you either need to rename the lib.a or change the configure script to use -lwpcap.
kjliew
Member
 
Posts: 250
Joined: 2004-1-08 @ 03:03

Re: Libpcap in MSYS2/MinGW-W64?

Postby Danfun64 » 2018-8-26 @ 18:24

I was going to compile the i686 build anyway because I was under the impression the dynamic compiler was only for x86...but yeah, renaming the .lib file to something MSYS2 would recognize appeared to do the trick. I'll let you know if it compiles correctly.

edit: What is the latest version of SDL_Sound that fully supports SDL 1.2?

edit: Compiled and runs successfully. Biggest issue I had was that ldd didn't list all the DLL's I needed, so I had to get Process Explorer. I'll upload my build sometime today.

edit: here it is, a build of DosBox ECE r4074 with NE2000 support (note that it is NOT compiled with SDL_Sound support, as I don't know what the last version that fully supports SDL 1.2 is.) You'll need to install Npcap in order for this to work, which can be found here
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: Libpcap in MSYS2/MinGW-W64?

Postby Danfun64 » 2018-8-30 @ 15:16

Bump. Basically, my problem with SDL_Sound is that the newest versions don't work with SDL 1.2 at all (at one point hardcoding an expectation of a specific SDL2 version or newer) but the latest "release" version (as of this writing 1.0.3) fully supports SDL 1.2...but doesn't work with modern compilers. I was hoping that somebody knew what the last working commit was that fully supported SDL 1.2 .

On a side note, my build of DosBox ECE r4141 with NE2000 support: https://drive.google.com/open?id=1MUpvG ... prYa_Jut7w

edit: Part of my problem was that at one point that I was doing all this the Icculus website was down. I think I found the version I need (the Stable 1.0 branch of the Mercurial repository)

edit: Oh dear. Can somebody tell me what went wrong here? http://paste.debian.net/1039946/
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: Libpcap in MSYS2/MinGW-W64?

Postby kjliew » 2018-8-30 @ 19:24

Check out the patch I have for SDL_sound 1.0.3.
Here's the source tar I used:
https://www.icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz

For MSYS2/MinGW-w64, you need to change the line -
from:
+ if (SearchPath(NULL,"msys-1.0.dll",NULL,255,buf,NULL)) {
to:
+ if (SearchPath(NULL,"msys-2.0.dll",NULL,255,buf,NULL)) {

This enables relative search path from msys-2.0.dll (which is in /usr/bin) to have the timidity patchsets in /usr/local/share.

In SDL_sound-1.0.3/playsound/physfsrwops.h, __EXPORT__ is undefined. You want to add:
#ifndef __EXPORT__
#define __EXPORT__
#endif
Attachments
patch_SDL_sound.txt
(4.3 KiB) Downloaded 4 times
kjliew
Member
 
Posts: 250
Joined: 2004-1-08 @ 03:03

Re: Libpcap in MSYS2/MinGW-W64?

Postby Danfun64 » 2018-8-31 @ 03:23

TY. I'll see how it goes. However, due to a several year difference between SDL_sound 1.0.3 and the release-1.0 branch, I'd like to get the latter one working on my system.

edit: aaaaaaaaaaand I get errors. http://paste.debian.net/1040041/
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: Libpcap in MSYS2/MinGW-W64?

Postby kjliew » 2018-8-31 @ 22:00

The build log did not have any errors. Those were warnings. I think your build was done.
kjliew
Member
 
Posts: 250
Joined: 2004-1-08 @ 03:03

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-9-01 @ 04:32

And so it was. here is the result. If anybody knows how to get the release-1.0 branch of the SDL_sound mercurial working, let me know.
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby DosFreak » 2018-9-01 @ 09:56

Can you check the instructions in the DOSBox compilation guide threat on my Google Drive in my signature?
User avatar
DosFreak
l33t++
 
Posts: 9935
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-9-01 @ 17:10

Image
There was no need to threaten me. ;P (At least, I'm assuming that's a typo)

Anyways, I tried your SDL_sound download, and when I tried to compile it, I got this: http://paste.debian.net/1040305/
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby DosFreak » 2018-9-01 @ 20:35

I'm confused are you using SDL1.2 or SDL2? If you aren't using physfs then disable it.
User avatar
DosFreak
l33t++
 
Posts: 9935
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-9-01 @ 20:49

SDL1.2 . I disabled physfs like you suggested, but I ended up with issues with both the official release-1.0 branch and your distribution. http://paste.debian.net/1040354/
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-9-06 @ 03:39

Bump. Any advice on these issues?
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33

Re: DosBox ECE Win32 build with NE2000 (was "Libpcap in MSYS2/MinGW-W64?")

Postby Danfun64 » 2018-10-22 @ 20:07

...I think an update to the msys2 repositories broke libpcap support... or .lib support.....or something.
Attachments
config.log
(69.37 KiB) Downloaded 6 times
Danfun64
Member
 
Posts: 105
Joined: 2009-11-15 @ 20:33


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 0 guests