ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] error during DMG creation under macOS 10.13.2

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 21 Feb 2018 10:25:52 -0800
On Feb 20, 2018, at 4:23 PM, Peter Meiser <meiser@xxxxxxx> wrote:

> I finally found the root cause. It's not the error message which was shown. This totally misleaded me to look for the real root cause.
> 
> The problem was the otool command which checks for the file type.
> 
> --- a/packaging/macosx/osx-app.sh
> +++ b/packaging/macosx/osx-app.sh
> @@ -421,7 +421,7 @@ rpathify_file () {
> 	#
> 	# OK, what type of file is this?
> 	#
> -	filetype=$( otool -hv "$1" | sed -n '4p' | awk '{print $5}' ; exit ${PIPESTATUS[0]} )
> +	filetype=$( otool -hv "$1" | grep 'MH_MAGIC_64' | awk '{print $5}' ; exit ${PIPESTATUS[0]} )
> 	if [ $? -ne 0 ] ; then
> 		echo "Unable to rpathify $1 in $( pwd ): file type failed."
> 		exit 1

Checked in, but using MH_MAGIC rather than MH_MAGIC_64.