6

I have updated macos to Mojave and after updating the command tools and when I run my c++ program I am getting the following error

dyld: __dyld section not supported in /Users/rameshkolluru/Dropbox/1D_Multiphase_Euler_Equations_FVM/./1D_Multiphase_Euler_solver Abort trap: 6

Any help is appreciated

Ramesh K
  • 61
  • 1
  • 2

1 Answers1

13

Are you compiling with the -pg option to enable profiling? If yes, try to remove that flag.

Using -pg Apple LLVM version 10.0.0 (clang-1000.11.45.2) still seems to add a __DATA,__dyld section to your executable, which dyld in Mojave does not seem to support/accept any more.

simonfi
  • 293
  • 4
  • 12
  • 1
    Thank you so much. That solved my issue! Do you have any recommendations on how to use the `-pg` flag in Mojave – Julian Nov 02 '18 at 20:26
  • Unfortunately I haven't found (or searched for to be honest) a solution to this problem, except that I've handed in a bug report to Apple (rdar://45389681) but no reply from them on this issue yet. – simonfi Nov 04 '18 at 17:16
  • 2
    @julian59189 It seems -pg is officially "unsupported" by LLVM, but luckily there's documentation on how to do profiling: https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation – simonfi Dec 03 '18 at 17:01