gdb-8.2.1 build failed on macos 10.11.6

Juan Rafael García Blanco juanrgar at gmail.com
Fri Jun 14 21:44:12 UTC 2019


Hi,

Please find below the error I get:

  CXX    tui/tui-interp.o
../../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.
make[2]: *** [tui/tui-hooks.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-gdb] Error 2
make: *** [all] Error 2
shell cmd failed: /bin/sh -ex  /Users/juanrgar/Projects/rtems/src/rsb/rtems/build/sparc-rtems5-gdb-8.2.1-x86_64-apple-darwin15.6.0-1/do-build
error: building sparc-rtems5-gdb-8.2.1-x86_64-apple-darwin15.6.0-1
  See error report: rsb-report-sparc-rtems5-gdb-8.2.1-x86_64-apple-darwin15.6.0-1.txt
Build Set: Time 0:06:33.478697


My toolset is as follows:

Nebuchadnezzar:rtems juanrgar$ /usr/bin/gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


I needed to install the following compiler to build gdb and the rest of tools:

Nebuchadnezzar:rtems juanrgar$ clang -v
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-8.0/bin

I think I have the latest Xcode version installed and, thus, the latest gcc supported by Apple on my system, i.e., 10.11.6.

Best regards,
Juan.

> On 09 Jun 2019, at 01:26, Chris Johns <chrisj at rtems.org> wrote:
> 
> On 9/6/19 2:11 am, Juan Rafael García Blanco wrote:
>> Thank you for answering.
> 
> My pleasure.
> 
>> Sorry, I think I did not make myself clear. I mean that it is not possible to build the RTEMS 5 tools for SPARC in macos 10.11.6.
> 
> My understanding is you are not able to build a SPARC gdb on MacOS. We need to
> figure out why. I do not see this error.
> 
>> The latest Xcode version available for 10.11.6 includes LLVM 7.3.0, which cannot build gdb. 
> 
> The Macbook Pro I am writing this email on and use with RTEMS has:
> 
> huia:rtems chris$ uname -a
> Darwin huia 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019;
> root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
> huia:rtems chris$ cc -v
> Apple LLVM version 10.0.1 (clang-1001.0.46.4)
> Target: x86_64-apple-darwin18.6.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
>> It fails with the error in the previous email.
> 
> I do not see the error. I have uploaded the full build log to:
> 
> https://ftp.rtems.org/pub/rtems/people/chrisj/rsb/builds/arm-powerpc-sparc.txt.xz
> 
> Please download it and take a close look at the file you are seeing fail to see
> what the compiler command line is and how it compares to yours.
> 
>> For successfully building the toolset it is required to manually modify darwin.py, I think, because I did not find any other way to override the path to the C/C++ compiler.
> 
> What compiler have you installed?
> Where did the package come from?
> 
> It is important I understand if there are any other packages installed. These
> packages can effect things.
> 
>> Thus, at least for macos 10.11.6 with latest Xcode available for that version, i.e., LLVM 7.3.0, it would be necessary to install another C/C++ compiler to properly build gdb.
> 
> I do not agree this is the case. I have a successfully built tool chain and I am
> using it on a regular basis.
> 
>> I do not know if there is many people using macos 10.11.6 these days,
> 
> I am and have been since 2011. I have a Mac Mini which is used to build the
> tools on a regular based to check we are ok. I have a MacBook I am using on a
> regular based to work on the Beaglebone Black BSP. I have been building and
> working through testing of that BSP. I have raised a number of bug reports with
> Apple over the years and they have been responsive fixing them.
> 
> I do not install and any packages from Macport and Homebrew.
> 
>> so maybe it is just enough to have these messages posted in the mailing list so that someone looking for help with this error can find some related info. Or maybe it would be a good idea to place this info in a known issues wiki or something.
> 
> Please do not do this. Your build issue has not yet been resolved.
>> Hope it is clear now :)
> 
> No it is not clear. :)
> 
> If you could please let me know what packages from Macports (assuming you have)
> that are installed, it would help. I would like to understand what is happening
> and to help fix your build issue.
> 
> There are packages that can effect how gdb is built. This can happen if the
> configure process in gdb sees a library it may decide to use and termcap and
> related libs can cause issues. These interactions can be tricky and what happens
> may not be obvious.
> 
> Chris



More information about the users mailing list