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

problem compiling on linux

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
barrett9h



Joined: 02 May 2005
Posts: 26
Location: Brazil

PostPosted: Wed Jun 08, 2005 5:20 am    Post subject: problem compiling on linux Reply with quote

I got undefined references trying to link a hello world program with dui.

The missing symbols were from ComboBox.d:
gtk_combo_box_get_wrap_width
gtk_combo_box_get_row_span_column
gtk_combo_box_set_row_span_column
gtk_combo_box_get_column_span_column
gtk_combo_box_get_popup_accessible
gtk_combo_box_set_row_separator_func
gtk_combo_box_set_add_tearoffs
gtk_combo_box_get_add_tearoffs
gtk_combo_box_set_focus_on_click
gtk_combo_box_get_focus_on_click

and ComboBoxText.d:
gtk_combo_box_get_active_text


I tried to comment out these references: the program now builds fine, but dumps core. It does not use a combo box.

I'm using updated svn code (as there seems to be no dui release yet).
Back to top
View user's profile Send private message MSN Messenger
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Wed Jun 08, 2005 8:07 am    Post subject: Re: problem compiling on linux Reply with quote

barrett9h wrote:
I got undefined references trying to link a hello world program with dui.

The missing symbols were from ComboBox.d:
gtk_combo_box_get_wrap_width
gtk_combo_box_get_row_span_column
gtk_combo_box_set_row_span_column
gtk_combo_box_get_column_span_column
gtk_combo_box_get_popup_accessible
gtk_combo_box_set_row_separator_func
gtk_combo_box_set_add_tearoffs
gtk_combo_box_get_add_tearoffs
gtk_combo_box_set_focus_on_click
gtk_combo_box_get_focus_on_click

and ComboBoxText.d:
gtk_combo_box_get_active_text


I tried to comment out these references: the program now builds fine, but dumps core. It does not use a combo box.

do you have Gtk+ 2.6.x?
latest DUI on svn is developed with 2.6.7
OR
grad the new dynDUI from
http://svn.dsource.org/projects/dui/trunk/dyndui/
it shouldn't required 2.6.x (but I'm not sure as I have 2.6.7).

barrett9h wrote:

I'm using updated svn code (as there seems to be no dui release yet).

You're right, I have to put more hours into it.

Antonio Monteiro
Back to top
View user's profile Send private message
barrett9h



Joined: 02 May 2005
Posts: 26
Location: Brazil

PostPosted: Wed Jun 08, 2005 5:52 pm    Post subject: dynDUI to the rescue! Reply with quote

Thanks for the tip. I used dynDUI and it just worked. Funny that if I check the libraries dependencies with ldd it report no gtk (of course, it is loaded dynamically).
Does dynDUI share any code with derelict?
Back to top
View user's profile Send private message MSN Messenger
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu Jun 09, 2005 8:15 am    Post subject: Re: dynDUI to the rescue! Reply with quote

barrett9h wrote:
Thanks for the tip. I used dynDUI and it just worked. Funny that if I check the libraries dependencies with ldd it report no gtk (of course, it is loaded dynamically).
Does dynDUI share any code with derelict?

I think the dynamic loader was inspired from mango and deliric (or just mango).
John Reimer added the loader to DUI he will be able to answer that.

Antonio Monteiro
Back to top
View user's profile Send private message
barrett9h



Joined: 02 May 2005
Posts: 26
Location: Brazil

PostPosted: Thu Jun 09, 2005 9:01 am    Post subject: Reply with quote

Maybe we should have a standard loader library that is used by all..
Back to top
View user's profile Send private message MSN Messenger
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Fri Jun 10, 2005 9:20 am    Post subject: Reply with quote

barrett9h wrote:
Maybe we should have a standard loader library that is used by all..

In fact some DUI loader definition colides with a definition from phobos.

Antonio Monteiro
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Fri Jun 10, 2005 3:30 pm    Post subject: Reply with quote

Ant wrote:
barrett9h wrote:
Maybe we should have a standard loader library that is used by all..

In fact some DUI loader definition colides with a definition from phobos.

Antonio Monteiro


Yep... I've fixed that on my local version. I just had to replace all the linux dl functions in lib/loader.d with import std.c.linux.linux. These functions have just been added on the most recent version of dmd, so no need to define them manually anymore. I thought I had uploaded the fix.... I guess not. I'm also in the process of removing deprecated syntax from the project; this is fair bit of work. For now it can be compiled witht he "-d" option on dmd.

I'm still experiencing dool link problems, though. So I can't compile leds. I don't know what's wrong, but dool can't see certain phobos symbols (crc32 and getErrno, specifically). I spent a lot of time trying to fix this issue, but can't get anywhere with it. Sad So there's no way to continue debugging DUI and Leds until I can get past this.

As for where the dynamic loader code came from... It was inspired by Mango; most of the code was designed based on Mango's ICU loader. Derelict was one of the first libraries to use the dynamic loader method on D, but it follows a different, more brute force approach. Of course, derelict's presence in general was an inspiration.

Indeed there are several people putting out different variations of dynamic loaders for d in several projects; it would be beneficial if we could decide on a standard interface, but I'm not sure when or how that would happen.

-JJR


Last edited by JJR on Fri Jun 10, 2005 3:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Fri Jun 10, 2005 3:41 pm    Post subject: Reply with quote

Okay... lib/loader.d updated to remove name conflict.
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Fri Jun 10, 2005 10:46 pm    Post subject: Reply with quote

JJR wrote:
Okay... lib/loader.d updated to remove name conflict.

Thank you.
How to I do it now?
I have a ton of changes for dmd 126 but I need the new version of the loader.
Can I do svn up? will it preserve my changes?
I'm gonna read the svn docs...

Antonio Monteiro
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Fri Jun 10, 2005 10:52 pm    Post subject: Reply with quote

JJR wrote:

Yep... I've fixed that on my local version. I just had to replace all the linux dl functions in lib/loader.d with import std.c.linux.linux. These functions have just been added on the most recent version of dmd, so no need to define them manually anymore. I thought I had uploaded the fix.... I guess not. I'm also in the process of removing deprecated syntax from the project; this is fair bit of work. For now it can be compiled witht he "-d" option on dmd.

I'm still experiencing dool link problems, though. So I can't compile leds. I don't know what's wrong, but dool can't see certain phobos symbols (crc32 and getErrno, specifically). I spent a lot of time trying to fix this issue, but can't get anywhere with it. :( So there's no way to continue debugging DUI and Leds until I can get past this.

Me too! but for me dool goes fine, I had the problem when I trying to link DUITests:
first the naming conflict (I hate that) then when I replace the DUI.lib.loader declarations with the import std.c.linux.linux it couldn't find it!???

Antonio Monteiro
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Fri Jun 10, 2005 11:17 pm    Post subject: Reply with quote

Ant wrote:
JJR wrote:
Okay... lib/loader.d updated to remove name conflict.

Thank you.
How to I do it now?
I have a ton of changes for dmd 126 but I need the new version of the loader.
Can I do svn up? will it preserve my changes?
I'm gonna read the svn docs...

Antonio Monteiro


ok, I did the svn revert for the few conflits on dool, but now seems every file on dAntE is out of date. I'll continue tomorrow.
Dool and DUI are ***almost*** updated to dmd 126, I didn't try to compile them.

Antonio Monteiro
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sat Jun 11, 2005 8:35 am    Post subject: Reply with quote

Ant wrote:
JJR wrote:
Okay... lib/loader.d updated to remove name conflict.

Thank you.
How to I do it now?
I have a ton of changes for dmd 126 but I need the new version of the loader.
Can I do svn up? will it preserve my changes?
I'm gonna read the svn docs...

Antonio Monteiro


Not sure. I think it should perserve your changes. I haven't done any other changes to DUI yet (just dool, dantfw, and leds).

All you have to do is remove the extern(C) section here:
Code:

extern(C)
{
   const int RTLD_LAZY = 0x00001;      // Lazy function call binding
   const int RTLD_NOW  = 0x00002;      // Immediate function call binding
   const int RTLD_NOLOAD = 0x00004;    // No object load
   const int RTLD_DEEPBIND = 0x00008;  //
   const int RTLD_GLOBAL = 0x00100;     // Make object available to whole program
   
   void* dlopen(char*, int);
   char* dlerror();
   void* dlsym(void*,char*);
   int   dlclose(void*);
}


... within version(linux) and replace it with:

Code:
import std.c.linux.linux


I'm not sure what each of us has done to update the svn. I hope I'm not messing it up. I made a whole bunch of changes to dantfw, dool, and leds to support !is and is. Did you do the same? Sad

Dool still has link errors for me, particularly when it comes to phobos. I don't know what's wrong. It doesn't make sense that yours works and mine doesn't, other than the fact that you don't use build. Maybe build is causing these issues afterall (maybe version() isn't getting activated, I don't know). Are you still using a makefile to build everything? I may try using that to see what happens. I'm really getting tired of trying to find the problem.

-JJR


Last edited by JJR on Sat Jun 11, 2005 9:31 am; edited 4 times in total
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sat Jun 11, 2005 9:20 am    Post subject: Reply with quote

Ant wrote:
Ant wrote:
Thank you.
How to I do it now?
I have a ton of changes for dmd 126 but I need the new version of the loader.
Can I do svn up? will it preserve my changes?
I'm gonna read the svn docs...

Antonio Monteiro


ok, I did the svn revert for the few conflits on dool, but now seems every file on dAntE is out of date. I'll continue tomorrow.
Dool and DUI are ***almost*** updated to dmd 126, I didn't try to compile them.

Antonio Monteiro


You should be able to just svn update. You shouldn't have to revert because I just changed loader.d and the build scripts, nothing else (that I know of).

-JJR
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Tue Jun 14, 2005 11:13 am    Post subject: Reply with quote

JJR wrote:
I'm not sure what each of us has done to update the svn. I hope I'm not messing it up. I made a whole bunch of changes to dantfw, dool, and leds to support !is and is. Did you do the same? :-(

yep :)

JJR wrote:
Dool still has link errors for me, particularly when it comes to phobos. I don't know what's wrong. It doesn't make sense that yours works and mine doesn't, other than the fact that you don't use build. Maybe build is causing these issues afterall (maybe version() isn't getting activated, I don't know). Are you still using a makefile to build everything? I may try using that to see what happens. I'm really getting tired of trying to find the problem.
-JJR

I can compile dool (linux). What happens?
Did you get the updated from svn?
one of the files was using version(CommonUnix) before defining it.

Antonio Monteiro
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Jun 14, 2005 5:03 pm    Post subject: Reply with quote

I have no problems "compiling" dool. I have problems "linking" it with leds later on. Undefined symbol errors (with phobos) as described that I can't track down. And since dool and phobos are bothed linked in, these lost symbols don't make sense. The trouble seems to only occur on linux.

And, yes, I noticed the version(CommonUnix) problem and promptly fixed that to version(linux).

I haven't tried again in the last few days. I'm too exasperated with it to try to figure it out. If it's something simple, I'm none the wiser.

-JJR
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
Page 1 of 1

 
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