www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Can't build simple project. Very strange errors

reply Suliman <evermind live.ru> writes:
I am getting very strange bug on very simple project. Here is 
sources http://rgho.st/7j5LQLZxb (blue button for downloading).

On: dub build I am getting error:

Unexpected OPTLINK Termination at EIP=0040F60A
EAX=03930000 EBX=00438C70 ECX=00000EE6 EDX=000002CE
ESI=00000104 EDI=03930468 EBP=0019FF38 ESP=0019FEF0
First=00402000

on: dub build --compiler=ldc2
It's buildable, but I am getting error on execution. The error 
says that file is corrupted.

If comment mysql driver. database.d:

import std.stdio;
import std.string;
import core.thread;
import ddb.postgres;
// import mysql; // <-- here
import vibe.d;
import config;

the project begin buildable with dmd and ldc2 and run ok.

I haven't seen such error before. I tried to clean

link
OPTLINK (R) for Win32 Release 8.00.17
DMD32 D Compiler v2.074.0
But I tested it on 2.073.0 too Also I tried to cleanup folder: AppData\Roaming\dub but it did not help :( Any ideas? Windows 10
Apr 14 2017
next sibling parent reply Suliman <evermind live.ru> writes:
 But I tested it on 2.073.0 too
Not 2.073.0 but v2.073.2
Apr 14 2017
parent reply Suliman <evermind live.ru> writes:
On Friday, 14 April 2017 at 09:51:55 UTC, Suliman wrote:
 But I tested it on 2.073.0 too
Not 2.073.0 but v2.073.2
I checked v2.073.1 too and he reported that it's buildable with v2.073.1 on his PC. Any ideas?
Apr 14 2017
parent reply Suliman <evermind live.ru> writes:
I checked all possible combination of dmd and vibed (0.7.30 
brunch). No result. Only a little bit another error:

Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
_D4vibe4http6serv╤10listenHTTPFCАТЯ8АДЩSАЕМщttingsАТж24АКжRequestHandlerZSАТ╙2АДнLАЕЎer
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined _D4vibe4http6router9URLRouter7__ClassZ
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
_D4vibe4http6router9URLRouter6__ctorMFAyaZC4vibe4http6router9URLRouter
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
_D4vibe4http6server18HTTPServerSettings7__ClassZ
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
_D4vibe4http6server18HTTPServerSettings6__ctorMFZC4vibe4http6server18HTTPServerSettings
.dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
_D4vibe3web10validation10ValidEmail11__xopEqualsFKxS4vibe3web10validation10ValidEmailKxS4vibe3web10validation10ValidEmailZb
Apr 14 2017
parent Suliman <evermind live.ru> writes:
On Friday, 14 April 2017 at 10:40:00 UTC, Suliman wrote:
 I checked all possible combination of dmd and vibed (0.7.30 
 brunch). No result. Only a little bit another error:

 Copyright (C) Digital Mars 1989-2013  All rights reserved.
 http://www.digitalmars.com/ctg/optlink.html
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe4http6serv╤10listenHTTPFCАТЯ8АДЩSАЕМщttingsАТж24АКжRequestHandlerZSАТ╙2АДнLАЕЎer
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe4http6router9URLRouter7__ClassZ
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe4http6router9URLRouter6__ctorMFAyaZC4vibe4http6router9URLRouter
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe4http6server18HTTPServerSettings7__ClassZ
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe4http6server18HTTPServerSettings6__ctorMFZC4vibe4http6server18HTTPServerSettings
 .dub\build\application-debug-windows-x86-dmd_2073-5BBFAE5ECCC36FEC42565956CE2F0D0A\roadpoint.obj(roadpoint)
  Error 42: Symbol Undefined 
 _D4vibe3web10validation10ValidEmail11__xopEqualsFKxS4vibe3web10validation10ValidEmailKxS4vibe3web10validation10ValidEmailZb
I can build project only in release mode with: `dub --build=release` Otherwise I am getting errors descripted above
Apr 14 2017
prev sibling parent reply Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
Apr 14 2017
parent reply Suliman <evermind live.ru> writes:
On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg wrote:
 On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
I do not have VS on my PC :(
Apr 14 2017
parent reply Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg wrote:
 On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
I do not have VS on my PC :(
You don't need VS, the Windows SDK should be fine too. It's a free download :)
Apr 14 2017
parent reply Suliman <evermind live.ru> writes:
On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg wrote:
 On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg 
 wrote:
 On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
I do not have VS on my PC :(
You don't need VS, the Windows SDK should be fine too. It's a free download :)
How to check if it's installed and how to use linker from it?
Apr 14 2017
parent reply Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Friday, 14 April 2017 at 15:42:33 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg wrote:
 On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg 
 wrote:
 On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
I do not have VS on my PC :(
You don't need VS, the Windows SDK should be fine too. It's a free download :)
How to check if it's installed and how to use linker from it?
If it's installed you can find it in the programs and features list as 'Windows Software Development Kit for Windows X'. The DMD installer will look for it during installation, so reinstalling DMD after installing the SDK should work. I'm not sure how LDC does it, but last time I installed LDC it also just worked.
Apr 14 2017
parent Suliman <evermind live.ru> writes:
On Friday, 14 April 2017 at 15:53:18 UTC, Rene Zwanenburg wrote:
 On Friday, 14 April 2017 at 15:42:33 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg 
 wrote:
 On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
 On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg 
 wrote:
 On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
 on: dub build --compiler=ldc2

link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build? You'll need the Microsoft linker.
I do not have VS on my PC :(
You don't need VS, the Windows SDK should be fine too. It's a free download :)
How to check if it's installed and how to use linker from it?
If it's installed you can find it in the programs and features list as 'Windows Software Development Kit for Windows X'. The DMD installer will look for it during installation, so reinstalling DMD after installing the SDK should work. I'm not sure how LDC does it, but last time I installed LDC it also just worked.
I checked, it's installed. I reinstall dmd, but got same error with linker.
Apr 17 2017