Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gdb patch
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Syllable Forum Index -> Syllable Desktop
View previous topic :: View next topic  
Author Message
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Wed Sep 19, 2007 6:22 pm    Post subject: gdb patch Reply with quote

Hey guys,

I just patched gdb quickly, so that those osabi.c errors would disappear (I mentioned this for debugging libpurple on the old forums). This is a very small unified patch for the toplevel dir:

http://pages.cpsc.ucalgary.ca/~wilsonk/gdb-6.4.diff

Thanks,
K.Wilson

P.S. I tested it with a little SDL game called alienBlaster, which runs nicely. I have made a recipe for this game, so I can post that as well, if you want.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2207
Location: Friesland

PostPosted: Wed Sep 19, 2007 6:53 pm    Post subject: Reply with quote

Thanks! Yes, please.
Back to top
View user's profile Send private message Visit poster's website
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Wed Sep 19, 2007 10:01 pm    Post subject: Reply with quote

Ok Kaj,

I tested the alienblaster-1.1.0 recipe and patch using build so things should work. This is a cool little shoot-em up game. Let me know if I did something wrong. Here is the tar file of the recipe and patch:

http://pages.cpsc.ucalgary.ca/~wilsonk/alien.tar

Thanks,
K.Wilson
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Thu Sep 20, 2007 12:50 am    Post subject: Reply with quote

Thank you so much for doing that, it is greatly appreciated.
Back to top
View user's profile Send private message Send e-mail
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2207
Location: Friesland

PostPosted: Thu Sep 20, 2007 6:57 am    Post subject: Reply with quote

That looks excellent, Kelly. I will only have to clean up a few small things.
Back to top
View user's profile Send private message Visit poster's website
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Thu Sep 20, 2007 9:30 pm    Post subject: Reply with quote

Hey Kaj, Vanders et al.

Does anyone know when or why fcntl(file_descr, F_GETFL); would ever return a value of 511???? I mean errno.h has been modified for syllable and has some return values like ERSTARTSYS (512) but there is no 511, that I can see.

The reason I am asking is that a call to fcntl() inside glib-2.12.10 is returning 511. This is then ANDed with (O_RDONLY | O_WRONLY | O_RDWR). Since the errno is 511 then the ANDed result is equal to 3 which causes an assertion in glib. I have produced a work-around for this problem but I still didn't find the cause. The use of the fixed gdb helped me find this.

Libpurple willl compile as before and finch will start up with a proper startup screen but I have other problems now. The problem I have is that the configure script isn't handling Syllable very well, as far as dynamic libraries are concerned. Finch can't find the libpurple protocols because they aren't dynamically built. Other libs I have built end up being dynamic so things should work, but I am unfortunately not a configure expert.

Is there an common autogen.sh file that I can use to generate a proper Syllable configure script? I will keep plugging away at it manually, but this is getting time consuming, darnit!

Thanks,
K.Wilson
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Fri Sep 21, 2007 12:56 am    Post subject: Reply with quote

[quote="wilsonk"]Hey Kaj, Vanders et al.
Does anyone know when or why fcntl(file_descr, F_GETFL); would ever return a value of 511????
[/quote]

No. Do you have a copy of the "broken" libpurple I can use to debug this?

Edit: My simple test case (open() followed by fcntl( fd, F_GETFL )) shows no problems, so it's probably a more complex set of conditions that cause it. I won't know until I can strace a "broken" libpurple.

[quote]
Is there an common autogen.sh file that I can use to generate a proper Syllable configure script? I will keep plugging away at it manually, but this is getting time consuming, darnit!
[/quote]

Builder can do all of this for you :) The
[code:1]
make-shared
[/code:1]
directive will patch libtool etc. and re-gen configure to recognise Syllable.
Back to top
View user's profile Send private message Send e-mail
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Fri Sep 21, 2007 4:07 pm    Post subject: Reply with quote

Hey Vanders,

I didn't realise that build could do all that! I am having some problems now, though. Here is my recipe:

authors
Kelly Wilson
status testing

headline Pidgin IM framework
description Pidgin is a cross platform IM framwork
licenses GPL

home www.pidgin.im
packages pidgin-2.1.1

needs
ncurses
xml2
recommends openssl

cpu i586

make-shared

configure-cmd export PKG_CONFIG_PATH='/usr/glib/lib/pkgconfig:/usr/lib
xml2/lib/pkgconfig:/usr/openssl/lib/pkgconfig'; configure

configure-options
--with-gnu-ld
--disable-gtkui
--disable-screensaver
--disable-sm
--disable-gtkspell
--disable-gevolution
--disable-gstreamer
--disable-fortify
--disable-tcl
--disable-plugins
--with-ncurses-headers=/usr/local/include/ncurses
--disable-nss
--with-glib-lib=/usr/glib/lib
--with-screen=ncurses
--disable-startup-notification
--disable-libtool-lock
--enable-debug

documentation
README NEWS PLUGIN_HOWTO COPYRIGHT COPYING AUTHORS CHANGELOG INSTALL

But I get the following errors when issuing the build command:
.
.
.
Enabling shared libraries

cp /usr/libtool/share/libtool/ltmain.sh .

aclocal -I /usr/libtool/share/aclocal
aclocal:configure.ac:140: warning: macro `AM_GLIB_GNU_GETTEXT' not found in libr
ary

automake

autoconf
configure.ac:76: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:107: error: possibly undefined macro: AC_PROG_INTLTOOL
configure.ac:121: error: possibly undefined macro: AC_DEFINE
configure.ac:128: error: possibly undefined macro: AC_MSG_RESULT
configure.ac:140: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
configure.ac:271: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:2035: error: possibly undefined macro: AM_PATH_CHECK

Error: 1

Error: Source not (completely) installed

sync

Is this a problem with build or did I do something wrong?

Thanks,
K.Wilson
Back to top
View user's profile Send private message
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Fri Sep 21, 2007 4:08 pm    Post subject: Reply with quote

OOOPPSS,

That previous posting seems to have lost its formatting for the recipe file...there is some whitespace in there Wink

K.Wilson
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2207
Location: Friesland

PostPosted: Fri Sep 21, 2007 4:39 pm    Post subject: Reply with quote

Unfortunately, make-shared doesn't work with all packages. You can try some variations of the commands executed, for example leaving aclocal and automake out. If you find a working sequence, you can put them in the patch directive.

If you get through it, you will get an error on configuring. Your configure-cmd is wrong: this directive is only for pointing to a configure command with a non-standard name or location. Plugging in shell commands is done with the configure directive. But you should only override configure as a last resort. In this case, Builder doesn't have the chance any more to put the package in the proper place in /usr/, for example.

You can use the configure-env directive to set environment variables. Look in the skeleton.recipe for the syntax.

Your recipe looks good otherwise. Just a few remarks. If your recipe is called pidgin-2.1.1, you don't need the packages directive. The cpu directive isn't implemented yet, and should normally not be used. Most of your configure-options should not be necessary. If you do point to the NCurses headers explicitly, you should point to /usr/ncurses/include(/ncurses).

The general idea of recipes is to leave as much control as possible to Builder.
Back to top
View user's profile Send private message Visit poster's website
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Fri Sep 21, 2007 5:01 pm    Post subject: Reply with quote

Hey Kaj,

Yeah, I did get an error on configure...thanks for the note. I will take out the packages and cpu directives. I know that ncurses should be under /usr/ncurses....it just isn't on my system (yet) because I had to hand roll dynamic libs for ncurses (which was a problem, so I just let the ncurses scripts put the darn thing wherever it wanted to).

I will check out the skeleton recipe and see if I can make something work as far as leaving out the automake and/or aclocal commands out.

Thanks,
K.Wilson
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Sat Sep 22, 2007 3:37 am    Post subject: Reply with quote

At a guess, the individual steps you require are:

cp /usr/libtool/share/libtool/ltmain.sh .
aclocal -I /usr/libtool/share/aclocal -I /usr/gettext/share/aclocal
automake
autoconf
Back to top
View user's profile Send private message Send e-mail
cau0730
Guest





PostPosted: Sat Sep 22, 2007 6:10 am    Post subject: Reply with quote

I was working on libpurple at one point too and this is where I got stuck at first. Try exactly what Vanders has suggested and get back to us if there are any errors.
Back to top
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2207
Location: Friesland

PostPosted: Sat Sep 22, 2007 6:10 am    Post subject: Reply with quote

I would try

aclocal -I /usr/indexes/share/aclocal

That way you get all installed aclocal macros.
Back to top
View user's profile Send private message Visit poster's website
wilsonk



Joined: 14 Sep 2007
Posts: 76

PostPosted: Sun Sep 23, 2007 4:16 am    Post subject: Reply with quote

All right everyone,

There is a new recipe at:

http://pages.cpsc.ucalgary.ca/~wilsonk/pidgin-2.1.1.recipe

That should build libpurple (with a lot of stuff turned off). Using this build Vanders should be able to debug finch for the fcntl() problem (if you want my small patch for glib-2.12.10 then let me know...it is just a cheat though).

I have gotten a dynamic version of pidgin to build as well using:

cp /usr/libtool/share/libtool/ltmain.sh .
aclocal -I /usr/indexes/share/aclocal
automake
autoconf

Autoconf gives one error about AC_GET_INTLTOOL or some such. There is also one line near the end of the main Makefile containing "@[email protected]" that needs to be deleted. Then some things will build but you may have to add a couple libraries manually to the Makefiles to get things built. This gave me dynamic irc and msn libs and a finch executable but there are still problems with 'make install' for the dynamic stuff. It seems like I need libpurple.so first but the Makefile is trying to make recursive first? Things die in libpurple/protocols/irc so I just manually made the libpurple.la in the libpurple dir and then continued (the 'make install' command has this same recursion problem though).

"build install pidgin-2.1.1" should work for the static finch but you also may need a proper ~/.purple/ directory set up. What I did was run finch under linux and copy the directory over to Syllable. Then I could get things to work as far as keys etc. but I couldn't connect to IRC...I still think it is looking for a dynamic lib for IRC. Actually the Esc-* keys don't really work properly because any new windows only flash on the screen (these should be Alt-* keys but most Alt-* combinations are already assigned on the Syllable terminal). I haven't tried a new ~/.gntrc file to re-assign key combo's, but I will.

Anyways, that is as far as I have gotten so far (I tried about ten other combinations but this seems to have worked the best, so far Wink

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

 
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