[build2] Same assertion failure on macOS (clang++) and Debian linux (g++)

Chase Metzger chasemetzger15 at gmail.com
Sun Apr 1 22:32:10 UTC 2018


I tried building build2 with cl (Visual Studio) on Windows and I get
compilation errors during the bootstrap phase.

My cl version is:

Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26129 for x64

here's what the errors all look like for the most part:

/function.hxx(124): error C2338: type is not POD (compiling source
file functions-builtin.cxx)
C:\Users\chase\Workspaces\build2-build\build2-toolchain-0.6.2\build2\build2/function.hxx(593):
note: see reference to function template instantiation
'build2::function_overload::function_overload<build2::function_cast<R,build2::value
*>::data>(const char
*,::size_t,::size_t,build2::function_overload::types,build2::function_impl
(__cdecl *),D)' being compiled
        with
        [
            R=const char *,
            D=build2::function_cast<const char *,build2::value *>::data
        ] (compiling source file functions-builtin.cxx)
C:\Users\chase\Workspaces\build2-build\build2-toolchain-0.6.2\build2\build2/function.hxx(633):
note: see reference to function template instantiation 'void
build2::function_family::entry::operator =<R,build2::value*>(R
(__cdecl *)(build2::value *)) &&' being compiled
        with
        [

Thanks

Chase

> On Apr 1, 2018, at 5:51 AM, Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> Chase Metzger <chasemetzger15 at gmail.com> writes:
>
>> libmhello-1.0.0/build/root.build:13:1: error: assertion failed: c++
>>  compiler does not support modules
>
> Compiler support for Modules TS is still very patchy so in build2 we
> only enable it for very recent versions (see cxx/init.cxx for details).
> But you can force it:
>
> cxx.std = experimental
> cxx.features.modules = true
>
>
>> I get this message both on macOS 10.13.4 with this as the clang++ --version
>> output:
>>
>> Apple LLVM version 9.1.0 (clang-902.0.39.1)
>
> For Clang I would suggest using the latest version your can get your
> hands on (6.0.0 or better yet trunk). Even then, expect fireworks.
>
>
>> And on Debian 9 stretch with this as the g++ --version output:
>>
>> gcc version 6.3.0 20170516 (Debian 6.3.0-18)
>
> For GCC you will need to use the c++-modules branch:
>
> https://gcc.gnu.org/wiki/cxx-modules
>
> Also, I wouldn't expect it to be able to handle libstd-modules yet.
>
> Currently, your best chance of having something even remotely usable
> is probable VC (version 15.6 or higher).
>
> Boris



More information about the users mailing list