Thank you for answering.

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. The latest Xcode version 
available for 10.11.6 includes LLVM 7.3.0, which cannot build gdb. It fails 
with the error in the previous email. 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.

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 know if there is many people using macos 10.11.6 these days, 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.

Hope it is clear now :)

Thank you,
Juan.

> On 22 Apr 2019, at 04:16, Chris Johns <chr...@rtems.org> wrote:
> 
> On 20/4/19 3:58 am, Juan Rafael García Blanco wrote:
>> Hi,
>> 
>> 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.
> 
> I have just built am ARM tool chain for RTEMS 5 using the RSB master on the
> latest MacOS (10.14.4 (18E226)) with the latest Xcode (Version 10.2.1
> (10E1001)). I did not see an error. I am currently building a sparc tool chain
> and gdb has built without error.
> 
> My machine is only MacOS and Xcode.
> 
>> The selected compiler is /usr/bin/cc (BTW, I have not found a way to tell 
>> RSB to use a different host compiler), 
> 
> You can customise what happens for Macos here:
> 
> https://git.rtems.org/rtems-source-builder/tree/source-builder/sb/darwin.py
> 
> I am assuming you have some Macport packages installed because you have
> referenced a Macport ticket. Is this true?
> 
>> which in my case is:
>> 
>> Apple LLVM version 8.0.0 (clang-800.0.42.1)
>> Target: x86_64-apple-darwin15.6.0
>> 
>> I think this same problem has also been found in the macports project [0].
>> 
>> 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. 
> 
> This is what I have.
> 
>> They might have been installed as part of the so-called Xcode’s command line 
>> tools… 
> 
> They should be.
> 
>> 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 have:
> 
> $ which cc
> /usr/bin/cc
> $ cc --version
> Apple LLVM version 10.0.1 (clang-1001.0.46.4)
> Target: x86_64-apple-darwin18.5.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> $ ls -las /usr/bin/cc
> 0 lrwxr-xr-x  1 root  wheel  5 27 Sep  2018 /usr/bin/cc -> clang
> mohua:rtems chris$ ls -las /usr/bin/gcc
> 16 -rwxr-xr-x  1 root  wheel  18288 21 Mar 17:08 /usr/bin/gcc
> $ /usr/bin/gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
> Apple LLVM version 10.0.1 (clang-1001.0.46.4)
> Target: x86_64-apple-darwin18.5.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> These are the Xcode tools.
> 
>> 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.
> 
> If there is a Macports package installed a library maybe changing how gdb is
> built and as a result it exposes some code that needs to be fixed?
> 
> My configure command line for gdb is:
> 
> ../gdb-8.2.1/configure --build=x86_64-apple-darwin18.5.0
> --host=x86_64-apple-darwin18.5.0 --target=arm-rtems5 --verbose --disable-nls
> --disable-gas --disable-binutils --disable-ld --disable-gold --disable-gprof
> --without-included-gettext --disable-win32-registry --disable-werror
> --enable-sim --without-zlib --with-expat --with-guile=no
> --with-python=/usr/bin/python --prefix=/opt/work/rtems/5
> --bindir=/opt/work/rtems/5/bin --exec-prefix=/opt/work/rtems/5
> --includedir=/opt/work/rtems/5/include --libdir=/opt/work/rtems/5/lib
> --mandir=/opt/work/rtems/5/share/man --infodir=/opt/work/rtems/5/share/info
> 
> I have uploaded the build output...
> 
> https://ftp.rtems.org/pub/rtems/people/chrisj/source-builder/5-arm.txt
> 
> Maybe you can spot something in the output of gdb's configure stage that is
> different?
> 
> Chris
> 
>> [0] https://trac.macports.org/ticket/57877#no2

_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to