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

Linux-ci actions fail for macos-13 gcc builds with linker assertion failed #26

Closed
jhmgoossens opened this issue Mar 12, 2024 · 2 comments

Comments

@jhmgoossens
Copy link

Recent builds of Linux-ci fail for the macos-13 gcc, while the macos-13 clang builds work OK, and all other linux builds (ubuntu) are OK as well.

The logs (below) indicate an assertion failed with the linker "ld: Assertion failed: (resultIndex < sectData.atoms.size())"
This seems to be related to https://forums.developer.apple.com/forums/thread/737707
and Homebrew/homebrew-core#145991
These pages suggest the workaround CXXFLAGS='-Wl,-ld_classic'

I cannot explain why this has started to happen the last few months only. The Xcode 15 version (15.1) included in the macos-13 images was update in DEC 2023 to 15.1 and hasn't changed since, as far as I can tell.

I'm not very familiar with the linux-ci / coinbrew builds.
How can we add the suggested CXXFLAGS?
Shall we add this workaround for the macos-12 CC=gcc linux-ci matrix entry?

The logs seem to suggest this issue starts in CoinUtils, but because the remaining projects are not built, the same could also happen for subsequent projects.

2024-03-04T16:07:09.5826290Z ##################################################
2024-03-04T16:07:09.5827480Z ### Building CoinUtils master 
2024-03-04T16:07:09.5828910Z ##################################################
2024-03-04T16:07:09.5829670Z 
2024-03-04T16:08:59.2882820Z 0  0x10d4c7f43  __assert_rtn + 64
2024-03-04T16:08:59.2901910Z 1  0x10d3c9f43  ld::AtomPlacement::findAtom(unsigned char, unsigned long long, ld::AtomPlacement::AtomLoc const*&, long long&) const + 1411
2024-03-04T16:08:59.2903980Z 2  0x10d3e6431  ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const*) const + 19745
2024-03-04T16:08:59.2905930Z 3  0x10d3f6b71  ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const + 657
2024-03-04T16:08:59.2907480Z 4  0x7ff80a0f2066  _dispatch_client_callout2 + 8
2024-03-04T16:08:59.2908250Z 5  0x7ff80a10518f  _dispatch_apply_invoke_and_wait + 213
2024-03-04T16:08:59.2909040Z 6  0x7ff80a104692  _dispatch_apply_with_attr_f + 1207
2024-03-04T16:08:59.2909740Z 7  0x7ff80a104847  dispatch_apply + 45
2024-03-04T16:08:59.2911830Z 8  0x10d48f972  ld::AtomFileConsolidator::parseFiles(bool) + 370
2024-03-04T16:08:59.2912820Z 9  0x10d416d67  main + 12263
2024-03-04T16:08:59.2913950Z ld: Assertion failed: (resultIndex < sectData.atoms.size()), function findAtom, file Relocations.cpp, line 1336.
2024-03-04T16:08:59.2915190Z collect2: error: ld returned 1 exit status
2024-03-04T16:08:59.2915830Z make[2]: *** [libCoinUtils.la] Error 1
2024-03-04T16:08:59.2917480Z make[1]: *** [all] Error 2
2024-03-04T16:08:59.2926890Z make: *** [all-recursive] Error 1
@jhmgoossens
Copy link
Author

To answer one question:
The proposed flags can be added in the linux-ci.yml as
flags: CC=gcc-13 CXX=g++-13 OSX=13 ADD_CXXFLAGS=-Wl,-ld_classic
See CoinUtils PR218
Now the linker internal error does not occur.

jhmgoossens added a commit to jhmgoossens/Clp that referenced this issue Mar 15, 2024
For linux-ci, update actions and macos-13 linker error
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to jhmgoossens/Clp that referenced this issue Mar 15, 2024
For linux-ci, update actions and macos-13 linker error
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Clp that referenced this issue Mar 15, 2024
For linux-ci, update actions and macos-13 linker error
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Clp that referenced this issue Mar 16, 2024
For linux-ci, update actions and macos-13 linker error
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Cgl that referenced this issue Mar 16, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Cgl that referenced this issue Mar 16, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Cbc that referenced this issue Mar 16, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to coin-or/Cbc that referenced this issue Mar 16, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
@jhmgoossens
Copy link
Author

This issue can be closed. The workaround CC=gcc-13 CXX=g++-13 OSX=13 ADD_CXXFLAGS=-Wl,-ld_classic is in place in all relevant actions. Let's review this in OCT 24 to see if the ADD_CXXFLAGS=-Wl,-ld_classic is still required for macos-13 builds.

jhmgoossens added a commit to jhmgoossens/CHiPPS-ALPS that referenced this issue Mar 17, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to jhmgoossens/CHiPPS-ALPS that referenced this issue Mar 17, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
jhmgoossens added a commit to jhmgoossens/CHiPPS-ALPS that referenced this issue Mar 29, 2024
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
tkralphs pushed a commit to coin-or/CHiPPS-ALPS that referenced this issue Apr 13, 2024
…load artifact [master] (#32)

* Update linux-ci and windows-ci for outdated actions and build issues
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25

* Add macos-13, always upload artifact, no MD in enable-msvc

* Update linux-ci.yml for new tools for macos
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

No branches or pull requests

1 participant