Thursday, October 25, 2007

Berkeley db and libstldb4 for s60

It turns out the problem I was having with bdb on s60/openc was that the default stack size is very small (by desktop standards). Adding EPOCSTACKSIZE 65536 to the mmp file of the test client made things work as one would expect when the sis file is installed on the device itself.

If your stack is too small then the application just magically goes away on the device and you are left wondering why. Not only that but if the function that smashes the stack with auto variables is tracked down you will have a function that, once entered, will have a corrupt stack right from the start. Functions like open(2) will not work properly because things are already on their way to the bit bucket. These sorts of things take a while to track down when you are used to stacks that adjust their size when they get full.

So, long and the short, stldb4 now works on s60/openc :)

I notice that there is also SDL for symbian which when taken together with the fact that evas has a backend engine for SDL makes edje/evas GUIs for desktop and s60 seem like a good choice. Being able to debug the look and feel of the app on a desktop using a window of device size and then just running the edje on the s60 to see if any special effects run fast enough.

6 comments:

alvaro said...

hiya... seeing that you have been working with openc, would you happen to know if the source code to glibbackend (used in libglib) is available somewhere? thanks.

monkeyiq said...

There is glibbackend.h in the main glib.zip that nokia distributes. The glib drop itself is quite an interesting source of portability workarounds with things like poll() being able to be yanked out of it. Strange that they didn't just implement poll() at the PIPS/OpenC level though.

alvaro said...

yeah, i did find the glibbackend.h header in glib.zip, but there is no implementation for it. libglib links against glibbackend.lib, which is what i'm looking for. any ideas? thank.

monkeyiq said...

Ah I see now... there is a libglib/group/glib.mmp which makes reference to the backend lib file but nothing in the sources tree to actually build that library. Very sneaky of Nokia by the looks of things. Though looking at the backend header file and lowmem.h it appears that they have some s60 type function calls in there rather than anything to do with glib2 itself. Though I'm failing to find references quickly to non win32 sites for most of the API listed in backend.h. I notice appiicationpath() which has such a charming typo that it leads me to think that backend.lib might be some glue that nokia would rather not release.

alvaro said...

that's what i was thinking too (nokia not wanting to release this glue) :( i was particularly interested in it, as i wanted to build libglib myself and use it on uiq.

alvaro said...

i'm literally just starting to dig into libglib's port/openc. is there a place where i may successfully bug someone about the missing source? forum nokia? thanks!