Comment 37 for bug 26436

Revision history for this message
Sjoerd Hemminga (sjoerd-hemminga) wrote :

I have been hunting this bug yesterday. It annoyed me I haven't been able to use Newton Desktop Wiki since I started using Dapper.

The Python script above reproduced the problem for me and I used this to test my solutions. Setting LD_LIBRARY_PATH to /usr/lib/firefox as is mentioned by some above and in other places did work.

gtkmozembed.so provided by python-gnome2-extras already has an RPATH set to /usr/lib/firefox, so it does not help this library. But /usr/lib/firefox/libgtkembedmoz.so has no such RPATH set.

My theory is that the crash is due to some dynamic loading of libraries by the component. Python loads gtkmozembed.so, which loads libgtkembedmoz.so which (I think) tries to load some additional libs that reside in /usr/lib/firefox. It cannot find these, because they are not in the linker's search path. Due to some missing or broken error handling, this results in a crash instead of a friendly error message. This is my theory.

I tested this by compiling Firefox (and therefore libgtkembedmoz.so) with RPATH set. This resulted in a working test case. Good. The attached patch fixes the Firefox package.

In Debian Policy RPATH is frowned upon. I don't know if this is the same in Ubuntu. Seeing that gnome-python-extras uses RPATH, I think not. But it can be a one off error. In that case, the same problem can also be solved by creating a file /etc/ld.so.conf.d/firefox.conf with /usr/lib/firefox as contents. (Run ldconfig after that.)

A good work-around while this isn't fixed is adding /usr/lib/firefox to /etc/ld.so.conf and running ldconfig.

It is interesting to note that xulrunner puts libgtkembedmoz.so and friends in /usr/lib, thereby bypassing this whole issue.

I hope this bug can be fixed before Feisty, since I would really, really like to be able to use Newton out of the box again.

I think Elliott's bug is a different one.