Trouble compiling gtkD under linux with gdc

Howard Berkey howard at well.com
Mon Mar 19 08:30:17 PDT 2007


For dsss users:

This dsss.conf file works fine with dmd.  Haven't tested with gdc but I have no reason to think it will not work, if you have correctly installed dsss and use it with gdc.  Put it in the top level of gtkD and do "dsss build".

This was trivial to write.  However, it could really use a pass at tuning, as theoretically at least it should not need to build and link the libs to link the executables.  I don't have time to track it down today though, and the net effect is harmless anyway.

----- snip -----

[src]
exclude=src/build src/GtkD.d
target=gtkd
buildflags=-I./src

[srcgl]
target=gtkdgl
buildflags=-I./src -I./srcgl

[demos/gl/SimpleGL.d]
buildflags=-I./src -I./srcgl -I./demos -L-L. -L-lSgtkd -L-lSgtkdgl
-L-lGLU -L-lGL -L-ldl

[demos/gl/ShapesGL.d]
buildflags=-I./src -I./srcgl -I./demos -L-L. -L-lSgtkd -L-lSgtkdgl
-L-lGLU -L-lGL -L-ldl

[demos/cairo/main.d]
buildflags=-I./src -I./demos -L-L. -L-lSgtkd -L-ldl

[demos/gtkD/TestWindow.d]
buildflags=-I./src -I./demos -L-L. -L-lSgtkd -L-ldl


Falk-Florian Henrich Wrote:

> Am Thu, 15 Mar 2007 13:52:28 +1030 schrieb Graham St Jack:
> 
> > The buildAll.sh script wouldn't work for me under Linux using gdc (gcc
> > 4.1.2). I used the gtkD-pre2.zip archive.
> > 
> > The problems were:
> > 
> > * The scripts weren't executable.
> > * compd wasn't executable.
> > * The scripts assumed that "." is on the search path * It only tried to
> > use dmd (ie didn't try gdc as a fallback)
> > 
> > Is there a fix coming along soon?
> 
> I tried to install gtkD on linux x86_64 using gdc (currently, the only d 
> compiler supporting 64 bit). After fixing the above problems, some new 
> ones showed up:
> 
> 1.) The compd tool tries to call dmd. So I linked gdmd to dmd.
> 
> 2.) compd outputs stuff like
> 	arg[11]=src:~/dmd/src/phobos
>     but I don't have dmd installed in ~
> 
> 3.) compd tries to link to phobos which is called gphobos under gdc
> 
> 4.) When calling ar to create libgtkd.a, the following message appears:
> compdata? 
> -L/root/prg/d/gtkD
> -I/root/prg/d/gtkD/src:~/dmd/src/phobos
>     Not very informative, if you aren't accustomed to using "compd".
> 
> 5.) The build process ignores the errors and continues.
> 
> 6.) It finally stops with
> 
> dmd demos/gl/ShapesGL.d demos/gl/TrackBall.d   -odobj  -op  -Isrc:/root/
> prg/d/gtkD/src:~/dmd/src/phobos:/root/prg/d/gtkD/src:srcgl:~/dmd/src/
> phobos    -c  -I/root/dmd/src/phobos
> 
> demos/gl/ShapesGL.d:31: module TrackBall cannot read file 'gl/TrackBall.d'
> 
> Conclusion:
> I really need some GUI lib for D and thought gtkD was a good choice. But 
> given the above problems it is simply unusable (at least on linux 64 
> bit). Why can't we just use *standard* tools? Why bother the users with 
> an awkward build process that doesn't even know dependencies?
> 
> 
> I would volunteer to write a Makefile/budfile/d build program/install 
> script or something if someone could provide a precise explanation how 
> the whole thing has to be built anyways.
> 
> Falk



More information about the Digitalmars-d-dwt mailing list