PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

fix compile error for macOS 12.6, Xcode 14, brew gcc (g++-12)

Open rheiland opened this issue 3 years ago • 0 comments

Users have reported getting a strange compilation error after they updated their macOS to 12.6. Running make would end in:

ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
collect2: error: ld returned 1 exit status

and this was using g++-12 from brew install gcc. The fix that seems to work is the following:

  • download https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_13.4_Release_Candidate/Command_Line_Tools_for_Xcode_13.4_Release_Candidate.dmg (it should be about 689 MB). This may require that you create a (free) Apple developer's account if you don't already have one. If you create a developer's account (and are logged in to it) and are still unable to access the previous link, try going to this link https://developer.apple.com/download/all/?q=xcode and then scroll down to "Command Line Tools for Xcode 13.4 Release Candidate", then click the "View Details" and then click the exposed link to download the .dmg (ugh).
  • open/install that .dmg (click through all the prompts)
  • try to re-run your PhysiCell make from your shell terminal

If you still experience an error compiling, reply to this issue or report it on the PhysiCell community workspace #install-help slack channel.

rheiland avatar Sep 26 '22 21:09 rheiland