RejectedSoftware Forums

Sign up

Unable to compile in Linode/Ubuntu 16.10

Hi,

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]:
Name [fmt]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
License [proprietary]:
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
rey@ubuntu:~/www/fmt$ dub
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.
vibe-d:utils 0.7.30: building configuration "library"...
vibe-d:data 0.7.30: building configuration "library"...
vibe-d:core 0.7.30: building configuration "libevent"...
diet-ng 1.2.0: building configuration "library"...
vibe-d:http 0.7.30: 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.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.

Re: Unable to compile in Linode/Ubuntu 16.10

On Mon, 13 Mar 2017 22:04:38 GMT, Rey Valeza wrote:

Hi,

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]:
Name [fmt]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
License [proprietary]:
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
rey@ubuntu:~/www/fmt$ dub
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.
vibe-d:utils 0.7.30: building configuration "library"...
vibe-d:data 0.7.30: building configuration "library"...
vibe-d:core 0.7.30: building configuration "libevent"...
diet-ng 1.2.0: building configuration "library"...
vibe-d:http 0.7.30: 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.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.

Hi guys,

I finally stumbled on this workaround: compile on my local machine and simply FileZilla my compiled code to the Linode server. I did not know I can do that. It was just desperation.

I can now view it here:

http://findmytutor.co:8080/

It is still a work in progress. If you just type

http://findmytutor.co

it will simply show the Nginx welcome page, so I still have to make nginx my proxy server. I also have to work on the TLS/SSL thing, authentication, validation, etc. Still so many things to do!

But thanks still!

Re: Unable to compile in Linode/Ubuntu 16.10

Am 13.03.2017 um 23:04 schrieb Rey Valeza:

Hi,

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]:
Name [fmt]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
License [proprietary]:
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
rey@ubuntu:~/www/fmt$ dub
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.
vibe-d:utils 0.7.30: building configuration "library"...
vibe-d:data 0.7.30: building configuration "library"...
vibe-d:core 0.7.30: building configuration "libevent"...
diet-ng 1.2.0: building configuration "library"...
vibe-d:http 0.7.30: 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.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.

Re: Unable to compile in Linode/Ubuntu 16.10

On Fri, 17 Mar 2017 21:15:06 +0100, Sönke Ludwig wrote:

Am 13.03.2017 um 23:04 schrieb Rey Valeza:

Hi,

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]:
Name [fmt]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
License [proprietary]:
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
rey@ubuntu:~/www/fmt$ dub
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.
vibe-d:utils 0.7.30: building configuration "library"...
vibe-d:data 0.7.30: building configuration "library"...
vibe-d:core 0.7.30: building configuration "libevent"...
diet-ng 1.2.0: building configuration "library"...
vibe-d:http 0.7.30: 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.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.

Thanks Sönke! I'll try your solution in the future. Meanwhile, I'll just compile on my local machine and upload to the server.

Best regards,

Rey

Re: Unable to compile in Linode/Ubuntu 16.10

On Fri, 17 Mar 2017 21:15:06 +0100, Sönke Ludwig wrote:

Am 13.03.2017 um 23:04 schrieb Rey Valeza:

Hi,

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]:
Name [fmt]:
Description [A simple vibe.d server application.]:
Author name [Rey Valeza]:
License [proprietary]:
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
rey@ubuntu:~/www/fmt$ dub
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.
vibe-d:utils 0.7.30: building configuration "library"...
vibe-d:data 0.7.30: building configuration "library"...
vibe-d:core 0.7.30: building configuration "libevent"...
diet-ng 1.2.0: building configuration "library"...
vibe-d:http 0.7.30: 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.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.

Hi Sönke,

I tried to upgrade a project and this is what I got:

rey@rey-ThinkCentre:~/vibe/rey$ dub upgrade
Upgrading project in /home/rey/vibe/rey
Fetching vibe-d 0.7.31 (getting selected version)...
Placing vibe-d 0.7.31 to /home/rey/.dub/packages/...
/home/rey/.dub/packages/vibe-d-0.7.31/dub.sdl(62:7): Error: Expected '=' after attribute name, not Value
rey@rey-ThinkCentre:~/vibe/rey$

Thanks!

Re: Unable to compile in Linode/Ubuntu 16.10

On Thu, 13 Apr 2017 18:26:29 GMT, Rey Valeza wrote:

Hi Sönke,

I tried to upgrade a project and this is what I got:

rey@rey-ThinkCentre:~/vibe/rey$ dub upgrade
Upgrading project in /home/rey/vibe/rey
Fetching vibe-d 0.7.31 (getting selected version)...
Placing vibe-d 0.7.31 to /home/rey/.dub/packages/...
/home/rey/.dub/packages/vibe-d-0.7.31/dub.sdl(62:7): Error: Expected '=' after attribute name, not Value
rey@rey-ThinkCentre:~/vibe/rey$

Thanks!

Looks like there is some issue with the SDLang parser of DUB (not treating the comment at the end of the line as a comment). There is an open pull request for this in the vibe.d repository and I'll have a look at the root cause.