AppleWin icon indicating copy to clipboard operation
AppleWin copied to clipboard

libpcap is still required if libslirp is found

Open ryandesign opened this issue 1 year ago • 2 comments

I'm on Linux Mint trying to build your latest code from git.

My understanding is that you require either libslirp or libpcap:

-- Checking for one of the modules 'slirp'
CMake Warning at source/CMakeLists.txt:10 (message):
  'libslirp' not found.  Will use 'libpcap' instead


-- Checking for one of the modules 'libpcap'
CMake Error at source/CMakeLists.txt:24 (message):
  Cannot locate 'libpcap-dev'


-- Configuring incomplete, errors occurred!

So I installed libslirp-dev by running:

sudo apt install libslirp-dev

But I still get this error:

-- Checking for one of the modules 'libpcap'
CMake Error at source/CMakeLists.txt:24 (message):
  Cannot locate 'libpcap-dev'


-- Configuring incomplete, errors occurred!

It goes away if I run:

sudo apt install libpcap-dev

but should I really have to install both of them?

ryandesign avatar Jan 19 '24 07:01 ryandesign

It is a bit different.

slirp is optional, pcap compulsory

There are no #iddefs in code to compile it out.

audetto avatar Jan 19 '24 18:01 audetto

What happens is this: pcap is compulsory and must be linked, but it slirp is present, it will not be used (nor usable).

I know what one might think, but the cost of installing the lib it is less than the profit of removing it. I could at least make it selectable, which would at least remove the apparent nonsense.

audetto avatar Jan 20 '24 16:01 audetto