View previous topic :: View next topic |
Author |
Message |
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Sat Aug 25, 2007 8:30 pm Post subject: Building gtkD |
|
|
Hi, I am currently trying to build gtkD from source (binaries are not an option since i'm on a weird platform no one supports )
First, to get compd working... I tried to use the compd sh script as instructed in the INSTALL file, but it failed. I needed to copy files from /dool/src/compd into /dool/compd and then it worked... This should be fixed, or at least updated in the docs
Then, i open the gtkD readme :
Quote: |
b) build dool (using compd)
#compd GtkD.compd
|
so, am i building dool or gtkD? seems like copy and paste to me...
then i discover GDC is not supported... by symlinking gdmd to dmd i am able to compile, but it seems like gdmd is not able to link so samples don't work...
finally, if i want to modify a gtkD file for some reason, the build system will always rebuild everything and not only what i modified
I think time spent on the build system would not be lost and could only help gtkD (or correct me if i'm wrong, of course )
Last edited by Auria on Sun Aug 26, 2007 9:44 am; edited 1 time in total |
|
Back to top |
|
|
kaarna
Joined: 03 Apr 2006 Posts: 92 Location: Finland
|
Posted: Sun Aug 26, 2007 8:33 am Post subject: |
|
|
I've made a dsss.conf file for gtkD, but because of my lack of time (and poor subversion skills) I haven't been able to put this into the svn.
You will have to install DSSS from http://www.dsource.org/projects/dsss
and you'll have to put the following into a file called dsss.conf in the root dir of gtkD. I make no quarantee that this will work with the svn version of gtkD, as I'm currently using my own branch.
Code: |
name = gtkD
version = 0.1
[src]
type = library
target = gtkD
exclude = src/GtkD.d src/build src/gda src/glade src/gsv
#exclude = src/GtkD.d src/build src/gda src/gdkpixbuf src/glade src/gsv
buildflags = -I./src
buildflags += -version=noAssert
#[srcgl]
#type = library
#target = gtkDgl
#buildflags = -I./src -I./srcgl
#buildflags += -version=noAssert
#[srcgstreamer]
#type = library
#target = gstreamerD
#buildflags = -I./src -I./srcgstreamer
#buildflags += -version=noAssert
|
I've left gtkDgl and gstreamerD as optional for now. Then you just run:
And if everything goes fine (which might not be the case...) you can do (on linux atleast):
Then here's a dsss.conf file for the gtkDTests in /demos/gtkD/:
(Edited on 29. August: Changed app.d to TestWindow.d)
Code: |
name = gtkDTests
requires = gtkD
[TestWindow.d]
type = binary
target = gtkDTests
buildflags = -debug=Tango -I/usr/local/include/d/src -I../../demos -L-ldl
|
I'm using Tango as you can tell, but it might work for Phobos too... Hope...
There was some issues with the gtkDTests that I don't remember now, but you propably can sort them out with a bit of luck! This dsss.conf file also shows how you can make a dsss.conf file for your own app. The funny thing about this is that gtkD files will be installed into /usr/local/include/d/src because src is the name of the dir they are in the above dsss.conf for gtkD. That's not perfect as the proper dir would be something like /usr/local/include/d/gtkD/ but that would either require changes in DSSS or just renaming the src to gtkD. Oh well. Sorry if this is confusing and difficult at the moment...
But I hope and believe that DSSS will help a lot in the compiling process of gtkD.
Last edited by kaarna on Wed Aug 29, 2007 2:03 am; edited 1 time in total |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Sun Aug 26, 2007 9:57 am Post subject: |
|
|
satelliittipupu : thanks for the answer. unfortunately i've never been able to get dsss to work (it just doesn't seem to see the source files) but i'll investigate |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Sun Aug 26, 2007 6:10 pm Post subject: |
|
|
Auria wrote: | satelliittipupu : thanks for the answer. unfortunately i've never been able to get dsss to work (it just doesn't seem to see the source files) but i'll investigate |
Never mind, the reason it didn't work was because i copied and pasted your file without changing line endings to Unix ones
Now it runs for a while but ends in
Quote: |
src/gtk/Widget.d: module gtk.Widget is in multiple packages gtk.Widget
Command /usr/bin/rebuild returned with code 256, aborting.
|
not sure what it means... i'll check a bit |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Mon Aug 27, 2007 8:54 am Post subject: |
|
|
Auria: What version of gtkD are you using? Are you using a preview build, or svn? If svn, what revision? |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Mon Aug 27, 2007 1:10 pm Post subject: |
|
|
okibi wrote: | Auria: What version of gtkD are you using? Are you using a preview build, or svn? If svn, what revision? |
actually i used the latest source snapshot downloadable from the gtkD frontpage. |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Mon Aug 27, 2007 1:19 pm Post subject: |
|
|
For some reason, there is an extra file...
If you go in the gtkD folder, go to src, and then gtk. You chould see a bunch of .d files and a folder called gtkD. Delete that folder and you should be good to go.
Not sure how that got there...
This has been fixed in the zip file. |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Mon Aug 27, 2007 2:50 pm Post subject: |
|
|
Hi okibi,
thanks, it built fine (at least on OS X, i'll boot in Linux later to try it there too ) unfortunately the dsss.conf file for samples is wrong ( it references a app.d file, but the gtkD package does not contain any ) |
|
Back to top |
|
|
kaarna
Joined: 03 Apr 2006 Posts: 92 Location: Finland
|
Posted: Wed Aug 29, 2007 2:02 am Post subject: |
|
|
You could try changing the app.d in the dsss.conf into TestWindow.d
That works for me, but I still remember there being something that I had to edit to get it to compile... But that could just be me. I don't remember where that app.d file came from... But it shouldn't be needed. I've changed my older post to use TestWindow.d too. |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Mon Sep 03, 2007 1:15 pm Post subject: |
|
|
thanks, i'll try that as soon as i get my computer back ( hard disk crash ) |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Mon Oct 08, 2007 12:58 pm Post subject: |
|
|
Hi, i could finally get back into it. I now use pre5.
gtkD build fine with the config file you gave me
but examples don't
Quote: |
name = gtkDTests
requires = gtkD
[TestWindow.d]
type = binary
target = gtkDTests
buildflags = -I/usr/local/include/d/src -I../../demos -L-ldl
|
gives
Quote: |
/usr/bin/ld: Undefined symbols:
____s.12151
____s.3235
____s.2134
|
What these symbols are, i truly have no clue... anyone can help?
thanks |
|
Back to top |
|
|
kaarna
Joined: 03 Apr 2006 Posts: 92 Location: Finland
|
Posted: Tue Oct 09, 2007 1:23 am Post subject: |
|
|
Hmm. I have no idea. Is that the only information it outputs? |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Tue Oct 09, 2007 4:05 am Post subject: |
|
|
Is there any other output at all? Are you running the compdGtkDTests.sh file ro something else? |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Tue Oct 09, 2007 8:09 am Post subject: |
|
|
Are you using GDC? This sounds like Tango's ticket #450, which was determined to be a GDC code-gen bug. Anders found a way to work around it for Tango, so maybe you guys want to do something similar with gtkD. |
|
Back to top |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Tue Oct 09, 2007 8:46 am Post subject: |
|
|
Quote: |
Is there any other output at all? Are you running the compdGtkDTests.sh file ro something else?
|
I don't want to use compd as i never got it to work with gdc. I'm using dsss with the config files provided earlier in this thread.
On mac OS X, the error output doesn't say anything more interesting than what i posted. On linux, it says
Quote: |
dsss_objs/gtkD.TestWindow.o.sdata._D41TypeInfo_E4gtkc8gtktypes15GtkResponseType6__initZ[_D41TypeInfo_E4gtkc8gtktypes15GtkResponseType6__initZ]+0x18): undefined reference to `___s.12426'
collect2: ld returned 1 exit status
Command /usr/bin/rebuild returned with code 65280, aborting.
|
Carlos wrote: | Are you using GDC? This sounds like Tango's ticket #450, which was determined to be a GDC code-gen bug. Anders found a way to work around it for Tango, so maybe you guys want to do something similar with gtkD. |
Looks very much like it
Will gtkD ever work with GDC?
|
|
Back to top |
|
|
|