Thread overview
Dub failing to use the linker correctly.
Oct 22, 2021
Ruby The Roobster
Oct 22, 2021
jfondren
Oct 22, 2021
Ruby The Roobster
Oct 22, 2021
Ruby The Roobster
Oct 23, 2021
Ruby The Roobster
Oct 23, 2021
Imperatorn
Oct 24, 2021
greenbyte
October 22, 2021

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

Performing "debug" build using E:\Programs\D\dmd2\windows\bin\dmd.exe for x86_64.
mir-linux-kernel 1.0.1: building configuration "library"...
taggedalgebraic 0.11.22: building configuration "library"...
eventcore 0.9.18: building configuration "winapi"...
stdx-allocator 2.77.5: building configuration "library"...
vibe-core 1.21.0: building configuration "winapi"...
vibe-d:crypto 0.9.4: building configuration "library"...
vibe-d:utils 0.9.4: building configuration "library"...
vibe-d:data 0.9.4: building configuration "library"...
diet-ng 1.8.0: building configuration "library"...
vibe-d:stream 0.9.4: building configuration "library"...
vibe-d:textfilter 0.9.4: building configuration "library"...
vibe-d:inet 0.9.4: building configuration "library"...
vibe-d:tls 0.9.4: building configuration "openssl-mscoff"...
vibe-d:http 0.9.4: building configuration "library"...
vibe-d:mail 0.9.4: building configuration "library"...
vibe-d:mongodb 0.9.4: building configuration "library"...
vibe-d:redis 0.9.4: building configuration "library"...
vibe-d:web 0.9.4: building configuration "library"...
vibe-d 0.9.4: building configuration "vibe-core"...
web ~master: building configuration "application"...
Compiling Diet HTML template caccount.dt...
Linking...
lld-link: error: subsystem must be defined
Error: linker exited with status 1

Does anybody know why this happens? I am on the latest version of the dmd compiler(2.098.0.) Thanks in advance.

October 22, 2021

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

October 22, 2021

On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote:

>

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

Dub runs this:

E:\Programs\D\dmd2\windows\bin\dmd.exe -of.dub\build\application-debug-windows-x86_64-dmd_v2.098.0-dirty-F55B8631F4B688ED64EC114C4020C183\web.exe .dub\build\application-debug-windows-x86_64-dmd_v2.098.0-dirty-F55B8631F4B688ED64EC114C4020C183\web.obj C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\lib\win-amd64\libssl.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\lib\win-amd64\libcrypto.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d.dub\build\vibe-core-debug-windows-x86_64-dmd_v2.098.0-dirty-4384684D0DDE660290911B0D721165C2\vibed.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\mail.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-B9CCBAEB5FA0713E534D178D5DD34514\vibe-d_mail.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\mongodb.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-3BFAB0E63C3C03F960C788F360058BCD\vibe-d_mongodb.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\redis.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-5BC464E8B7B6EC4984956D4CC9AB7224\vibe-d_redis.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\web.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-523E5E54E9DF48D3737CE08D6F122A84\vibe-d_web.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\http.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-4FFF3D9CB7963B6B630FC8F8CE7F8AA4\vibe-d_http.lib C:\Users\User\AppData\Local\dub\packages\diet-ng-1.8.0\diet-ng.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-F798A218C8CDCCA8159CC4E63ECFB204\diet-ng.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\crypto.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-410CBAF898A14D11A6F6CCE674C50B4C\vibe-d_crypto.lib C:\Users\User\AppData\Local\dub\packages\mir-linux-kernel-1.0.1\mir-linux-kernel.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-AED23F78FE378124C87728B651909647\mir-linux-kernel.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\inet.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-FEB2655C7A16F7B2E395ADD6ADC27B84\vibe-d_inet.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\data.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-4FAF3FA9F7B2DD7A7754290F7DFD5469\vibe-d_data.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\textfilter.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-6CBCD037FCCB92B7FA2D63732CEB8997\vibe-d_textfilter.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\tls.dub\build\openssl-mscoff-debug-windows-x86_64-dmd_v2.098.0-dirty-2E4550FEED7C7E3F2523F09CD6DA0888\vibe-d_tls.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\stream.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-8055A0A4637A05BDCB4E070BF0F709E2\vibe-d_stream.lib C:\Users\User\AppData\Local\dub\packages\vibe-core-1.21.0\vibe-core.dub\build\winapi-debug-windows-x86_64-dmd_v2.098.0-dirty-298FA4F51A0A8D257668FB21A7E7A404\vibe_core.lib C:\Users\User\AppData\Local\dub\packages\eventcore-0.9.18\eventcore.dub\build\winapi-debug-windows-x86_64-dmd_v2.098.0-dirty-5CC34CF7D531E3E1F558E395993E07C4\eventcore.lib C:\Users\User\AppData\Local\dub\packages\taggedalgebraic-0.11.22\taggedalgebraic.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-054CA7BEF589C740080E95103A6BDA62\taggedalgebraic.lib C:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\utils.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-6B2E4E86BD24C878FFF797FCA25194D0\vibe-d_utils.lib C:\Users\User\AppData\Local\dub\packages\stdx-allocator-2.77.5\stdx-allocator.dub\build\library-debug-windows-x86_64-dmd_v2.098.0-dirty-E411B72CFE2B753670890D5AF7A9A9E1\stdx-allocator.lib advapi32.lib ws2_32.lib user32.lib -m64 -g

and this:

E:\Programs\D\dmd2\windows\bin\dmd.exe -m64 -c -of.dub\build\application-debug-windows-x86_64-dmd_v2.098.0-dirty-F55B8631F4B688ED64EC114C4020C183\web.obj -debug -g -w -version=Have_web -version=Have_vibe_d -version=Have_vibe_d_crypto -version=Have_vibe_d_data -version=Have_vibe_d_http -version=Have_vibe_d_inet -version=Have_vibe_d_mail -version=Have_vibe_d_mongodb -version=Have_vibe_d_redis -version=Have_vibe_d_stream -version=Have_vibe_d_textfilter -version=Have_vibe_d_tls -version=Have_vibe_d_utils -version=Have_vibe_d_web -version=Have_mir_linux_kernel -version=Have_vibe_core -version=Windows7 -version=Have_eventcore -version=Have_stdx_allocator -version=EventcoreWinAPIDriver -version=Have_taggedalgebraic -version=Have_diet_ng -version=Have_openssl -Isource -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\source -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\crypto -IC:\Users\User\AppData\Local\dub\packages\mir-linux-kernel-1.0.1\mir-linux-kernel\source -IC:\Users\User\AppData\Local\dub\packages\vibe-core-1.21.0\vibe-core\source -IC:\Users\User\AppData\Local\dub\packages\eventcore-0.9.18\eventcore\source -IC:\Users\User\AppData\Local\dub\packages\taggedalgebraic-0.11.22\taggedalgebraic\source -IC:\Users\User\AppData\Local\dub\packages\stdx-allocator-2.77.5\stdx-allocator\source -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\data -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\utils -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\http -IC:\Users\User\AppData\Local\dub\packages\diet-ng-1.8.0\diet-ng\source -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\inet -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\stream -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\textfilter -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\tls -IC:\Users\User\AppData\Local\dub\packages\openssl-1.1.6_1.0.1g\openssl -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\mail -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\mongodb -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\redis -IC:\Users\User\AppData\Local\dub\packages\vibe-d-0.9.4\vibe-d\web -Jviews source\app.d C:\Users\User\AppData\Local\dub\packages\vibe-core-1.21.0\vibe-core\source\vibe\appmain.d -vcolumns

Nothing else seems to be of importance, as all other output is dub building packages.

October 22, 2021

On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote:

>

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

Nevermind. I edited the source and it seems to work for some reason.

October 22, 2021

On 10/22/21 5:21 PM, jfondren wrote:

>

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub.  Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

Note that dub -v does not tell you what DMD passes to the linker. I've complained about this before, but I think on discord/slack.

The way you have to see the linker commands is use dub -v to get the link command (which calls dmd), and then copy/paste that command adding the -v flag. Which doesn't always work, since dub will sometimes use temporary files/directories.

-Steve

October 23, 2021

On Friday, 22 October 2021 at 21:57:02 UTC, Ruby The Roobster wrote:

>

On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote:

>

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

Nevermind. I edited the source and it seems to work for some reason.

For better context, changing shared static this() to void main() fixed the problem.

October 23, 2021

On Saturday, 23 October 2021 at 00:54:17 UTC, Ruby The Roobster wrote:

>

On Friday, 22 October 2021 at 21:57:02 UTC, Ruby The Roobster wrote:

>

On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote:

>

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

I'd start by running dub -v build --force instead, to see the exact commands that dub is running.

Nevermind. I edited the source and it seems to work for some reason.

For better context, changing shared static this() to void main() fixed the problem.

Why did you use shared static this there? Oh, maybe most examples use that now when I think about it.

Take a look at this guide btw:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf

October 24, 2021

On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote:

>

I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output:

Performing "debug" build using E:\Programs\D\dmd2\windows\bin\dmd.exe for x86_64.
mir-linux-kernel 1.0.1: building configuration "library"...
taggedalgebraic 0.11.22: building configuration "library"...
eventcore 0.9.18: building configuration "winapi"...
stdx-allocator 2.77.5: building configuration "library"...
vibe-core 1.21.0: building configuration "winapi"...
vibe-d:crypto 0.9.4: building configuration "library"...
vibe-d:utils 0.9.4: building configuration "library"...
vibe-d:data 0.9.4: building configuration "library"...
diet-ng 1.8.0: building configuration "library"...
vibe-d:stream 0.9.4: building configuration "library"...
vibe-d:textfilter 0.9.4: building configuration "library"...
vibe-d:inet 0.9.4: building configuration "library"...
vibe-d:tls 0.9.4: building configuration "openssl-mscoff"...
vibe-d:http 0.9.4: building configuration "library"...
vibe-d:mail 0.9.4: building configuration "library"...
vibe-d:mongodb 0.9.4: building configuration "library"...
vibe-d:redis 0.9.4: building configuration "library"...
vibe-d:web 0.9.4: building configuration "library"...
vibe-d 0.9.4: building configuration "vibe-core"...
web ~master: building configuration "application"...
Compiling Diet HTML template caccount.dt...
Linking...
lld-link: error: subsystem must be defined
Error: linker exited with status 1

Does anybody know why this happens? I am on the latest version of the dmd compiler(2.098.0.) Thanks in advance.

Try to install another linker.
https://code.dawg.eu/reducing-vibed-turnaround-time-part-1-faster-linking.html