Skip to content

Multiple commands produce error in Xcode on macOS

Summary

Building Wireshark in Xcode on macOS fails

Steps to reproduce

  1. Generate an Xcode project in the wireshark/build directory: CMAKE_PREFIX_PATH=/opt/homebrew/opt/qt cmake -G Xcode -T buildsystem=1 ..
  2. Double click wireshark.xcodeproj
  3. Choose to create schemes manually
  4. Create a scheme for the ALL_BUILD target
  5. Edit the scheme, go to the run configuration and select Wireshark.app as executable
  6. Build the project

What is the current bug behavior?

CMake generated Xcode project fails to build

What is the expected correct behavior?

The build process runs through to completion

Sample capture file

N/A

Relevant logs and/or screenshots

note: Building targets in dependency order
error: Multiple commands produce
'/Users/user/wireshark/build/run/Debug/Wireshark.app/Contents/MacOS'
    note: CreateBuildDirectory
/Users/user/wireshark/build/run/Debug/Wireshark.app/Contents/MacOS
    note: Target 'wireshark' (project 'wireshark') has create
directory command with output
'/Users/user/wireshark/build/run/Debug/Wireshark.app/Contents/MacOS'

Build information

% git remote -v
origin	https://gitlab.com/wireshark/wireshark.git (fetch)
origin	https://gitlab.com/wireshark/wireshark.git (push)

% git rev-parse --short HEAD
e51fea444a

% sw_vers
ProductName: macOS
ProductVersion: 13.2.1
BuildVersion: 22D68

% xcodebuild -version
Xcode 14.2
Build version 14C18

% cmake --version
cmake version 3.25.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Edited by Alexander Kapshuk
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information