summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Aumüller <aumuell@reserv.at>2023-09-27 16:41:32 +0200
committerGitHub <noreply@github.com>2023-09-27 16:41:32 +0200
commitbb66d15d08513e50c6d66d6c6d78854ca0348ba1 (patch)
tree1f8a5c338aa913b4ef2e33cf610adcaf120b86ad
parent1cd2d07f0b9ad9d96e75d6c71c7bda9514cfa754 (diff)
downloadspack-bb66d15d08513e50c6d66d6c6d78854ca0348ba1.tar.gz
spack-bb66d15d08513e50c6d66d6c6d78854ca0348ba1.tar.bz2
spack-bb66d15d08513e50c6d66d6c6d78854ca0348ba1.tar.xz
spack-bb66d15d08513e50c6d66d6c6d78854ca0348ba1.zip
ffmpeg: fix build with XCode 15 (#40187)
As reported in #40159, a shared library build of ffmpeg 6.0 fails with the linker that was added with XCode 15: ld: building exports trie: duplicate symbol '_av_ac3_parse_header' clang: error: linker command failed with exit code 1 (use -v to see invocation) Forcing the old linker with -Wl,-ld_classic works around this.
-rw-r--r--var/spack/repos/builtin/packages/ffmpeg/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py
index cfc1db119c..ff597653ff 100644
--- a/var/spack/repos/builtin/packages/ffmpeg/package.py
+++ b/var/spack/repos/builtin/packages/ffmpeg/package.py
@@ -128,6 +128,10 @@ class Ffmpeg(AutotoolsPackage):
headers.directories = [self.prefix.include]
return headers
+ @when("@:6.0 %apple-clang@15:")
+ def setup_build_environment(self, env):
+ env.append_flags("LDFLAGS", "-Wl,-ld_classic")
+
def enable_or_disable_meta(self, variant, options):
switch = "enable" if "+{0}".format(variant) in self.spec else "disable"
return ["--{0}-{1}".format(switch, option) for option in options]