[ltt-dev] lttv-gui fails to run: libguievents.so: undefined symbol: LTTV_VIEWER_CONSTRUCTORS

Mathieu Desnoyers compudj at krystal.dyndns.org
Wed Mar 16 09:39:06 EDT 2011


* Cui, Dexuan (dexuan.cui at intel.com) wrote:
> Hi all,
> I'm a Poky (http://pokylinux.org/, an opensource tool that can build a bootable embedded Linux image) developer and when trying to run lttv-gui from the target system (emulated by qemu x86), I meet with the issue as stated in the subject.
> 
> I'm using lttv-0.12.36-18112010(I know 0.12.37 is the latest version, but I don't think it would help here) and after I cross-compile (my host's CPU is Intel Core i7 CPU and I run 32-bit Ubuntu, so this is actually the same as the target system) and install it into the target qemux86 system, I meet with the issue when running it. BTW: lttv builds and runs fine in my host environment and I only meet with the issue in target system.
> 
> In target system, I found "lttv.real -m lttvwindow" could run fine, e.g., I could see a window; but "lttv.real -m lttvwindow -m guievents" got the undefined LTTV_VIEWER_CONSTRUCTORS error.
> 
> I'm a newbie to lttv. My understanding is: LTTV_VIEWER_CONSTRUCTORS is defined in liblttvwindow.so("nm -D /usr/lib/lttv/plugins/liblttvwindow.so | grep LTTV_VIEWER_CONSTRUCTORS" does show the type of LTTV_VIEWER_CONSTRUCTORS is "B", meaning BSS section) , so after loading liblttvwindow.so, lttv.real should never get the undefined symbol issue when loading libguievents.so, but ...
> 
> BTW, I pasted the log of "lttv.real -v -e -d" at the end of the mail.
> 
> I'm debugging the issue. Any suggestion is appreciate! 

If you look at the definition of LTTV_VIEWER_CONSTRUCTORS:

modules/gui/lttvwindow/lttvwindow/init_module.c:

__EXPORT LttvTraceInfo
	[...]
	LTTV_VIEWER_CONSTRUCTORS,

(LttvTraceInfo is actually a GQuark)

So it is defined in liblttvwindow.so. The problem seems to come because,
in your case, guievent cannot see the symbols defined in lttvwindow. But
lttvwindow should make these symbols global and visible by other
libraries (they don't have any of the gcc hidden, protected or internal
visibility attributes, as listed there
(http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html). It should
be default.

As we see with

ltt/compiler.h:#define __EXPORT __attribute__ ((visibility ("default")))

The default visibility is used.

But I guess there might be something wrong with the symbol visibility in
your lttvwindow.so. You might want to double-check that. Maybe it's a
modified linking stage that hides this symbol.

Good luck with your investigation,

Mathieu

> 
> Thanks!
> 
> -- Dexuan 
> 
> root at qemux86:~# cat /usr/bin/lttv-gui
> #!/bin/sh
> # -* sh *-
> 
> # This is a simple script that starts lttv with default GUI modules
> # Mathieu Desnoyers 15-09-2005
> 
> LTTV_CMD=`echo $0 | sed 's/-gui$//'`
> 
> $LTTV_CMD.real -v -e -d -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview \
>     -m guistatistics -m guitracecontrol
> 
> root at qemux86:~# lttv-gui
> ** INFO: Logging set to include INFO level messages
> ** INFO: Option edebug encountered
> ** INFO: Output event detailed debug
> ** INFO: Option debug encountered
> ** INFO: Logging set to include DEBUG level messages
> ** INFO: Option module encountered
> ** (process:456): DEBUG: Option module hook called
> ** INFO: Load library lttvwindow
> ** INFO: Try path /usr/lib/lttv/plugins/liblttvwindow.so
> ** INFO: Library lttvwindow (/usr/lib/lttv/plugins/liblttvwindow.so) loaded
> ** INFO: Module state: init()
> ** INFO: Module stats: init()
> ** INFO: Module sync: init()
> ** (process:456): DEBUG: Sync init
> ** INFO: Add option sync
> ** INFO: Add option sync-stats
> ** INFO: Add option sync-null
> ** INFO: Add option sync-analysis
> ** INFO: Add option sync-reduction
> ** INFO: Add option sync-graphs
> ** INFO: Add option sync-graphs-dir
> ** INFO: Add option eval-rtt-file
> ** INFO: Module lttvwindow: init()
> ** (process:456): DEBUG: GUI init()
> ** INFO: Add option trace
> ** INFO: Unload library lttvwindow: module lttvwindow used
> ** (process:456): DEBUG: Option verbose rescanned, skipped
> ** (process:456): DEBUG: Option edebug rescanned, skipped
> ** (process:456): DEBUG: Option debug rescanned, skipped
> ** (process:456): DEBUG: Option module rescanned, skipped
> ** INFO: Option module encountered
> ** (process:456): DEBUG: Option module hook called
> ** INFO: Load library guievents
> ** INFO: Try path /usr/lib/lttv/plugins/libguievents.so
> ** INFO: Trial failed, /usr/lib/lttv/plugins/libguievents.so: undefined symbol: LTTV_VIEWER_CONSTRUCTORS
> ** INFO: Try path libguievents.so
> ** INFO: Trial failed, /usr/lib/libguievents.so: undefined symbol: LTTV_VIEWER_CONSTRUCTORS
> ** INFO: Failed to load guievents
> 
> ** ERROR **: Cannot load library guievents: /usr/lib/lttv/plugins/libguievents.so: undefined symbol: LTTV_VIEWER_CONSTRUCTORS
> /usr/lib/libguievents.so: undefined symbol: LTTV_VIEWER_CONSTRUCTORS
> 
> aborting...
> Aborted
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list