Skip to content

Conversation

@lhoward
Copy link
Contributor

@lhoward lhoward commented Nov 27, 2025

This is useful for specifying the soname of libpcap as systems without development libraries installed may not have libpcap.so installed.

Fixes: #192

(Note: not tested yet.)

This is useful for specifying the soname of libpcap as systems without
development libraries installed may not have libpcap.so installed.

Fixes: L-Acoustics#192
@sonarqubecloud
Copy link

@christophe-calmejane
Copy link
Collaborator

2 things:

  • I would only enable it for linux (especially not on macOS as the user might spend ours trying to figure out why it's not working anymore)
  • We have to pass the option from cmake (explaining it's for linux, relative or absolute path)

@lhoward
Copy link
Contributor Author

lhoward commented Nov 27, 2025

  • I would only enable it for linux (especially not on macOS as the user might spend ours trying to figure out why it's not working anymore)

Potentially the same issue could occur on macOS I think (libpcap isn't shipped as part of Darwin though, is it?)

@christophe-calmejane
Copy link
Collaborator

  • I would only enable it for linux (especially not on macOS as the user might spend ours trying to figure out why it's not working anymore)

Potentially the same issue could occur on macOS I think (libpcap isn't shipped as part of Darwin though, is it?)

It is shipped, and you actually have to use it, because of increasingly tight hardening on binaries that run on macOS, otherwise you get errors almost impossible to understand. That's the comment in the code for macOS.

@lhoward
Copy link
Contributor Author

lhoward commented Nov 27, 2025

Are you sure it's shipped on Darwin? I just setup a new 15.6 machine yesterday and I can't find it in /usr/lib. Anyway, happy to make the change.

Also WireShark, PTP TrackHound, etc usually install their own version.

@christophe-calmejane
Copy link
Collaborator

I'm sure of nothing, but I never installed it :)
I've never heard any Hive user complaining it's not running due to missing pcap library, and I'm almost certain that at least one of them used it on an almost fresh computer.
But if you start hive on your fresh computer, it will show the path of the lib in the logs.

@lhoward
Copy link
Contributor Author

lhoward commented Nov 27, 2025

I'm sure of nothing, but I never installed it :) I've never heard any Hive user complaining it's not running due to missing pcap library, and I'm almost certain that at least one of them used it on an almost fresh computer. But if you start hive on your fresh computer, it will show the path of the lib in the logs.

You're right, I was fooled as it is in the dyld shared cache, so there's no actual file in /usr/lib. I will make the suggested change.

@christophe-calmejane
Copy link
Collaborator

I will make the changes, namely add the compilation option (CMakeLists.txt, src/CMakeLists.txt) and a small explanation in README.md in the linux compilation section, and change the logic to override the value in the linux specific initialization of the .so

@lhoward
Copy link
Contributor Author

lhoward commented Dec 17, 2025

Thank you, sorry, I've been swamped in other bugs.

@christophe-calmejane
Copy link
Collaborator

Ok, implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libpcap should likely be opened with versioned path

2 participants