From ea1476c4f03845fa054cf590089ec33dd3999f5d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 19 Oct 2017 11:53:50 -0700 Subject: [PATCH] Suggest using CMake rather than autotools. The configure script 1) can't find newer versions of Qt, thanks to the Qt developers not supplying any .pc files and 2) doesn't look for useful frameworks, so it's not the best way to build Wireshark on macOS any more. Discuss CMake instead. Change-Id: I28befffab010221e2e17e37f5beaf8b732974190 Reviewed-on: https://code.wireshark.org/review/23990 Reviewed-by: Guy Harris --- README.macos | 60 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/README.macos b/README.macos index cde1360559..4b013dbc82 100644 --- a/README.macos +++ b/README.macos @@ -22,16 +22,27 @@ Qt packages and source code from or use the tools/macos-setup.sh script described below. +You should have CMake installed; you can download binary distributions +for macOS from + + https://cmake.org/download/ + +The Wireshark source includes an autoconf configure script; however, +that script cannot find recent versions of Qt for macOS, and will not +try to find macOS frameworks that Wireshark can use to improve the user +experience, so we don't recomment using the configure script. + The tools/macos-setup.sh script can be used to download, patch as necessary, build as necessary, and install those libraries and the -libraries on which they depend; it will, by default, also install other -libraries that can be used by Wireshark and TShark. The versions of -libraries to download are specified by variables set early in the -script; you can comment out the settings of optional libraries if you -don't want them downloaded and installed. Before running the -tools/macos-setup.sh script, and before attempting to build Wireshark, -make sure your PKG_CONFIG_PATH environment variable's setting includes -both /usr/X11/lib/pkgconfig and /usr/local/lib/pkgconfig. +libraries on which they depend, along with tools such as CMake; it will, +by default, also install other libraries that can be used by Wireshark +and TShark. The versions of libraries and tools to download are +specified by variables set early in the script; you can comment out the +settings of optional libraries if you don't want them downloaded and +installed. Before running the tools/macos-setup.sh script, and before +attempting to build Wireshark, make sure your PKG_CONFIG_PATH +environment variable's setting includes both /usr/X11/lib/pkgconfig and +/usr/local/lib/pkgconfig. The tools/macos-setup.sh script must be run from the top-level source directory. @@ -48,25 +59,28 @@ elsewhere, such as After you have installed those libraries: -If you are building from a Git tree, rather than from a source -distribution tarball, run the autogen.sh script. This should not be -necessary if you're building from a source distribution tarball, unless -you've added new source files to the Wireshark source. + make a directory in which Wireshark is to be built, separate + from the top-level source directory for Wireshark - it can be a + subdirectory of that top-level source directory; -Then run the configure script, and run make to build Wireshark. + cd to that directory, and run CMake, with an argument that is a + path to the top-level source directory; + + when CMake finishes, run make to build Wireshark. + +For example, to build Wireshark in a subdirectory of the top-level +source directory, named "build", do, from the top-level source +directory; + + mkdir build + cd build + cmake .. + make If you upgrade the major release of macOS on which you are building Wireshark, we advise that, before you do any builds after the upgrade, -you do, in the build directory: - - If you are building from a release tarball: - make distclean - - If you are building from Git: - make maintainer-clean - ./autogen.sh - -Then re-run the configure script and rebuild from scratch. +you remove the build directory and all its subdiretories, and repeat the +above process, re-running CMake and rebuilding from scratch. On Snow Leopard (10.6) and later releases, if you are building on a machine with a 64-bit processor (with the exception of the early Intel