FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Building gtkD
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Sat Aug 25, 2007 8:30 pm    Post subject: Building gtkD Reply with quote

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 Razz )

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? Laughing 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 Razz)


Last edited by Auria on Sun Aug 26, 2007 9:44 am; edited 1 time in total
Back to top
View user's profile Send private message
kaarna



Joined: 03 Apr 2006
Posts: 92
Location: Finland

PostPosted: Sun Aug 26, 2007 8:33 am    Post subject: Reply with quote

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:
Code:
dsss build

And if everything goes fine (which might not be the case...) you can do (on linux atleast):
Code:
sudo dsss install



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

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
View user's profile Send private message AIM Address MSN Messenger
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Sun Aug 26, 2007 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Sun Aug 26, 2007 6:10 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Mon Aug 27, 2007 8:54 am    Post subject: Reply with quote

Auria: What version of gtkD are you using? Are you using a preview build, or svn? If svn, what revision?
Back to top
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Mon Aug 27, 2007 1:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Mon Aug 27, 2007 1:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Mon Aug 27, 2007 2:50 pm    Post subject: Reply with quote

Hi okibi,

thanks, it built fine Very Happy (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 Confused )
Back to top
View user's profile Send private message
kaarna



Joined: 03 Apr 2006
Posts: 92
Location: Finland

PostPosted: Wed Aug 29, 2007 2:02 am    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message AIM Address MSN Messenger
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Mon Sep 03, 2007 1:15 pm    Post subject: Reply with quote

thanks, i'll try that as soon as i get my computer back ( hard disk crash Sad )
Back to top
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Mon Oct 08, 2007 12:58 pm    Post subject: Reply with quote

Hi, i could finally get back into it. I now use pre5.
gtkD build fine with the config file you gave me Smile

but examples don't Sad

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
View user's profile Send private message
kaarna



Joined: 03 Apr 2006
Posts: 92
Location: Finland

PostPosted: Tue Oct 09, 2007 1:23 am    Post subject: Reply with quote

Hmm. I have no idea. Is that the only information it outputs?
Back to top
View user's profile Send private message AIM Address MSN Messenger
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Tue Oct 09, 2007 4:05 am    Post subject: Reply with quote

Is there any other output at all? Are you running the compdGtkDTests.sh file ro something else?
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Tue Oct 09, 2007 8:09 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Tue Oct 09, 2007 8:46 am    Post subject: Reply with quote

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.oSad.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 Sad

Will gtkD ever work with GDC?

Confused
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group