Menu

#2882 build error on Mac OS 10.14.2

closed-fixed
nobody
None
Build
5
2019-03-21
2019-03-15
No

Failed to build revision 11088 on Mac OS 10.14.2. For more information, please check the attachment.

1 Attachments

Discussion

  • Philipp Klaus Krause

    Which compiler and version did you use to compile SDCC (what is the output of g++ --version on your system)?

    Philipp

     
  • 笑行天下

    笑行天下 - 2019-03-15

    “gcc --version” shows:

    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
    Apple LLVM version 7.3.0 (clang-703.0.31)
    Target: x86_64-apple-darwin18.2.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    

    “g++ --version” shows:

    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
    Apple LLVM version 7.3.0 (clang-703.0.31)
    Target: x86_64-apple-darwin18.2.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
     
  • Philipp Klaus Krause

    SDCC requires a compiler that supports at least C++11 (see https://sourceforge.net/p/sdcc/wiki/Language%20dialects%20used%20in%20SDCC/ for details). Your compüiler seems to be clang 7 (which normally supports C++11), but somehow configured into C++98-mode.

    I can reproduce the problem on my (Debian GNU/Linux) system by trying to compile that file using clang++7 with option --std=c++98.

    Maybe this workaround could work for you: Explicitly set the standard for the compiler during configure, e.g. using ./configure CXX="g++ --std=c++11". But I'm not familiar with MacOS.

    Philipp

     
  • Erik Petrich

    Erik Petrich - 2019-03-16

    [r11104] probably fixes this problem. configure now automatically tries to find the needed compiler flags to select the C++11 dialect if it is not the default.

     
  • Daniel Drotos

    Daniel Drotos - 2019-03-16

    Dear Erik,

    Please do not do this! SDCC needs C11 compiler, but ucsim does not! It is available as a separate package, can be downloaded from my site and there are users who get it from there. It can be compiled with as old compiler as gcc-2.95, and I would not like to break it.

    Please do not extend C11 restriction to all parts of SDCC.

    Daniel

     
    • Philipp Klaus Krause

      ucsim currently needs C++11. The bug report is about it failing to build with a compiler not supporting C++11, so Erik just made the build system choose a suitable compiler.

      Nicolas contributed the part of ucsim that needs C++11. Should we ask him to rewrite using ancient C++98?

      Philipp

       
  • Daniel Drotos

    Daniel Drotos - 2019-03-16

    Dear Philipp,

    Thank you making this clear. I have not tested pdk simulator yet...

    Nicolas contributed the part of ucsim that needs C++11. Should we ask him to rewrite using ancient C++98?

    It would be nice, but it has very little importance. If he can not, I will do it later. Currently I'm working on features requested by other users.

    Daniel

     
  • Erik Petrich

    Erik Petrich - 2019-03-17

    Daniel,
    I have reverted my changes and will try to find a solution outside of the sim/ucsim subtree.

    Philipp,
    The cf-x86-macosx build machine uses Apple LLVM version 9.0.0 (clang-900.0.39.2), which does support C++11, but also behaves similarly to the reporter's 7.3.0 and does not default to it.

     
  • Daniel Drotos

    Daniel Drotos - 2019-03-18

    Dear Erik,

    The new pdk simulator introduced this C++11 dependency to the ucsim, so your fix was indeed correct! I have re-committed it today.

    I'll try to resolve it later.

    Daniel

     
  • Daniel Drotos

    Daniel Drotos - 2019-03-18

    Hi,

    [r11118] removes need of C++11 from ucsim. So, I removed the C++11 check from configure.

    Daniel

     
    • Philipp Klaus Krause

      Though I wonder why you changed bool to int. After all, bool has been part of C++ since the very first standard in 1998.

      Philipp

      P.S.: If desired, I think the old flag::z syntax could be achieved by wrapping an enum in a namespace called flag? But I'm not an expert on C++.

       

      Last edit: Philipp Klaus Krause 2019-03-18
    • 笑行天下

      笑行天下 - 2019-03-21

      [r11118] fixes the problem for me, thanks.

       
  • Daniel Drotos

    Daniel Drotos - 2019-03-21
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB