Repository navigation
Conversation
Running ./install.sh on macOS (Intel and Apple Silicon) hit several platform issues in the native build and install path: 1. build_target unconditionally passed -extldflags "-static-libgcc" for native builds. That is a GNU/GCC linker flag; Apple's clang rejects it with "unsupported option '-static-libgcc'", failing all 63 tool builds. Guard the flag with [ "$(uname -s)" = "Linux" ]. 2. The libpcap header check only probed /usr/include and /opt/homebrew/include. Modern macOS (10.14+) places system headers inside the Command Line Tools SDK (xcrun --show-sdk-path), and Homebrew installs libpcap as keg-only under /opt/homebrew/opt/libpcap/include (Apple Silicon) or /usr/local/opt/libpcap/include (Intel), causing sniff and split to be falsely skipped on macOS. 3. Fresh Apple Silicon macOS installs often do not have /usr/local/bin created yet; ensure install_native runs mkdir -p on INSTALL_DIR before copying binaries, and mention xcode-select --install in the compiler check hint. Thanks to @m57 for reporting and fixing the -static-libgcc linker issue in #44.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes native builds and installation on macOS (Intel and Apple Silicon):
-static-libgccto Linux native builds: Apple'sclanglinker rejects-static-libgcc(clang: error: unsupported option '-static-libgcc'), causing all 63 tools to fail to link on macOS.libpcapheaders: Modern macOS shipspcap.hinside the Command Line Tools SDK (xcrun --show-sdk-path), and Homebrew markslibpcapas keg-only (/opt/homebrew/opt/libpcap/include/pcap.hon Apple Silicon,/usr/local/opt/libpcap/include/pcap.hon Intel). Probing these paths preventssniffandsplitfrom being falsely skipped on macOS.INSTALL_DIRif missing & addxcode-selecthint: Fresh Apple Silicon macOS systems often do not have/usr/local/bincreated yet;install_nativenow ensuresINSTALL_DIRexists viamkdir -pbefore copying binaries.Thanks to @m57 for identifying and fixing the
-static-libgcclinker failure in #44!Supersedes #44.