Thursday, November 20, 2008

segfault in libselinux

#0 0x00007f471e25281d in fini_context_translations () at setrans_client.c:211
#1 0x00007f471e2452ff in __do_global_dtors_aux () from /lib/libselinux.so.1
#2 0x0000000000413c80 in ?? ()
#3 0x00007fff2c6fade0 in ?? ()
#4 0x00007f471e2540c1 in _fini () from /lib/libselinux.so.1
#5 0x00007fff2c6fade0 in ?? ()
#6 0x00007f47244ed0e4 in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

After making some changes in my code I started getting this crash at the end of my application (during exit). No change that I made had anything to do with libselinux. I referred to this post a bit. Getting debug version of libselinux helped. But the above stack trace and the discussion in forum led me to believe this was some memory corruption that I had introduced. Running valgrind didn't help a lot.

After carefully going through all the changes, I figured out that I was now linking to the opengl library, although I hadn't enabled its use yet. When I commented it out, the crash went away. Probably the __fini__ routine of libgl was expecting some cleanup tasks from me.

Friday, November 14, 2008

freeglut Internal error

freeglut (): ERROR: Internal error <Visual with necessary capabilities not found> in function fgOpenWindow

Ran into this error while trying some opengl examples from the redbook. There are some obvious reasons for this error - like absence of 3D graphics card or driver support absent for glx. But that wasn't my case.

I could solve the problem just by replacing
glutInitDisplayMode (GLUT_SINGLE | GLUT_INDEX);

to
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGBA);


Reference thread that helped.

Thursday, November 06, 2008

scons on Maemo is old

On Maemo's latest Diablo SDK scons version is from 2004.

script: v0.96.1.D001, 2004/08/23

This breaks some scripts that would work on relatively recent scons installations.

Workaround: Install scons from source inside SDK. It's pure python code, so no architecture issues. But for some reason distutils will try to write to /scratchbox/tools/bin which has no write permissions from inside scratchbox.

So I installed inside my directory using --install-lib option of setup.py. But for scripts it would still try to write to /scratchbox/tools/bin I noticed this happens only for few executables inside scripts subdirectory. So I went outside scratchbox and 'su' copied them to those locations, chmod +x'ed them. Now they could be executed. Yet it reported that the engine was old, so I had to set SCONS_LIB_DIR to the installation in my home directory.

Wednesday, November 05, 2008

unable to set property `editable' of type `gboolean' ...

unable to set property `editable' of type `gboolean' from value of type `gchararray'

This happened when I misunderstood the parameters of TreeViewColumn->add_attribute() method. I was setting an 'editable' property to 1; whereas it should have been a boolean value.

Sunday, November 02, 2008

X--tag=CC: command not found

autotool's idiosyncrasies!

delete ltmain.sh, run autoreconf. probably happens when the libtool version is newer and you are working with old autogenerated files.

Check this too:
http://www.mail-archive.com/libtool@gnu.org/msg10248.html