New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vide.d:http fails to build under gdc #1602

Closed
baruch opened this Issue Oct 30, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@baruch

baruch commented Oct 30, 2016

I'm trying to build on Debian with msgpack-rpc that depends on vibe.d and during compile I get the error:

vibe-d:http 0.7.29: building configuration "library"...
/usr/lib/gvibe-d:http 0.7.29: building configuration "library"...
/usr/lib/gcc/x86_64-linux-gnu/6/include/d/core/atomic.d:1464:13: error: static assert  "Invalid template type specified."
             static assert(0, "Invalid template type specified.");
             ^
../../../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[])
    else return cast(HTTPServerContext[])atomicLoad(g_contexts);
cc/x86_64-linux-gnu/6/include/d/core/atomic.d:1464:13: error: static assert  "Invalid template type specified."
             static assert(0, "Invalid template type specified.");
             ^
../../../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[])
    else return cast(HTTPServerContext[])atomicLoad(g_contexts);

The compiler I happen to use is gdc 6.1.1 (Debian version is 4:6.1.1-1)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 3, 2016

Same for me with dmd #1611

ghost commented Nov 3, 2016

Same for me with dmd #1611

@ghost ghost referenced this issue Nov 3, 2016

Closed

Unable to build vibe-d:http #1611

@jpf91

This comment has been minimized.

Show comment
Hide comment
@jpf91

jpf91 Dec 10, 2016

Contributor

ping @s-ludwig

#1611 is unrelated. The GDC failure is a combination of GDC not supporting 128bit atomic loads and vibe.d not properly checking for support.

The atomicLoad, atomicStore and cas functions only support types up to size_t.sizeof. Supporting 2*size_t.sizeof is a compiler and architecture specific extension and vibe.d should check has128BitCAS and has64BitCAS before using these extended methods. Note that this in theory also applies when using atomicLoad(long) on 32 bit targets. GDC currently supports 64bit on all targets, so this error is only visible on 64bit machines.

See also: D-Programming-GDC/GDC#263 but it's probably not a simple task to support 128bit atomics in GDC as the GCC support for that requires the external libatomic library.

Contributor

jpf91 commented Dec 10, 2016

ping @s-ludwig

#1611 is unrelated. The GDC failure is a combination of GDC not supporting 128bit atomic loads and vibe.d not properly checking for support.

The atomicLoad, atomicStore and cas functions only support types up to size_t.sizeof. Supporting 2*size_t.sizeof is a compiler and architecture specific extension and vibe.d should check has128BitCAS and has64BitCAS before using these extended methods. Note that this in theory also applies when using atomicLoad(long) on 32 bit targets. GDC currently supports 64bit on all targets, so this error is only visible on 64bit machines.

See also: D-Programming-GDC/GDC#263 but it's probably not a simple task to support 128bit atomics in GDC as the GCC support for that requires the external libatomic library.

@s-ludwig s-ludwig closed this in 6a95a5f Dec 19, 2016

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 19, 2016

Member

I closed this without verifying that GDC now actually compiles. If there are more issues, please reopen.

Member

s-ludwig commented Dec 19, 2016

I closed this without verifying that GDC now actually compiles. If there are more issues, please reopen.

@jpf91

This comment has been minimized.

Show comment
Hide comment
@jpf91

jpf91 Dec 21, 2016

Contributor

I closed this without verifying that GDC now actually compiles. If there are more issues, please reopen.

We've also added support for 128bit atomics to GDC. So 0.7.30 should compile fine.

However, IIRC vibe.D master now uses std.experimental.allocator which is not available in the GDC frontend DMD 2.068.2. The overview page still claims support for 2.068.2: http://code.dlang.org/packages/vibe-d is that information out of date?

Contributor

jpf91 commented Dec 21, 2016

I closed this without verifying that GDC now actually compiles. If there are more issues, please reopen.

We've also added support for 128bit atomics to GDC. So 0.7.30 should compile fine.

However, IIRC vibe.D master now uses std.experimental.allocator which is not available in the GDC frontend DMD 2.068.2. The overview page still claims support for 2.068.2: http://code.dlang.org/packages/vibe-d is that information out of date?

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 21, 2016

Member

We've also added support for 128bit atomics to GDC. So 0.7.30 should compile fine.

Nice, that will definitely be useful!

However, IIRC vibe.D master now uses std.experimental.allocator which is not available in the GDC frontend DMD 2.068.2. The overview page still claims support for 2.068.2: http://code.dlang.org/packages/vibe-d is that information out of date?

I've updated README.md on the master branch to match the supported compilers for 0.8.0 and up. 0.7.31 will still support 2.068.2, but 0.8.0, which is supposed to be released in parallel will only work starting with 2.069.x. It's possible that there will be another 0.7.x release afterwards, should 0.8.0 turn out to be problematic w.r.t. upgrading existing applications., so there is still some room/time for active maintenance for 2.068.2

Member

s-ludwig commented Dec 21, 2016

We've also added support for 128bit atomics to GDC. So 0.7.30 should compile fine.

Nice, that will definitely be useful!

However, IIRC vibe.D master now uses std.experimental.allocator which is not available in the GDC frontend DMD 2.068.2. The overview page still claims support for 2.068.2: http://code.dlang.org/packages/vibe-d is that information out of date?

I've updated README.md on the master branch to match the supported compilers for 0.8.0 and up. 0.7.31 will still support 2.068.2, but 0.8.0, which is supposed to be released in parallel will only work starting with 2.069.x. It's possible that there will be another 0.7.x release afterwards, should 0.8.0 turn out to be problematic w.r.t. upgrading existing applications., so there is still some room/time for active maintenance for 2.068.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment