Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315602

Summary: [LTTng] Find better way to discover native library
Product: z_Archived Reporter: Andrew Overholt <overholt>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 321366    

Description Andrew Overholt CLA 2010-06-03 10:49:46 EDT
Having to set LD_LIBRARY_PATH is fragile and it makes for having to restart Eclipse with a special environment variable.  We should find a way to use, say, System.loadLibrary to get the library into a running Eclipse instance.

Note:  not for Helios.
Comment 1 Francois Chouinard CLA 2011-08-28 20:57:32 EDT
> We should find a way to use, say,
> System.loadLibrary to get the library into a running Eclipse instance.

You don't necessarily have to set LD_LIBRARY_PATH if you installed the parsing libs and ldconfig'ed your system properly.

If you didn't, then either:
- set LD_LIBRARY_PATH on startup
- add Djava.library.path=<path to lib> on your java command line
- use the feature from https://bugs.eclipse.org/bugs/show_bug.cgi?id=354541 to dynamically configure your lib path (per project though)

Is it good enough or did you have something more friendly in mind? A general preference that can be overridden per project?

Note:

We are working on integrating a full-Java parser for the upcoming LTTng 2.0 (based on CTF - Common Trace Format). It already works for the latest LTTng format but we want to extend it to support a (much) wider set of trace formats (it will be part of TMF).

It should be completed by the end of the year i.e. LTTng formats 2.3, 2.5 and 2.6 and their C-lib + JNI wrapper will soon be legacy.
Comment 2 Andrew Overholt CLA 2011-08-29 09:43:58 EDT
I'm willing to accept good documentation on the current situation in light of the forthcoming pure Java parser.
Comment 3 Francois Chouinard CLA 2011-08-29 19:06:19 EDT
(In reply to comment #2)
> I'm willing to accept good documentation on the current situation in light of
> the forthcoming pure Java parser.

It is not realistic to ask the plugin to hunt for all the native parsing libraries on the host system. It is also beyond the scope of the plugin to download, configure and install these libs for the user.

Therefore, it is OK to ask the user to let Eclipse know where the libs he just installed are located.

The wiki/UG was updated to reflect the various options available to the user to provide the parsing lib folder.

http://wiki.eclipse.org/Linux_Tools_Project/LTTng/User_Guide#Installing_the_LTTng_parsing_library
Comment 4 Francois Chouinard CLA 2011-09-28 17:28:50 EDT
Delivered with 0.8.1