recently we started getting this warning on our OS X build.
ld: warning:
could not create compact unwind for __Z10createMenuv: stack subl instruction is too different from dwarf stack size
ld: warning:
could not create compact unwind for __Z10del_modulejb: stack subl instruction is too different from dwarf stack size
could not create compact unwind for __Z14menu_patchbytev: stack subl instruction is too different from dwarf stack size
I could find some discussion of this in the Chromium bug tracker but the suggested "fix" is to disable compact unwind generation. I would like to understand why this warning happens and if it's an issue in our code or in the toolchain.
Our toolchain is from Xcode 7.3.1:
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
In doing some research, the best answer I see that there is an issue with the toolchain and not your code specifically.
It is building as 32 bit instead of 64 bit. And to solve this you need to do one of two things:
That is why some recommend unwinding but I don't see any option to suppress the warning about compact unwind. There seems to be only an option to enable the warning -warn_compact_unwind
.
What you could do is to suppress all linker warnings passing -Wl,-w option to compiler.
Another temporary solution you could try is passing -Wl,-no_compact_unwind
to clang. It should instruct the linker not to generate compact unwind information.
Lastly, try compiling for 64 bit architecture. To do so you specify the architecture with -arch
compiler option – in your case -arch x86_64
.
.
I see most users pointing to Xcode 7 and at times Xcode 6 being the problem builds.
In addition, there is one other method to fix this.
In project Build Settings find Build Options and set No in option Enable Bitcode. I hope that it help for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With