Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS linking -flat_namespace changes user-facing behavior #11937

Closed
Axel-Naumann opened this issue Dec 20, 2022 · 5 comments · Fixed by #12045
Closed

macOS linking -flat_namespace changes user-facing behavior #11937

Axel-Naumann opened this issue Dec 20, 2022 · 5 comments · Fixed by #12045

Comments

@Axel-Naumann
Copy link
Member

From @henryiii :

ROOT can't pass homebrew's audit any more because it is now injecting -flat_namespace. Flat namespaces have been deprecated since the move to Intel. I believe this was done due to -undefined dynamic_lookup producing a warning - Apple plans to add something to replace this in the future, but it's not the old -flat_namespace. See Homebrew/homebrew-core#114543 (comment)
Flat namespace makes major changes to the layout, is more deprecated than dynamic_lookup, and isn't supposed to even work in conda-forge. See also pybind/pybind11#4301 .
-undefined dynamic_lookup does silence the linker on missing symbols, that's what it's for. The problem is that the method it uses is deprecated, producing a warning (and already broken in iOS) -flat_namespace doesn't just silence the linker, it changes the binary layout for every symbol. You could always just silence the warning -Wl,-w or -Wl,-no_fixup_chains; this will eventually break, but is less deprecated than -flat_namespace.
Apple's official statement is basically "live with the warning for now, we'll find a way to not break all CPython extensions eventually" from what I gather.

@Axel-Naumann Axel-Naumann added this to the 6.28/00 milestone Dec 20, 2022
@Axel-Naumann Axel-Naumann self-assigned this Dec 20, 2022
@Axel-Naumann Axel-Naumann modified the milestones: 6.28/00, 6.26/12 Dec 20, 2022
Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Jan 17, 2023
…ply suppress:"

See root-project#11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.
Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Jan 17, 2023
See root-project#11937
for why that is currently needed. `flat_namespace` is not a solution.
Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Jan 18, 2023
See root-project#11937
for why that is currently needed. `flat_namespace` is not a solution.
Axel-Naumann added a commit that referenced this issue Jan 19, 2023
…ply suppress:"

See #11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.
Axel-Naumann added a commit that referenced this issue Jan 19, 2023
See #11937
for why that is currently needed. `flat_namespace` is not a solution.
FonsRademakers pushed a commit to root-project/cling that referenced this issue Jan 19, 2023
…ply suppress:"

See root-project/root#11937
for why `-flat_namespace` is bad.

This reverts commit a05d4beded1481a86a65e450826352eb528b03e7.
FonsRademakers pushed a commit to root-project/cling that referenced this issue Jan 19, 2023
See root-project/root#11937
for why that is currently needed. `flat_namespace` is not a solution.
@github-actions
Copy link

Hi @Axel-Naumann,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Jan 23, 2023
…ply suppress:"

See root-project#11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.

(cherry picked from commit 0e03b6a)
Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Jan 23, 2023
See root-project#11937
for why that is currently needed. `flat_namespace` is not a solution.

(cherry picked from commit 5ad4ab9)
@github-actions
Copy link

Hi @Axel-Naumann,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

2 similar comments
@github-actions
Copy link

Hi @Axel-Naumann,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@github-actions
Copy link

Hi @Axel-Naumann,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@Axel-Naumann Axel-Naumann reopened this Jan 26, 2023
Axel-Naumann added a commit that referenced this issue Jan 27, 2023
…ply suppress:"

See #11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.

(cherry picked from commit 0e03b6a)
Axel-Naumann added a commit that referenced this issue Jan 27, 2023
See #11937
for why that is currently needed. `flat_namespace` is not a solution.

(cherry picked from commit 5ad4ab9)
@henryiii
Copy link
Contributor

Apple's solution was to default "no-fixup-chains" to on when undefined dynamic_lookup is passed; you can enable it for older versions to hide the warning as well, see pybind/pybind11#4301 (comment) and the linked CPython issue. Not sure yet if it causes issues for older versions that don't produce the warning in the first place.

omazapa pushed a commit to omazapa/root that referenced this issue Apr 13, 2023
…ply suppress:"

See root-project#11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.
omazapa pushed a commit to omazapa/root that referenced this issue Apr 13, 2023
See root-project#11937
for why that is currently needed. `flat_namespace` is not a solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment