Thread overview
Trouble compiling gtkD under linux with gdc
Mar 15, 2007
Graham St Jack
Mar 17, 2007
Ant
Mar 19, 2007
Howard Berkey
Mar 19, 2007
Howard Berkey
Mar 19, 2007
Howard Berkey
Mar 19, 2007
Howard Berkey
Mar 19, 2007
Falk Henrich
Mar 19, 2007
Howard Berkey
March 15, 2007
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?
March 17, 2007
Graham St Jack wrote:
> 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?

basically there is no 'official' way to compile gtkD yet.
That and packaging are the reasons gtkD hasn't been announced yet.
Those are tasks I don't find interesting and I can't get anybody to help.
I don't even have gdc installed (I should) and I don't remember people
reporting using gdc with gtkD.

to compile it I use my good old leds which uses compd, that's why
compd is part of the svn tree.

Ant
March 19, 2007
dsss built things easily for me; this was using dmd but if you have dsss installed and configured for gdc I can't think of any reason it wouldn't work.

This works for me, for example:

dsss build  demos/gl/SimpleGL.d  -Isrc -Isrcgl -L-L. -L-lphobos  -L-lgtkd -L-lgtkdgl -L-lGLU -L-lGL -L-ldl

Setting up simple dsss.conf files to build stuff should be a no-brainer here.


March 19, 2007
Hmm, looking again this is after I built the gtkd and gtkdgl libraries seperately, so not quite as easy as the one step I posted.

Howard Berkey Wrote:

> dsss built things easily for me; this was using dmd but if you have dsss installed and configured for gdc I can't think of any reason it wouldn't work.
> 
> This works for me, for example:
> 
> dsss build  demos/gl/SimpleGL.d  -Isrc -Isrcgl -L-L. -L-lphobos  -L-lgtkd -L-lgtkdgl -L-lGLU -L-lGL -L-ldl
> 
> Setting up simple dsss.conf files to build stuff should be a no-brainer here.
> 
> 

March 19, 2007
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
March 19, 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

March 19, 2007
> [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
> 

Note that those buildflags lines should be one line, the web to news reader munged them in my post.

March 19, 2007
Am Mon, 19 Mar 2007 11:30:17 -0400 schrieb Howard Berkey:

> 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".

I tried to become a dsss user, but only got:

./rebuild/rebuild -full -Irebuild sss/main.d -ofdsss
sss/conf.d:804: Error: cannot create instance of abstract class PStream
sss/conf.d:806: Error: cannot create instance of abstract class PStream

Apart from that, I tried to compile gtkD using Makefiles and gdc. I used - m64 just to be sure it generates 64bit code. Compiling and archiving the object files into libgtkd.a using ar works, but as soon as I try to link any of the examples against it the linker goes:

gdc -L. -L.. -L../.. -static -lgtkd -ldl -lpthread -lm TEditableCells.o -
o TEditableCells
/usr/bin/ld: skipping incompatible ../../libgtkd.a when searching for -
lgtkd

This really looks like some kind of 64 bit problem. Any idea what that could be? Did anyone succeed in compiling gtkD on x86_64 so far?

Falk
March 19, 2007
Howard Berkey wrote:

> 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".

Just tried your dsss.conf file on an FC4 32bit system, and it worked.

Thanks.

Falk

March 19, 2007
Falk Henrich Wrote:
> 
> Just tried your dsss.conf file on an FC4 32bit system, and it worked.
> 

Cool, glad to hear it!  But thank Gregor Richards, not me... Other than dmd, dsss is probably the tool I use most for D development.