Thread overview
DUB linking problem on WinXp
Jun 19, 2014
Orfeo
Jun 19, 2014
Mathias Lang
Jun 19, 2014
Orfeo
Jun 19, 2014
Orfeo
Jun 19, 2014
Rene Zwanenburg
Jun 20, 2014
Orfeo
June 19, 2014
I've this dub.json
{
	"name": "ega_editor",
	"description": "Editor for ega database",
         "targetType": "executable",
         "targetPath": "bin",
         "dependencies": {
           "sdlang-d": ">=0.8.4",
           "ddb": ">=0.2.1",
           "dejector": "~master",
           "gtk-d:gtkd": ">=2.3.3"
	}
}
and under linux it works well.

Under WinXp I got the following

Linking...
dmd
-of.dub\build\application-debug-windows-x86-dmd-78940A919140142F73EC858336385DF4\ega_editor.exe
.dub\build\application-debug-windows-x86-dmd-78940A919140142F73EC858336385DF4\ega_editor.obj
C:\Documents and Settings\dao\Application
Data\dub\packages\dejector-master\dejector.lib C:\Documents and
Settings\dao\Application Data\dub\packages\dunit-1.0.9\dunit.lib
C:\Documents and Settings\dao\Application
Data\dub\packages\sdlang-d-0.8.4\sdlang-d.lib C:\Documents and
Settings\dao\Application Data\dub\packages\ddb-0.2.1\ddb.lib
C:\Documents and Settings\dao\Application
Data\dub\packages\gtk-d-2.3.3\gtkd-2.lib -g
--- errorlevel 1
FAIL
.dub\build\application-debug-windows-x86-dmd-78940A919140142F73EC858336385DF4\
ega_editor executable
Error executing command build: dmd failed with exit code 1

Full exception:
object.Exception@source\dub\compilers\compiler.d(236): dmd failed
with exit code 1
----------------
0x004CC9F2
0x00437462
0x004394BA
0x00441FFD
0x004405C1
0x00440240
0x0043FEDE
0x0043FB08
0x00443A06
0x00410549
0x00404D6C
0x00405017
0x00403538
0x00402106
0x004BCD30
0x004BCD03
0x004BCC1B
0x0040271C
0x0050A33D
0x7C816037 in CreateActCtxW

My dub version is DUB version 0.9.22-beta.3, built on Jun 12 2014


Thanks a lot!
June 19, 2014
On Thursday, 19 June 2014 at 12:18:54 UTC, Orfeo wrote:
> Under WinXp I got the following

AFAIK, D is not officially supported on Win XP.

That's probably why you don't have a meaningful stacktrace or error message.
June 19, 2014
Thank you for your reply...

On Thursday, 19 June 2014 at 12:28:31 UTC, Mathias Lang wrote:
------------>8------------
> AFAIK, D is not officially supported on Win XP.
------------>8------------

The strange thing is that it worked yesterday and not today. I
have also tried with Win7 64bit (on Virtual Box) and the problem
it's the same...


June 19, 2014
The problem was on ddb 0.2.1 ... if I remove it I can compile
June 19, 2014
On Thursday, 19 June 2014 at 15:12:10 UTC, Orfeo wrote:
> The problem was on ddb 0.2.1 ... if I remove it I can compile

Did you try a full rebuild? dub --force sometimes helps, especially when you've upgraded your compiler.
June 20, 2014
Well, after many attempts, I have found what is causing the
problem.

My dub.json :
```
{
   "name": "ddb_test",
   "description": "A minimal D application.",
   "dependencies": {
       "gtk-d:gtkd": ">=2.3.3",
       "ddb": ">=0.2.1"
    }
}

```

My source (source/app.d):
```
import ddb.postgres;
import gtk.Window;

int main(string[] argv) {
    return 0;
}
```

On linux works, on WinXp and Win7 64bit I get following:

```
$ dub build --force
Building ddb 0.2.1 configuration "library", build type debug.
Running dmd...
Building gtk-d:gtkd 2.3.3 configuration "library", build type
debug.
Running dmd...
Building ddb_test ~master configuration "application", build type
debug.
Compiling using dmd...
Linking...
--- errorlevel 1
FAIL
.dub\build\application-debug-windows-x86-dmd-5D99A10B3D44C3F39E37BD10F5149BF7\
ddb_test executable
Error executing command build: dmd failed with exit code 1
```

If I comment just a row on app.d:
```
import ddb.postgres;
// import gtk.Window;  <= !!!!

int main(string[] argv) {
    return 0;
}
```
it works!

Is it a GtkD or ddb or optliker problem?

Incidentally if I try release version (on linux and Win):

```
$dub --build=release

ddb: ["ddb"]
gtk-d:gtkd: ["gtk-d:gtkd"]
ddb_test: ["ddb_test", "ddb", "gtk-d:gtkd"]
Building ddb configuration "library", build type release.
Running dmd...
Building gtk-d:gtkd configuration "library", build type release.
Running dmd...
../../../.dub/packages/gtk-d-2.3.3/src/gtk/Builder.d(489): Error:
ICE: cannot append 'char' to 'string'
Internal error: e2ir.c 3204
FAIL
../../../.dub/packages/gtk-d-2.3.3/.dub/build/library-release-linux.posix-x86_64-dmd-AB3D2656D2B9D0AA591491D684B048DC
gtkd-2 staticLibrary
Error executing command run: DMD compile run failed with exit
code 1
```