nzbgetcom / nzbget

Efficient usenet downloader
https://nzbget.com
GNU General Public License v2.0
355 stars 16 forks source link

Build fails on macOS ARM64 with Xcode 16 due to `-mfpu=neon` #421

Open cho-m opened 2 weeks ago

cho-m commented 2 weeks ago

NZBGet Version

v24.3-stable

Platform

macOS

Environment

OS version: macOS 15 Sequoia
CPU architecture: arm64 (M1, armv8.4-a)
Toolchain: Xcode 16 (LLVM 17)

Problem or Question

Seen in Homebrew when building binaries for Sequoia. The build failed with:

  clang++: error: unsupported option '-mfpu=' for target 'arm64-apple-darwin24.0.0'

Looks like LLVM Clang 17 changed this from a warning to an error. See https://github.com/llvm/llvm-project/issues/74361

Steps To Reproduce

  1. Build environment needs macOS ARM64 machine with Xcode 16 (or recent LLVM). Probably not possible on Linux since Linux uses aarch64 while macOS uses arm64 so they hit different conditionals: https://github.com/nzbgetcom/nzbget/blob/9a182b966b049f96899c7017e49b2f7f9f3ddcca/lib/sources.cmake#L5-L9
  2. Do a standard build https://github.com/nzbgetcom/nzbget/blob/develop/docs/POSIX.md#4-installation-on-posix

Logs

[ 24%] Building CXX object CMakeFiles/yencode.dir/lib/yencode/NeonDecoder.cpp.o
c++: error: unsupported option '-mfpu=' for target 'arm64-apple-darwin24.1.0'
make[2]: *** [CMakeFiles/yencode.dir/lib/yencode/NeonDecoder.cpp.o] Error 1
make[1]: *** [CMakeFiles/yencode.dir/all] Error 2
make: *** [all] Error 2

Extra information

No response