Wireshark build on MacOS fails.
Hi everyone,
I am trying to build Wireshark on a Mac and have successfully installed Qt 6.5.3, run the tools/macos-setup-brew.sh script and run the cmake -G Ninja .. in the build directory which is a subdirectory of the source directory. When I try to run Ninja to build Wireshark, I get the following error message and the build then stops:
[2516/2765] Building CXX object ui/qt/CMakeFiles/qtui.dir/capture_comment_dialog.cpp.o FAILED: ui/qt/CMakeFiles/qtui.dir/capture_comment_dialog.cpp.o /Library/Developer/CommandLineTools/usr/bin/c++ -DCARES_NO_DEPRECATED -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -I/Users/usr/Downloads/wireshark/build/ui/qt/qtui_autogen/include -I/Users/usr/Downloads/wireshark/build -I/Users/usr/Downloads/wireshark -I/Users/usr/Downloads/wireshark/include -isystem /usr/local/opt/gettext/include -isystem /usr/local/Cellar/glib/2.80.3/include/glib-2.0 -isystem /usr/local/Cellar/glib/2.80.3/lib/glib-2.0/include -isystem /usr/local/include -isystem /usr/local/Cellar/speexdsp/1.2.1/include -isystem /Users/usr/Downloads/wireshark/build/ui/qt -isystem /Users/usr/Downloads/wireshark/ui/qt -isystem /Users/usr/Qt/6.5.3/macos/lib/QtWidgets.framework/Headers -iframework /Users/usr/Qt/6.5.3/macos/lib -isystem /Users/usr/Qt/6.5.3/macos/lib/QtCore.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/mkspecs/macx-clang -isystem /Users/usr/Qt/6.5.3/macos/include -isystem /Users/usr/Qt/6.5.3/macos/lib/QtGui.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtCore5Compat.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtConcurrent.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtPrintSupport.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtMultimedia.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtNetwork.framework/Headers -isystem /Users/usr/Qt/6.5.3/macos/lib/QtDBus.framework/Headers -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -Wvla -Wattributes -Wpragmas -Wheader-guard -Wcomma -Wshorten-64-to-32 -Wredundant-decls -Wunreachable-code -Wdocumentation -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -fcolor-diagnostics -Wextra-semi -fmacro-prefix-map="/Users/usr/Downloads/wireshark/"= -fmacro-prefix-map="/Users/usr/Downloads/wireshark/build/"= -fmacro-prefix-map="../"= -O2 -g -DNDEBUG -std=c++17 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk -fPIC -Werror -MD -MT ui/qt/CMakeFiles/qtui.dir/capture_comment_dialog.cpp.o -MF ui/qt/CMakeFiles/qtui.dir/capture_comment_dialog.cpp.o.d -o ui/qt/CMakeFiles/qtui.dir/capture_comment_dialog.cpp.o -c /Users/usr/Downloads/wireshark/ui/qt/capture_comment_dialog.cpp In file included from /Users/usr/Downloads/wireshark/ui/qt/capture_comment_dialog.cpp:10: In file included from /Users/usr/Downloads/wireshark/ui/qt/capture_comment_dialog.h:13: In file included from /Users/usr/Downloads/wireshark/ui/qt/wireshark_dialog.h:31: In file included from /Users/usr/Downloads/wireshark/ui/qt/capture_file.h:13: In file included from /Users/usr/Qt/6.5.3/macos/lib/QtCore.framework/Headers/QObject:1: /Users/usr/Qt/6.5.3/macos/lib/QtCore.framework/Headers/qobject.h:225:43: error: no template named 'QSlotObject' in ...
2.1.1. Build environment setup
You didn't mention the extra Qt piece in your setup steps.
Thank you for your response.
When installing Qt I installed Qt 6.5.3 for macOS, Ot 5 Compatibility Module and Qt Debug Information Files under the Qt dropdown as well as Qt Multimedia under the Additional Libraries dropdown. Is there anything else I should have possibly installed? I also set the Qt installation directory in the environment using:
WIRESHARK_QT6_PREFIX_PATH=~/Qt/6.5.3/macos
export WIRESHARK_QT6_PREFIX_PATH
Is there anything I am missing on that front?
I'm not a Mac developer and don't want to steer you down bad paths. Will have to wait for a Mac person to come along.