gdb-8.2.1 build failed on macos 10.11.6
Juan Rafael García Blanco
juanrgar at gmail.com
Fri Apr 19 17:58:23 UTC 2019
I have found an error while trying to build the RTEMS 5 toolset with RSB. The build process stops during compilation of gdb with the following error message:
../../gdb-8.2.1/gdb/tui/tui-hooks.c:208:36: error: default initialization of an object of const type 'const gdb::observers::token' without a user-provided default constructor
static const gdb::observers::token tui_observers_token;
1 error generated.
The selected compiler is /usr/bin/cc (BTW, I have not found a way to tell RSB to use a different host compiler), which in my case is:
Apple LLVM version 8.0.0 (clang-800.0.42.1)
I think this same problem has also been found in the macports project .
I see the __cc variable is overridden for darwin hosts version 13 and above. I’m running darwin 15.6.0, which apparently supports Xcode 8.2.1. This version includes both /usr/bin/cc, which is a link to /usr/bin/clang; and /usr/bin/gcc. They might have been installed as part of the so-called Xcode’s command line tools… In any case, both cc and gcc seem to be based on LLVM 8; thus, I think we can say there is no compiler suitable for building gdb in Xcode 8.2.1, which is the latest version available for darwin 15.6.0.
I’m willing to help fixing this, but I do not know what would be the proper way to handle this. I guess RSB should warn the user and require GCC or another version of LLVM.
Thank you very much,
More information about the users