Skip to content

Conversation

@Axel-Naumann
Copy link
Member

@Axel-Naumann Axel-Naumann commented Jan 17, 2023

See #11937 for why -flat_namespace is bad.

This reverts commit a05d4be.

This PR fixes #11937

…ply suppress:"

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

This reverts commit a05d4be.
@Axel-Naumann Axel-Naumann added this to the 6.28/00 milestone Jan 17, 2023
@Axel-Naumann Axel-Naumann requested a review from bellenot January 17, 2023 16:38
@Axel-Naumann Axel-Naumann requested a review from pcanal as a code owner January 17, 2023 16:38
@Axel-Naumann Axel-Naumann self-assigned this Jan 17, 2023
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-17T16:45:33.503Z] ld: warning: -undefined dynamic_lookup may not work with chained fixups
  • [2023-01-17T16:45:34.292Z] ld: warning: -undefined dynamic_lookup may not work with chained fixups
  • [2023-01-17T16:45:41.485Z] ld: warning: -undefined dynamic_lookup may not work with chained fixups
  • [2023-01-17T16:45:49.589Z] ld: warning: -undefined dynamic_lookup may not work with chained fixups

@pcanal
Copy link
Member

pcanal commented Jan 17, 2023

Additional mention of the original issue (chained lookups): https://developer.apple.com/forums/thread/719961, python/cpython#97524
and https://openradar.appspot.com/radar?id=5536824084660224.

Instead of -Wl,-w (which suppress all warnings), an undocumented options seems to be -Xlinker -no_fixup_chains (humm I guess actually maybe -Wl,-no_fixup_chains)

Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a few more -Wl,-w it should work (or maybe we could disable the chained fixups)

@Axel-Naumann
Copy link
Member Author

Instead of -Wl,-w (which suppress all warnings), an undocumented options seems to be -Xlinker -no_fixup_chains (humm I guess actually maybe -Wl,-no_fixup_chains)

I am afraid that older linkers will not know -no_fixup_chains as that seems to be a new concern. So -w it is.

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

1 similar comment
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

See root-project#11937
for why that is currently needed. `flat_namespace` is not a solution.
@Axel-Naumann Axel-Naumann force-pushed the macos-ld-no-flat-namespace branch from d4d5827 to fccb8de Compare January 18, 2023 15:03
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-01-18T15:03:48.332Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  • [2023-01-18T15:03:48.588Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1210 (message):

@pcanal
Copy link
Member

pcanal commented Jan 18, 2023

I am afraid that older linkers will not know -no_fixup_chains as that seems to be a new concern.

Did you try on the oldest (not that old :)) XCode we support?

@Axel-Naumann
Copy link
Member Author

My ld:

$ ld -no_fixup_chains /dev/null -o /dev/null
ld: warning: platform not specified
ld: warning: -arch not specified
ld: warning: No platform min-version specified on command line
ld: file too small (length=0) file '/dev/null' for architecture unknown

On 10.15 (i.e. just dead):

$ ld -no_fixup_chains /dev/null -o /dev/null
ld: unknown option: -no_fixup_chains

q.e.d. :-)

@phsft-bot
Copy link

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

@pcanal
Copy link
Member

pcanal commented Jan 18, 2023

On 10.15 (i.e. just dead):

If Apple is not supporting it (since 4 months ago), do we still need to support it? (Labs/IT should already no longer allow them on their network).

@Axel-Naumann
Copy link
Member Author

macOS 11:

% ld -no_fixup_chains /dev/null -o /dev/null
ld: unknown option: -no_fixup_chains

@Axel-Naumann
Copy link
Member Author

The Windows "failure" seems spurious:

18:21:16  Build failed because:
[Pipeline] echo
18:21:16  hudson.AbortException: script returned exit code -1

even though all tests have passed.

@Axel-Naumann
Copy link
Member Author

@phsft-bot build just on ROOT-performance-centos8-multicore/cxx17

@phsft-bot
Copy link

Starting build on ROOT-performance-centos8-multicore/cxx17
How to customize builds

@Axel-Naumann Axel-Naumann merged commit 5ad4ab9 into root-project:master Jan 19, 2023
@Axel-Naumann Axel-Naumann deleted the macos-ld-no-flat-namespace branch January 19, 2023 11:52
@Axel-Naumann
Copy link
Member Author

v6-28: #12100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS linking -flat_namespace changes user-facing behavior

3 participants