Opened 3 months ago
Last modified 3 months ago
#6902 new defect
libvorbis build error on macOS 14 / Xcode 15
Reported by: | Thomas Nyman | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | Build & Packages | Keywords: | |
Cc: | Patch: |
Description (last modified by )
libvorbis-1.3.7 fails to build on macOS 14 due to changes to ld64
linker in Xcode 15.
Tested on:
- macOS 14.3.1 23D60 arm64
- Xcode 15.2 15C500b
./libraries/osx/build-osx-libs
fails with:
ld: unknown options: -force_cpusubtype_ALL clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [test_sharedbook] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ERROR: libvorbis build failed
This is caused by the -force_cpusubtype_ALL
flag being passed by the libvorbis configure
script unconditionally for macOS builds (https://gitlab.xiph.org/xiph/vorbis/-/blob/master/configure.ac#L205) even though the flag is only valid for PowerPC. Prior to Xcode 15 the ld64
linker silently ignored the flag for x86_64 and arm64 builds, but since Xcode 15 the linker now issues the above error.
There is an upstream bug report files with no resolution (https://gitlab.xiph.org/xiph/vorbis/-/issues/2348) but since PowerPC doesn't appear to be a relevant target a possible resolution is to simply patch away the offending flag from the libvorbis configure
script (see attached patch-vorbis-flags.diff
).
The same approach is taken by macports when building the libvorbis port on affected architectures: https://github.com/macports/macports-ports/commit/e63376b0845acdc06efbfb5fbbb8bdd6359e75b4
Attachments (1)
Change History (3)
by , 3 months ago
Attachment: | patch-vorbis-flags.diff added |
---|
comment:1 by , 3 months ago
Description: | modified (diff) |
---|
comment:2 by , 3 months ago
Description: | modified (diff) |
---|
Patch to build-osx-libs.sh that removes the offending flags from libvorbis-1.3.7 configure