Thread overview
getting started with web server - vibe.d dub giving link error
Oct 22, 2016
aman
Oct 22, 2016
Karabuta
Oct 22, 2016
Karabuta
Oct 23, 2016
aman
Oct 23, 2016
aman
Oct 23, 2016
Karabuta
Oct 24, 2016
aman
Oct 25, 2016
Karabuta
October 22, 2016
I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details.

setup the env via yum (I have installed ldc).

> dub init test -t vibe.d
(go ahead with default options)
> cd test
> dub

Performing "debug" build using ldc2 for x86_64.
vibe-d:utils 0.7.29: target for configuration "library" is up to date.
vibe-d:data 0.7.29: target for configuration "library" is up to date.
vibe-d:core 0.7.29: target for configuration "libevent" is up to date.
vibe-d:http 0.7.29: target for configuration "library" is up to date.
vibe-d:diet 0.7.29: target for configuration "library" is up to date.
vibe-d:mail 0.7.29: target for configuration "library" is up to date.
vibe-d:mongodb 0.7.29: target for configuration "library" is up to date.
vibe-d:redis 0.7.29: target for configuration "library" is up to date.
vibe-d:web 0.7.29: target for configuration "library" is up to date.
vibe-d 0.7.29: target for configuration "libevent" is up to date.
test ~master: building configuration "application"...
.dub/obj/app.o: In function `_D3std6digest3sha20__T3SHAVii512Vii160Z3SHA21_sharedStaticCtor3644FNbNiNfZv':
/usr/include/d/std/digest/sha.d:224: undefined reference to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv'
../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d.a(vibe.vibe.o): In function `_D3std6digest3sha20__T3SHAVii512Vii160Z3SHA21_sharedStaticCtor3643FNbNiNfZv':
/usr/include/d/std/digest/sha.d:224: undefined reference to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv'
../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_redis.a(vibe.db.redis.sessionstore.o): In function `_D3std6digest3sha20__T3SHAVii512Vii160Z3SHA21_sharedStaticCtor3125FNbNiNfZv':
/usr/include/d/std/digest/sha.d:224: undefined reference to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv'
../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_web.a(vibe.web.common.o): In function `_D3std6digest3sha20__T3SHAVii512Vii160Z3SHA21_sharedStaticCtor3291FNbNiNfZv':
/usr/include/d/std/digest/sha.d:224: undefined reference to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv'
../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_diet.a(vibe.templ.utils.o): In function `_D3std6digest3sha20__T3SHAVii512Vii160Z3SHA21_sharedStaticCtor3140FNbNiNfZv':
/usr/include/d/std/digest/sha.d:224: undefined reference to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv'
../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_http.a(vibe.http.session.o):/usr/include/d/std/digest/sha.d:224: more undefined references to `_D3std8internal6digest9sha_SSSE314transformSSSE3FNaNbNiPG5kPxG64hZv' follow
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
October 22, 2016
On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote:
>
> I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details.
>
> [...]

I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md
October 22, 2016
On Saturday, 22 October 2016 at 17:21:45 UTC, Karabuta wrote:
> On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote:
>>
>> I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details.
>>
>> [...]
>
> I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md

Sorry for the typo, blog link is rather https://aberba.github.io/#blog
October 23, 2016
On Saturday, 22 October 2016 at 17:23:58 UTC, Karabuta wrote:
> On Saturday, 22 October 2016 at 17:21:45 UTC, Karabuta wrote:
>> On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote:
>>>
>>> I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details.
>>>
>>> [...]
>>
>> I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md
>
> Sorry for the typo, blog link is rather https://aberba.github.io/#blog

Hi, still no progress. It seems to be accessing some sha module and then not finding symbols.
I also tried cgi.d and that also wont work ia a "hello world" friendly way.
October 23, 2016
On Saturday, 22 October 2016 at 17:23:58 UTC, Karabuta wrote:
> On Saturday, 22 October 2016 at 17:21:45 UTC, Karabuta wrote:
>> On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote:
>>>
>>> I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details.
>>>
>>> [...]
>>
>> I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md
>
> Sorry for the typo, blog link is rather https://aberba.github.io/#blog

This time i started out with a fresh Ubuntu server and followed instructions on the blog. Here's output. Please help:-

/usr/lib/gcc/x86_64-linux-gnu/5/include/d/core/atomic.d:1381:13: error: static assert  "Invalid template type specified."
             static assert(0, "Invalid template type specified.");
             ^
../.dub/packages/vibe-d-0.7.29/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[])
    else return cast(HTTPServerContext[])atomicLoad(g_contexts);
                                                   ^
gdc failed with exit code 1.

October 23, 2016
On Sunday, 23 October 2016 at 14:53:48 UTC, aman wrote:
> On Saturday, 22 October 2016 at 17:23:58 UTC, Karabuta wrote:
>> [...]
>
> This time i started out with a fresh Ubuntu server and followed instructions on the blog. Here's output. Please help:-
>
> /usr/lib/gcc/x86_64-linux-gnu/5/include/d/core/atomic.d:1381:13: error: static assert  "Invalid template type specified."
>              static assert(0, "Invalid template type specified.");
>              ^
> ../.dub/packages/vibe-d-0.7.29/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[])
>     else return cast(HTTPServerContext[])atomicLoad(g_contexts);
>                                                    ^
> gdc failed with exit code 1.

I used DMD compiler for the tutorial, you are using GCC which might be the problem. GCC compiler seems too outdated. Try using DMD
October 24, 2016
On Sunday, 23 October 2016 at 19:23:04 UTC, Karabuta wrote:
> On Sunday, 23 October 2016 at 14:53:48 UTC, aman wrote:
>> On Saturday, 22 October 2016 at 17:23:58 UTC, Karabuta wrote:
>>> [...]
>>
>> This time i started out with a fresh Ubuntu server and followed instructions on the blog. Here's output. Please help:-
>>
>> /usr/lib/gcc/x86_64-linux-gnu/5/include/d/core/atomic.d:1381:13: error: static assert  "Invalid template type specified."
>>              static assert(0, "Invalid template type specified.");
>>              ^
>> ../.dub/packages/vibe-d-0.7.29/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[])
>>     else return cast(HTTPServerContext[])atomicLoad(g_contexts);
>>                                                    ^
>> gdc failed with exit code 1.
>
> I used DMD compiler for the tutorial, you are using GCC which might be the problem. GCC compiler seems too outdated. Try using DMD

Oh, I see. Actually it got installed auto-magically during dub installation I guess. Now I installed dmd with the script mention on the dlang download page.
curl -fsS https://dlang.org/install.sh | bash -s dmd

I ran dub again. Here's the error this time!
dub
Performing "debug" build using dmd for x86_64.
vibe-d:utils 0.7.29: target for configuration "library" is up to date.
vibe-d:data 0.7.29: target for configuration "library" is up to date.
vibe-d:core 0.7.29: target for configuration "libevent" is up to date.
vibe-d:http 0.7.29: target for configuration "library" is up to date.
vibe-d:diet 0.7.29: target for configuration "library" is up to date.
vibe-d:mail 0.7.29: target for configuration "library" is up to date.
vibe-d:mongodb 0.7.29: target for configuration "library" is up to date.
vibe-d:redis 0.7.29: target for configuration "library" is up to date.
vibe-d:web 0.7.29: target for configuration "library" is up to date.
vibe-d 0.7.29: target for configuration "libevent" is up to date.
testdub ~master: building configuration "application"...
Linking...
cc: No such file or directory
--- errorlevel 255
dmd failed with exit code 255


October 25, 2016
On Monday, 24 October 2016 at 04:46:34 UTC, aman wrote:
> On Sunday, 23 October 2016 at 19:23:04 UTC, Karabuta wrote:
>> [...]
>
> Oh, I see. Actually it got installed auto-magically during dub installation I guess. Now I installed dmd with the script mention on the dlang download page.
> curl -fsS https://dlang.org/install.sh | bash -s dmd
>
> [...]

Make sure you install all the vibe.d dependencies. You can refer to my blog post at https://aberba.github.io/2016/hello-world-app-with-the-vibe.d-web-framework/ under the "Setting up your development environment" section.