www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - gtkD doesn't compile on windows

reply simendsjo <simendsjo gmail.com> writes:
Giving up on qtD, I tried gtkD. Not much luck there either. As I've 
spent most of my day trying to compile qt, I'm not really in the mood to 
spend many hours trying to get gtk working.

Is anybody actually using D for GUI development on Windows at all..?

c:\d\ext\gtkd>\d\dsss-0.78-x86-windows\bin\dsss.exe build
undemofy

Creating imports for DD-atk

Creating imports for DD-cairo

Creating imports for DD-gdk

Creating imports for DD-gdkpixbuf

Creating imports for DD-gio

Creating imports for DD-glade

Creating imports for DD-glib

Creating imports for DD-gobject

Creating imports for DD-gthread

Creating imports for DD-gtk

Creating imports for DD-gtkc

Creating imports for DD-pango

atk => DD-atk
DD-atk_static.rf: No such file or directory
Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code 1, 
aborting.
Error: Command failed, aborting.
Jul 19 2011
next sibling parent reply Trass3r <un known.com> writes:
 atk => DD-atk
 DD-atk_static.rf: No such file or directory
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code 1,  
 aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 15:12, Trass3r wrote:
 atk => DD-atk
 DD-atk_static.rf: No such file or directory
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code
 1, aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
No verbose flag. What other build tool? rdmd still doesn't understand subfolders on windows, and it doesn't give good error messages: c:\d\ext\gtkd\demos\gtk>rdmd -v HelloWorld.d Failed: dmd -v -v -o- "HelloWorld.d" -I"." >HelloWorld.d.deps The dmd command works, so it's rdmd that fails.
Jul 19 2011
parent reply Mike Wey <mike-wey example.com> writes:
On 07/19/2011 03:21 PM, simendsjo wrote:
 On 19.07.2011 15:12, Trass3r wrote:
 atk => DD-atk
 DD-atk_static.rf: No such file or directory
dsss should generate this file.
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code
 1, aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
No verbose flag. What other build tool?
dsss uses -v for verbose output.
 rdmd still doesn't understand subfolders on windows, and it doesn't give
 good error messages:

 c:\d\ext\gtkd\demos\gtk>rdmd -v HelloWorld.d
 Failed: dmd -v -v -o- "HelloWorld.d" -I"." >HelloWorld.d.deps

 The dmd command works, so it's rdmd that fails.
-- Mike Wey
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 20:01, Mike Wey wrote:
 On 07/19/2011 03:21 PM, simendsjo wrote:
 On 19.07.2011 15:12, Trass3r wrote:
 atk => DD-atk
 DD-atk_static.rf: No such file or directory
dsss should generate this file.
But it doesn't.
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code
 1, aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
No verbose flag. What other build tool?
dsss uses -v for verbose output.
Unrecognized argument: -v
 rdmd still doesn't understand subfolders on windows, and it doesn't give
 good error messages:

 c:\d\ext\gtkd\demos\gtk>rdmd -v HelloWorld.d
 Failed: dmd -v -v -o- "HelloWorld.d" -I"." >HelloWorld.d.deps

 The dmd command works, so it's rdmd that fails.
Jul 19 2011
parent reply Mike Wey <mike-wey example.com> writes:
On 07/19/2011 09:17 PM, simendsjo wrote:
 On 19.07.2011 20:01, Mike Wey wrote:
 On 07/19/2011 03:21 PM, simendsjo wrote:
 On 19.07.2011 15:12, Trass3r wrote:
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code
 1, aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
No verbose flag. What other build tool?
dsss uses -v for verbose output.
Unrecognized argument: -v
Odd "dsss build -v" works just fine here. -- Mike Wey
Jul 19 2011
parent simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 22:58, Mike Wey wrote:
 On 07/19/2011 09:17 PM, simendsjo wrote:
 On 19.07.2011 20:01, Mike Wey wrote:
 On 07/19/2011 03:21 PM, simendsjo wrote:
 On 19.07.2011 15:12, Trass3r wrote:
 Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code
 1, aborting.
 Error: Command failed, aborting.
Doesn't dsss have some kind of verbose mode? Did you try with another build tool?
No verbose flag. What other build tool?
dsss uses -v for verbose output.
Unrecognized argument: -v
Odd "dsss build -v" works just fine here.
0.75 and 0.78 doesn't have this option on windows.
Jul 20 2011
prev sibling next sibling parent reply Trass3r <un known.com> writes:
I built the fourth example  
(http://dsource.org/projects/gtkd/wiki/CodeExamples) using rdmd and it  
worked fine (regarding gtkD).
(svn version of gtkD)

There's a rdmd bug though. 'rdmd --build-only --chatty  
-I~/coding/gtkD/src/ -L-ldl test.d'
doesn't directly work cause the .rsp file contains 'dmd'.
But if you execute the command inside the .rsp it builds without problems.
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 15:29, Trass3r wrote:
 I built the fourth example
 (http://dsource.org/projects/gtkd/wiki/CodeExamples) using rdmd and it
 worked fine (regarding gtkD).
 (svn version of gtkD)

 There's a rdmd bug though. 'rdmd --build-only --chatty
 -I~/coding/gtkD/src/ -L-ldl test.d'
 doesn't directly work cause the .rsp file contains 'dmd'.
 But if you execute the command inside the .rsp it builds without problems.
What is the command line? rdmd segfaults on me using this: c:\temp>rdmd --build-only --chatty -I\d\ext\gtkd\src t.d dmd -I\d\ext\gtkd\src -v -o- "t.d" -I"." >t.d.deps
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 What is the command line?
 rdmd segfaults on me using this:

 c:\temp>rdmd --build-only --chatty -I\d\ext\gtkd\src t.d
 dmd -I\d\ext\gtkd\src -v -o- "t.d" -I"." >t.d.deps
dmd -I~/coding/gtkD/src/ -L-ldl -v -o- 'test.d' -I'.' >test.d.deps dmd ' /tmp/.rdmd/rdmd.6FC1F920EA8D2136FC5ECC4E5ED4404A.rsp' with rsp containing: dmd -I~/coding/gtkD/src/ -L-ldl -of/tmp/.rdmd/tmp/test.d.6FC1F920EA8D2136FC5ECC4E5ED4404A -od/tmp/.rdmd/rdmd-test.d-6FC1F920EA8D2136FC5ECC4E5ED4404A -I. test.d ~/coding/gtkD/src/gdk/Cursor.d ~/coding/gtkD/src/gtk/Widget.d ~/coding/gtkD/src/gtk/Label.d ~/coding/gtkD/src/atk/StateSet.d ~/coding/gtkD/src/pango/PgEngineShape.d ~/coding/gtkD/src/gdk/Drawable.d ~/coding/gtkD/src/gtkc/gobjecttypes.d ~/coding/gtkD/src/pango/PgAttributeIterator.d ~/coding/gtkD/src/pango/PgContext.d ~/coding/gtkD/src/gtk/TextBuffer.d ~/coding/gtkD/src/gtk/VBox.d ~/coding/gtkD/src/gtk/TextTag.d ~/coding/gtkD/src/gtk/Main.d ~/coding/gtkD/src/gtk/ActivatableT.d ~/coding/gtkD/src/gtk/Builder.d ~/coding/gtkD/src/gtk/Clipboard.d ~/coding/gtkD/src/gtk/Tooltips.d ~/coding/gtkD/src/glib/Module.d ~/coding/gtkD/src/glib/Quark.d ~/coding/gtkD/src/gtk/RcStyle.d ~/coding/gtkD/src/gtkc/pango.d ~/coding/gtkD/src/pango/PgFontMap.d ~/coding/gtkD/src/gobject/Type.d ~/coding/gtkD/src/gdk/Rectangle.d ~/coding/gtkD/src/gdk/Font.d ~/coding/gtkD/src/gtk/ButtonBox.d ~/coding/gtkD/src/gtkc/gio.d ~/coding/gtkD/src/gtk/BuildableT.d ~/coding/gtkD/src/pango/PgFontFace.d ~/coding/gtkD/src/atk/ObjectAtk.d ~/coding/gtkD/src/pango/PgCoverage.d ~/coding/gtkD/src/pango/PgTabArray.d ~/coding/gtkD/src/atk/Relation.d ~/coding/gtkD/src/gtkc/gdkpixbuf.d ~/coding/gtkD/src/glib/GException.d ~/coding/gtkD/src/pango/PgFontMetrics.d ~/coding/gtkD/src/pango/PgLanguage.d ~/coding/gtkD/src/gtk/BuildableIF.d ~/coding/gtkD/src/gobject/ObjectG.d ~/coding/gtkD/src/gdk/Pixmap.d ~/coding/gtkD/src/pango/PgEngine.d ~/coding/gtkD/src/gdkpixbuf/PixbufAnimationIter.d ~/coding/gtkD/src/gtk/Box.d ~/coding/gtkD/src/gtkc/gthread.d ~/coding/gtkD/src/pango/PgFontset.d ~/coding/gtkD/src/gobject/Signals.d ~/coding/gtkD/src/gdk/Region.d ~/coding/gtkD/src/pango/PgLayoutLine.d ~/coding/gtkD/src/gtkc/atktypes.d ~/coding/gtkD/src/gtk/AboutDialog.d ~/coding/gtkD/src/gdk/Window.d ~/coding/gtkD/src/gtk/IconSource.d ~/coding/gtkD/src/gobject/Closure.d ~/coding/gtkD/src/glib/ListG.d ~/coding/gtkD/src/gtk/Container.d ~/coding/gtkD/src/gtkc/gobject.d ~/coding/gtkD/src/gdk/Visual.d ~/coding/gtkD/src/gtk/Window.d ~/coding/gtkD/src/gobject/TypeModule.d ~/coding/gtkD/src/glib/ListSG.d ~/coding/gtkD/src/gdk/Color.d ~/coding/gtkD/src/gdk/Display.d ~/coding/gtkD/src/gobject/Value.d ~/coding/gtkD/src/gdk/Bitmap.d ~/coding/gtkD/src/gobject/TypePlugin.d ~/coding/gtkD/src/gtkc/gtktypes.d ~/coding/gtkD/src/pango/PgFontFamily.d ~/coding/gtkD/src/gdk/Event.d ~/coding/gtkD/src/gtkc/giotypes.d ~/coding/gtkD/src/gdk/ImageGdk.d ~/coding/gtkD/src/gtk/IconSet.d ~/coding/gtkD/src/gtkc/glibtypes.d ~/coding/gtkD/src/gdk/Colormap.d ~/coding/gtkD/src/gtkc/pangotypes.d ~/coding/gtkD/src/gdk/GC.d ~/coding/gtkD/src/glib/ScannerG.d ~/coding/gtkD/src/gtk/WindowGroup.d ~/coding/gtkD/src/pango/PgLayoutIter.d ~/coding/gtkD/src/gtkc/gtk.d ~/coding/gtkD/src/gdk/Pixbuf.d ~/coding/gtkD/src/gtkc/gthreadtypes.d ~/coding/gtkD/src/pango/PgMatrix.d ~/coding/gtkD/src/gthread/Mutex.d ~/coding/gtkD/src/gtkc/cairotypes.d ~/coding/gtkD/src/gobject/ParamSpec.d ~/coding/gtkD/src/gio/IconT.d ~/coding/gtkD/src/gtkc/paths.d ~/coding/gtkD/src/glib/PtrArray.d ~/coding/gtkD/src/pango/PgAttributeList.d ~/coding/gtkD/src/gtk/Bin.d ~/coding/gtkD/src/gtk/TextAttributes.d ~/coding/gtkD/src/glib/ErrorG.d ~/coding/gtkD/src/gthread/Thread.d ~/coding/gtkD/src/gtk/ObjectGtk.d ~/coding/gtkD/src/gdk/Threads.d ~/coding/gtkD/src/gtk/TextIter.d ~/coding/gtkD/src/gtk/TargetList.d ~/coding/gtkD/src/pango/PgAttribute.d ~/coding/gtkD/src/pango/PgGlyphString.d ~/coding/gtkD/src/gtk/ActivatableIF.d ~/coding/gtkD/src/cairo/FontOption.d ~/coding/gtkD/src/gtk/Style.d ~/coding/gtkD/src/pango/PgFontDescription.d ~/coding/gtkD/src/gio/Cancellable.d ~/coding/gtkD/src/gdkpixbuf/PixbufFormat.d ~/coding/gtkD/src/glib/ConstructionException.d ~/coding/gtkD/src/gtkc/Loader.d ~/coding/gtkD/src/gtkc/cairo.d ~/coding/gtkD/src/gtkc/atk.d ~/coding/gtkD/src/gtkc/gdktypes.d ~/coding/gtkD/src/gobject/Flags.d ~/coding/gtkD/src/gio/AsyncResultIF.d ~/coding/gtkD/src/gtk/AccelGroup.d ~/coding/gtkD/src/gtk/Image.d ~/coding/gtkD/src/gtk/Action.d ~/coding/gtkD/src/gtk/Dialog.d ~/coding/gtkD/src/gtk/TextChildAnchor.d ~/coding/gtkD/src/gtk/VButtonBox.d ~/coding/gtkD/src/gtkc/gdk.d ~/coding/gtkD/src/gtkc/glib.d ~/coding/gtkD/src/gtk/TextTagTable.d ~/coding/gtkD/src/glib/MainContext.d ~/coding/gtkD/src/gio/Icon.d ~/coding/gtkD/src/pango/PgFont.d ~/coding/gtkD/src/glib/Str.d ~/coding/gtkD/src/gtkc/gdkpixbuftypes.d ~/coding/gtkD/src/gtk/OrientableT.d ~/coding/gtkD/src/gtk/Button.d ~/coding/gtkD/src/gtk/OrientableIF.d ~/coding/gtkD/src/glib/TimeVal.d ~/coding/gtkD/src/gtk/TextMark.d ~/coding/gtkD/src/gobject/Enums.d ~/coding/gtkD/src/gtk/HButtonBox.d ~/coding/gtkD/src/gthread/Cond.d ~/coding/gtkD/src/gio/InputStream.d ~/coding/gtkD/src/gio/IconIF.d ~/coding/gtkD/src/glib/Source.d ~/coding/gtkD/src/gtk/MainWindow.d ~/coding/gtkD/src/atk/RelationSet.d ~/coding/gtkD/src/gdk/Screen.d ~/coding/gtkD/src/gtk/Misc.d ~/coding/gtkD/src/gtk/Adjustment.d ~/coding/gtkD/src/gdkpixbuf/PixbufAnimation.d ~/coding/gtkD/src/glib/StringG.d ~/coding/gtkD/src/gtk/Settings.d ~/coding/gtkD/src/pango/PgLayout.d
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 15:53, Trass3r wrote:
 What is the command line?
 rdmd segfaults on me using this:

 c:\temp>rdmd --build-only --chatty -I\d\ext\gtkd\src t.d
 dmd -I\d\ext\gtkd\src -v -o- "t.d" -I"." >t.d.deps
dmd -I~/coding/gtkD/src/ -L-ldl -v -o- 'test.d' -I'.' >test.d.deps dmd ' /tmp/.rdmd/rdmd.6FC1F920EA8D2136FC5ECC4E5ED4404A.rsp' with rsp containing:
(...) So your command line is simply "rdmd --build-only --chatty -I\d\ext\gtkd\src -L-ldl t.d"? rdmd calls "dmd -I\d\ext\gtkd\src -L-ldl -v -o- "t.d" -I"." >t.d.deps", and then segfaults (win7x64).
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 So your command line is simply "rdmd --build-only --chatty  
 -I\d\ext\gtkd\src -L-ldl t.d"?
Yes, and in theory that would be enough. (if it didn't put 'dmd' in the .rsp)
 rdmd calls "dmd -I\d\ext\gtkd\src -L-ldl -v -o- "t.d" -I"." >t.d.deps",  
 and then segfaults (win7x64).
Doesn't segfault on Linux x64. You should compile a debug version of rdmd and see if you get a stacktrace. github.com/D-Programming-Language/tools
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 16:19, Trass3r wrote:
 So your command line is simply "rdmd --build-only --chatty
 -I\d\ext\gtkd\src -L-ldl t.d"?
Yes, and in theory that would be enough. (if it didn't put 'dmd' in the .rsp)
 rdmd calls "dmd -I\d\ext\gtkd\src -L-ldl -v -o- "t.d" -I"."
t.d.deps", and then segfaults (win7x64).
Doesn't segfault on Linux x64. You should compile a debug version of rdmd and see if you get a stacktrace. github.com/D-Programming-Language/tools
I haven't found the bug, but compiling without optimizing doesn't crash it: c:\temp>rdmd --chatty -I\d\ext\gtkd\src t.d dmd -I\d\ext\gtkd\src -v -o- "t.d" -I"." >t.d.deps dmd " C:\Users\simen\AppData\Local\Temp\.rdmd\rdmd.0B610F9A43C84525CA4F687638D0E F2B.rsp" Error: cannot read file dmd.d dmd.d...?
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 dmd.d...?
That's what I was talking about. it calls dmd ...rsp and rsp contains dmd again. So it in fact calls dmd dmd ... We should really get rid of the response file crap and call dmd directly. This would also clean up rdmd --dry-run
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 17:04, Trass3r wrote:
 dmd.d...?
That's what I was talking about. it calls dmd ...rsp and rsp contains dmd again. So it in fact calls dmd dmd ... We should really get rid of the response file crap and call dmd directly. This would also clean up rdmd --dry-run
I removed "compiler" from "todo = compiler ~ ... " (two places) in rebuild() and added the compiler name to the later run() instead. Solves the problem. Sorry I haven't made a pull request for rdmd; I have never used git before. The -L-ldl isn't recognized by optlink. OPTLINK : Warning 9: Unknown Option : LDL What's the equivalent? It tries to pick up zlib1.dll from my Intel WiFi program folder, and I cannot find it in the gtk or dmd folders.
Jul 19 2011
next sibling parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 17:23, simendsjo wrote:
 I removed "compiler" from "todo = compiler ~ ... " (two places) in
 rebuild() and added the compiler name to the later run() instead. Solves
 the problem.
 Sorry I haven't made a pull request for rdmd; I have never used git before.
Seems I could use github direcly: https://github.com/D-Programming-Language/tools/pull/3
Jul 19 2011
parent Trass3r <un known.com> writes:
 Seems I could use github direcly:  
 https://github.com/D-Programming-Language/tools/pull/3
Thanks! But we should really also try to track down why rdmd crashes on Windows.
Jul 19 2011
prev sibling parent reply Trass3r <un known.com> writes:
 The -L-ldl isn't recognized by optlink.
 OPTLINK : Warning 9: Unknown Option : LDL
 What's the equivalent?
I think you don't need it on Windows. But according to the demo dsss.conf files you might need -lladvapi32 Might also be -L-Ladvapi32.
 It tries to pick up zlib1.dll from my Intel WiFi program folder, and I  
 cannot find it in the gtk or dmd folders.
Yep, it's installed system-wide on Linux.
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 17:30, Trass3r wrote:
 The -L-ldl isn't recognized by optlink.
 OPTLINK : Warning 9: Unknown Option : LDL
 What's the equivalent?
I think you don't need it on Windows. But according to the demo dsss.conf files you might need -lladvapi32 Might also be -L-Ladvapi32.
 It tries to pick up zlib1.dll from my Intel WiFi program folder, and I
 cannot find it in the gtk or dmd folders.
Yep, it's installed system-wide on Linux.
Downloaded from zlib.net, and the sample works now. Thanks! There is something wrong with either dmd or rdmd though.. If I compile rdmd (with my patch, haven't tried the original) without -g, it crashes when trying to compile anything...
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 There is something wrong with either dmd or rdmd though..
 If I compile rdmd (with my patch, haven't tried the original) without  
 -g, it crashes when trying to compile anything...
Does this also happen if you compile it with -g and then run cv2pdb on it?
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 17:53, Trass3r wrote:
 There is something wrong with either dmd or rdmd though..
 If I compile rdmd (with my patch, haven't tried the original) without
 -g, it crashes when trying to compile anything...
Does this also happen if you compile it with -g and then run cv2pdb on it?
I cannot compile anything without first compiling rdmd with -g. Compiling rdmd with -g and running cv2pdb on it works.
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 I cannot compile anything without first compiling rdmd with -g.
 Compiling rdmd with -g and running cv2pdb on it works.
Really strange. If we just had a stack trace.
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 20:46, Trass3r wrote:
 I cannot compile anything without first compiling rdmd with -g.
 Compiling rdmd with -g and running cv2pdb on it works.
Really strange. If we just had a stack trace.
Whats the best way to debug this? Sprinkle printf's around?
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 Whats the best way to debug this? Sprinkle printf's around?
Probably. Should happen in that getDependencies function, shouldn't it?
Jul 19 2011
parent reply simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 21:58, Trass3r wrote:
 Whats the best way to debug this? Sprinkle printf's around?
Probably. Should happen in that getDependencies function, shouldn't it?
It fails on the return statement in getDependencies. It never gets to the line after getDependencies in main. Someone want to look at the assembly? The .exe is to large for the newsgroup, so only the code is attached. I've only tried compiling with dmd 2.054
Jul 19 2011
parent reply Trass3r <un known.com> writes:
 Someone want to look at the assembly? The .exe is to large for the
 newsgroup, so only the code is attached. I've only tried compiling with
 dmd 2.054
Maybe you could post only rdmd.obj?
Jul 19 2011
parent simendsjo <simendsjo gmail.com> writes:
On 19.07.2011 22:54, Trass3r wrote:
 Someone want to look at the assembly? The .exe is to large for the
 newsgroup, so only the code is attached. I've only tried compiling with
 dmd 2.054
Maybe you could post only rdmd.obj?
Jul 20 2011
prev sibling parent Jesse Phillips <jessekphillips+D gmail.com> writes:
simendsjo Wrote:

 Giving up on qtD, I tried gtkD. Not much luck there either. As I've 
 spent most of my day trying to compile qt, I'm not really in the mood to 
 spend many hours trying to get gtk working.
 
 Is anybody actually using D for GUI development on Windows at all..?
I use DFL, but that was mostly because I didn't want to depend on QT or GTK. But even DFL needs updates for the latest compiler and I haven't forked and pushed those I've made.
Jul 19 2011