Am 13.03.2017 um 23:04 schrieb Rey Valeza:
Just a few minutes ago on my Linode/Ubuntu 16.10 I tried to compile a bare-bones project and I got this:
rey@ubuntu:~/www$ dub init fmt -t vibe.d
Package recipe format (sdl/json) [json]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
Copyright string [Copyright © 2017, Rey Valeza]:
Add dependency (leave empty to skip) :
Successfully created an empty project in '/home/rey/www/fmt'.
Package sucessfully created in fmt
rey@ubuntu:~/www$ cd fmt
Fetching memutils 0.4.9 (getting selected version)...
Placing memutils 0.4.9 to /home/rey/.dub/packages/...
Fetching vibe-d 0.7.30 (getting selected version)...
Placing vibe-d 0.7.30 to /home/rey/.dub/packages/...
Fetching libevent 2.0.2+2.0.16 (getting selected version)...
Placing libevent 2.0.2+2.0.16 to /home/rey/.dub/packages/...
Fetching openssl 1.1.5+1.0.1g (getting selected version)...
Placing openssl 1.1.5+1.0.1g to /home/rey/.dub/packages/...
Fetching diet-ng 1.2.0 (getting selected version)...
Placing diet-ng 1.2.0 to /home/rey/.dub/packages/...
Fetching libasync 0.7.9 (getting selected version)...
Placing libasync 0.7.9 to /home/rey/.dub/packages/...
Performing "debug" build using gdc for x8664.<br>vibe-d:utils 0.7.30: building configuration "library"...<br>vibe-d:data 0.7.30: building configuration "library"...<br>vibe-d:core 0.7.30: building configuration "libevent"...<br>diet-ng 1.2.0: building configuration "library"...<br>vibe-d:http 0.7.30: building configuration "library"...<br>/usr/lib/gcc/x8664-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.30/vibe-d/source/vibe/http/server.d:1507:50: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext))
else return cast(HTTPServerContext)atomicLoad(g_contexts);
gdc failed with exit code 1.
I don't know what's going on. On my other Linode box (Ubuntu 16.04) I could compile and see the output. With this Linode/Ubuntu 16.10, I cannot compile.
Can someone help me? I am new to D and Vibe.d.
It looks like this machine is using a different compiler. For GDC try
using "~>0.7.31-beta" for vibe.d instead of 0.7.30 (32-bit GDC did not
implement 64-bit atomic operations until recently and 0.7.31 avoids those).
Alternatively, using DMD or LDC would of course also be an option. But
generally this requires a large RAM/swap because compilation takes up so
much memory, so I tend to avoid it on VMs.