-
Notifications
You must be signed in to change notification settings - Fork 284
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
The default example does not work on Windows #1908
Comments
The problem with Dub 1.3.0 has already been fixed, see dlang/dub#1130 I believe the OptLink issue is a new one. There two things you could try:
|
I must point out that it's really strange that vibe.d doesn't work on Windows for you, as it's tested on AppVeyor with various compilers and all tests pass, see: https://ci.appveyor.com/project/s-ludwig/vibe-d/branch/master |
Windows tends to be tricky. Sometimes it works and sometimes it fails either in Optlink or in DMD's COFF code for no apparent reason (e.g. just an additional plain function call that is used elsewhere in a similar fashion). If DigitalMars/optlink#20 were addressed, that would at least make it more realistic to get a reduced test case for OMF. |
What can i say... I must be special :-) Another interesting issue, when trying a different compiler: So for some reason it can only read the default sample with the included dub configuration. The moment i use argumentation, it wants the package name. DMD32 D Compiler v2.074.1 ( everything 2.074.1 except custom 1.4.1 dub ) Path OK OPTLINK (R) for Win32 Release 8.00.17 Error: linker exited with status 16 Tonight i will test a normal dub package instead of this include design. |
The
Can you try to run BTW, I'm able to reproduce the Optlink crash and will try to get a reduced case and/or workaround. |
Did not know this syntax. Thanks, that is very helpful.
Tried it. Unfortunately the same errors as before. Attempt 2: I just tried the exact same dub/dmd/etc version with a standard dub.json and vibe.d worked perfectly. So somehow the issue seems to be linked to the shebang style. |
New tests at my work PC: DMD32 D Compiler v2.075.1 OPTLINK: Crash DMD32 D Compiler v2.076.0 OPTLINK: Same crash as before. DMD32 D Compiler v2.074.1 Ok Something got introduced in DMD after 2.0.74.1 ( so 2.0.75+ ) that produces these crashes. I hope this can help to backtrace the issue. Its not solve in the 2.0.76 release, that i can confirm with 100%. |
This is good news, as it means we may get a DMD/Optlink fix soon. I'm currently still in the process of reducing one of the Optlink crashes that I get (Dustmite is already running for two days on an i5-6600k). Once that is done, I can start another run with the other crash (if I remember right that was the one from here). Then there is also a COFF issue when using x86_mscoff/x86_64 within VisualD... |
It's 17-6-2018 and I also get this exception, exactly the same. |
Yep, same issue here. I went back and tried several earlier releases of DMD (all the way back to 2.073.0), same issue while linking on all on them. Is there a functioning workaround to be able to use vibe at this time? The newest DMD version also fails during build due to a different issue ... |
The only workaround I saw, is using Bash on Ubuntu on Windows 10 and I upgraded to 18.04. There the link crash won't occur. |
I found that building in release mode with dub --build=release somehow bypasses this issue. |
I have the same error. Tested on DMD32 v2.074.1 with DUB1.5.0 and the error is there too. Tested with the last DMD32 2.082.0 to no avail. |
This is still a problem that basically prevents me from demoing a vibe.d service example... |
I stumbled on the same exact issue with optlink on Windows, but I'd like to let you know that the example works in release mode like previously said:
And also works in debug mode but using the linker from Visual Studio:
These are the exact versions I'm currently using:
|
Does it only work in release mode? If so, this is still an issue. The problem arises when I try to debug the application. |
It works only in release mode if you use "optlink", and works in release and in debug mode if you use I also think that this is still an issue. |
We should just deprecate optlink ... (or at least not make it the default) |
If we just deprecate optlink you will be required to install the Visual C development tools in Windows to get vibe.d working. This is a strong requirement, IMHO, or at least it's a requirement that can take a lot of time to install. |
No DMD ships with lld since 2.079, i.e. it bundles its own linker. No Visual studio required for linking. LDC does the same since a while too. |
I didn't know about that. That's great! I tested it in a clean Windows VM and it works like a charm with That means that optlink can be deprecated. |
|
The latest oplink should identify as 8.00.17, be 223,260 bytes, and be 1/29/2015. Also, undefined symbols are not optlink bugs. |
There are two different issues in this discussion: the first one regards the undefined symbols, and @Wulfklaue may have already have resolved it. The one I'm referring to is the one with the following error from Optlink:
I can reproduce this bug with the Optlink distributed with DMD 2.084.0, which is OptLink 8.00.17 and its size is 230,472 bytes. Nevertheless, using |
Please send me an email and I'll send you the optlink I have. Also, optlink errors need to be reported in bugzilla. |
Thank you @WalterBright for your help, I'm writing you and I'll report how it goes with the optlink you will send me. |
I had no idea about this. Glad I know that now so I can uninstall Visual Studio :) |
I would not advice you to do this yet, but you can look forward to it ;) |
Someone please ping me when I can do so then since I literally only installed VS for linking. |
This was an optlink bug, and I believe the changes to use |
`#!/usr/bin/env dub
/+ dub.sdl:
name "hello_vibed"
dependency "vibe-d" version="~>0.8.0"
+/
import vibe.d;
void main()
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
}`
dub .\hello.d
C:\Users\xxx\AppData\Local\Temp.dub\build\vibe-d:utils-0.8.1: The directory name is invalid.
Packages get placed by Dub in the following locations:
C:\Users\xxx\AppData\Local*lxss\home\xxx*.dub\packages\vibe-d-0.8.1
C:\Users\xxx\AppData*Roaming*\dub\packages\vibe-d-0.8.1\
DMD32 D Compiler v2.074.1
DUB version 1.3.0, built on May 31 2017
Attempt 2:
DMD32 D Compiler v2.075.1
DUB version 1.4.1, built on Aug 10 2017
Correct locations this time!
But error:
Error: linker exited with status 1
dmd failed with exit code 1.
Unexpected OPTLINK Termination at EIP=0040F60A
EAX=03880000 EBX=00438C70 ECX=00000A7A EDX=000002BF
ESI=0000011C EDI=03881618 EBP=0019FF38 ESP=0019FEF0
First=00402000
The text was updated successfully, but these errors were encountered: