[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mozembed segfaults – library path woes?



Dear gtk2hs developers,

I built the mozembed package after a small change (see Marco’s mail).
Building, linking etc. works fine, but the resulting mozembed binary
fails:

$ ./testembedmoz /etc/passwd
Speicherzugriffsfehler

$ gdb -ex run -ex bt ./testembedmoz 
GNU gdb (GDB) 7.1-debian
Reading symbols from /home/jojo/build/gtk2hs/gtk2hs-0.10.1/demo/mozembed/testembedmoz...(no debugging symbols found)...done.
Starting program: /home/jojo/build/gtk2hs/gtk2hs-0.10.1/demo/mozembed/testembedmoz 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6e14799 in ?? () from /usr/lib/xulrunner-devel-1.9.1/lib/libxul.so
#0  0x00007ffff6e14799 in ?? () from /usr/lib/xulrunner-devel-1.9.1/lib/libxul.so
#1  0x00007ffff6e131ad in ?? () from /usr/lib/xulrunner-devel-1.9.1/lib/libxul.so
#2  0x00007ffff371547e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007ffff372acd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007ffff372ca86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff372cfd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007ffff5788217 in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007ffff5788a78 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007ffff5798c42 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007ffff371547e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff372acd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff372ca86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff372cfd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff5788a4e in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff5798d84 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff371547e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff372acd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff372ca86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff372cfd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff57891cb in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x0000000000472274 in sdLH_info ()
#21 0x00007fffffffa1d0 in ?? ()
#22 0x00007ffff7ded74d in ?? () from /lib64/ld-linux-x86-64.so.2
#23 0x00007ffff7dee0c6 in ?? () from /lib64/ld-linux-x86-64.so.2
#24 0x00007ffff7dec992 in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) 

Any idea what is wrong? Is the demo working for you?

Note that I did not pass an argument, so it does not even get to the
mozEmbedRenderData call.


Trying to run the code in ghci fails:

Prelude Graphics.UI.Gtk Graphics.UI.Gtk.MozEmbed>   mozEmbedSetCompPath mozEmbedDefaultCompPath
Loading package mozembed-0.10.1 ... can't load .so/.DLL for: xpcom (libxul.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden)

Maybe loading libs with ghci does not adhere to the rpath property set
in HSmozembed.o. But at least the library-path in “ghc-pkg describe
mozembed” should be followed? LD_LIBRARY_PATH does not seem to help here
either. Strange.

Even stranger:
$ ghci -package mozembed
GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
[..]
Loading package gtk-0.10.1 ... linking ... done.
Loading package mozembed-0.10.1 ... <command line>: can't load .so/.DLL for: xpcom (libxul.so: cannot open shared object file: No such file or directory)

So, when loading /usr/lib/xulrunner-devel-1.9.1/lib/libxpcom.o, which
needs libxul.so, it is not found in that directory. Maybe the problem
lies somewhere else:
$ ldd /usr/lib/xulrunner-devel-1.9.1/lib/libxpcom.so
	linux-vdso.so.1 =>  (0x00007fffddbfa000)
	libxul.so => not found
	libc.so.6 => /lib/libc.so.6 (0x00007f98bcd4d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f98bd2c9000)

But still: Does it work for you?

Thanks,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: