roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Build failure on aarch64 with libunwind due to old C++ standard

Open jpalus opened this issue 2 years ago • 1 comments

Building roc-toolkit on aarch64 with libunwind triggers following error:

In file included from /usr/include/libunwind.h:7,
                 from src/modules/roc_core/target_libunwind/roc_core/backtrace.cpp:10:
/usr/include/libunwind-aarch64.h:198:17: error: expected identifier before numeric constant
  198 |         alignas(16) uint8_t __reserved[(66 * 8)];
      |                 ^~
/usr/include/libunwind-aarch64.h:198:17: error: expected ',' or '...' before numeric constant
/usr/include/libunwind-aarch64.h:198:19: error: expected ';' at end of member declaration
  198 |         alignas(16) uint8_t __reserved[(66 * 8)];
      |                   ^
      |                    ;

That's because libunwindon aarch64 uses alignas available since C++11 while roc-toolkit forces C++98: https://github.com/roc-streaming/roc-toolkit/blob/c89687330bfce6f4dce79826f7a235b581f2b49d/SConstruct#L1074

jpalus avatar Apr 28 '22 10:04 jpalus

Thanks for report! I've pushed a fix to develop branch. For now I still would like to stay on std 98 so I implemented a workaround for libunwind instead of changing std.

gavv avatar Jun 26 '22 11:06 gavv

The fix is now merged into master and 0.2.0

gavv avatar Dec 22 '22 15:12 gavv