Thursday, January 26, 2006

Foundation

After some efforts, I had everything compiled -- ffcall, foundation, appkit, etc. for the nokia. But then my test program crashed :-)

Removing extra libs (hm.. ffcall.. :-/ ) I have something working though: Foundation !

[ note that I got the NXConstantString error, so it looks like library loading order matters (lobjc / lgnustep-base)... changing the ordering in the makefiles make it works though ]

Now.. I compiled gnustep-gui and gnustep-back, both with xlib and art. But the xlib backend crash (it can't find any available font on the nokia apparently..), and the art backend (after some efforts -- #ifdef XSHM to get rid of any XShm calls...) "nearly" works: with my test application (a simple info panel) it displays a window, but without any content (plain white), and complains about bad window... Yet it seems to receive events (I can click on the invisible buttons ;-) so it looks like some art display problem, perhaps just because the nokia uses a non conventional color ordering / depth.

Well I need to come back on ffcall and check if it's the culprit or not for the crashing thing -- having ffcall won't be bad for the gui :-) and try to understand what's wrong with backart... but all in all things progress ;-)

ah, I also did a very stupid mistake the other day, compiling gcc for arm-softfloat. Naively I thought you needed a soft fp implementation, as the arm doesn't have a hardware fp. But what I didn't know is that there's two kind of soft fp -- kernel and softfloat. Worse, you can't link binaries compiled with different fp emulation. And of course, the nokia is compiled with kernel fp emulation, not arm-softfloat.. So I was good for recompiling gcc ...

Though, one good thing is that with arm-softfloat ffcall didn't compile at all (seems that the asm bits of ffcall uses the fp registers for the arm platform), while now it compiles (but as I said it seemed to be the cause of the program's crash, so it's perhaps not as encouraging as it seems ^_^ -- although I need to double-check and recompile things nicely). Considering libffi closures don't work on the arm, if ffcall works that's a good thing :)

Anyway as soon as I have something working decently I'll post a full guide to cross-compile GNUstep on the nokia (and probably some binary packages too if you just want to install it on the nokia).

2 comments:

Anonymous said...

Peu de temps après avoir découvert le Nokia 770, j'ai re-découvert GNUStep (qui marche bien maintenant). Et tout de suite je me suis dit que ces deux là sont faits pour être ensemble ! Je suis vraiment ravi de voir que quelqu'un de compétent (contrairement à moi) se lance dans l'aventure. Félicitations !
J'en profite pour faire deux suggestions : mGStep (http://home.pcmagic.net/far/) et QuantumStep (http://www.quantum-step.com/). Si ça peut aider...

Keep on ! :-)

Nicolas said...

Xav: j'ai un peu discuté avec Nikolaus Schaller (qui travaille sur QuantumSTEP,) durant le fosdem (mais pas assez), et il a l'air de progresser pas mal de son côté... et moi il faut que je réinstalle maemo pour rebosser sur ce port ;-) (parce que ce serait quand même bien sympa !)

voir http://xdev.org/fosdem2006/ pour la vidéo de la présentation de nikolaus au fosdem..