Is your feature request related to a problem? Please describe.
Apple has an issue with the linker/loader (ld) that is shipped with apple-clang%15.x compilers of which can be worked around by requesting the older linker/loader functionality via the -Wl,-ld_classic compiler option. Apple is aware of this issue and has an internal ticket: FB13208302: "Building ffmpeg 6.0 with shared libraries broken with Xcode 15's default linker"
For some examples, see:
spack/spack#40187 (ffmpeg build)
spack/spack#42264 (hdf5 build)
This workaround also fixes the issue with apple-clang%15.x reported in #829 which reported errors during the configure step with the openmpi build.
There seems to be number of packages impacted by the apple-clang%15.x linker/loader issue: hdf5, openmpi, ffmpeg so far.
Option 2 has the advantage that we are only fixing known problems, and if it turns out to be a handful of packages it's really not that difficult to remove later on.
Describe the solution you'd like
I thing there are two options:
- Globally set
LDFLAGS="-Wl,-ld_classic" when compiling with apple-clang%15.x to address anticipated issues
- Set
LDFLAGS="-Wl,-ld_classic" on a case-by-case basis as issues are found
Option 1 has the advantage that it is easy to remove the workaround once apple has fixed the issue. But has the disadvantage that we are changing build process for a lot of packages that are not broken.
Option 2 has the advantage that we are only fixing the packages that are known to be broken, and if there are not too many of those it will be easy to remove the work around when apple fixes their linker/loader issue.
I'm leaning toward option 2 now. I'm a little bit concerned about the global setting in option 1.
What does everyone think?
Additional context
Is your feature request related to a problem? Please describe.
Apple has an issue with the linker/loader (ld) that is shipped with apple-clang%15.x compilers of which can be worked around by requesting the older linker/loader functionality via the
-Wl,-ld_classiccompiler option. Apple is aware of this issue and has an internal ticket: FB13208302: "Building ffmpeg 6.0 with shared libraries broken with Xcode 15's default linker"For some examples, see:
spack/spack#40187 (ffmpeg build)
spack/spack#42264 (hdf5 build)
This workaround also fixes the issue with apple-clang%15.x reported in #829 which reported errors during the configure step with the openmpi build.
There seems to be number of packages impacted by the apple-clang%15.x linker/loader issue: hdf5, openmpi, ffmpeg so far.
Option 2 has the advantage that we are only fixing known problems, and if it turns out to be a handful of packages it's really not that difficult to remove later on.
Describe the solution you'd like
I thing there are two options:
LDFLAGS="-Wl,-ld_classic"when compiling with apple-clang%15.x to address anticipated issuesLDFLAGS="-Wl,-ld_classic"on a case-by-case basis as issues are foundOption 1 has the advantage that it is easy to remove the workaround once apple has fixed the issue. But has the disadvantage that we are changing build process for a lot of packages that are not broken.
Option 2 has the advantage that we are only fixing the packages that are known to be broken, and if there are not too many of those it will be easy to remove the work around when apple fixes their linker/loader issue.
I'm leaning toward option 2 now. I'm a little bit concerned about the global setting in option 1.
What does everyone think?
Additional context