Corresponding issue in the CPython repository: https://github.com/python/cpython/issues/97524
Hi @ben.boeckel. I agree that this is an undesirably global flag.
But just to clarify: -undefined suppress
is just as global as the current solution -undefined dynamic_lookup
, correct? So this proposed flag is at least not making things worse, and it addresses a new source of problems.
I think it's great to encourage Apple to implement a better mechanism in the future, but a safe solution for currently available tooling is also needed.
Hi -- I suggested these flags as a potential solution. But I have many questions about the implications, and why that specific combination is needed. Please see the discussion here: https://github.com/pybind/pybind11/pull/4301
If somebody on the CMake team has an Apple support ticket to spend, this might be an excellent use for it. It would be ideal to route this to a person at Apple who knows the nitty gritty details of the dynamic linker and can tell us what to do here.