Oprofile not finding libraries - eclipse

I'm trying to use OProfile on Eclipse (3.8). The Juno version of oprofile didn't work, so I installed the Luna one. This one at least starts up, but can never find the libraries.
Here is the error:
ns3-dev-lena-profiling-debug: error while loading shared libraries: libns3-dev-lte- debug.so: cannot open shared object file: No such file or directory
profiled app exited with the following status: 127
I know that that means I need to add the library path. So I went to Profiling Tools Configurations, and specified the path under environmental variables as:
name: LD_LIBRARY_PATH
value: {workspace_loc:ns3dev2}/build (appended)
I manually checked and the library is located in the build folder. Furthermore, this library path works fine if I debug the same project instead (or run it...).
I've deleted the configuration and remade it, but it's the same error.
I also tried adding the same path to PATH instead of LD_LIBRARY_PATH, but that doesn't make any difference. (Just tried it for the hell of it).
Any thoughts?
Edit, I get the same problem on Eclipse 4.4 (Luna). I found the logs for the errors and the error is:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:33:07.200
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.

Related

Eclipse CDT 4.11.0 crashes with SWT library not found error

I am trying to get Eclipse 4.11.0 running on my RHEL 6.10 system but it crashes when I try to run it. It points me to a log file that states:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I tried running it again and it crashed again with a different log file entry:
...UnsatisfiedLinkError Could not load SWT library
It was looking for:
~/.swt/lib/linux/x86_64/libswt-pi4-gtk-4924r25.so
but the only file in that directory was libswt-pi3-gtk-4924r25.so
I also found libswt-pi3-gtk-4924r25.so in eclipse/configuration/org.eclipse.osgi/458/0/.cp.
I removed my ~/.swt directory and ran it again. Once again I got:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I noticed that it made the ~/.swt/… directory structure and put the libswt-pi3-gtk-4924r25.so file in it so I tried to run it again and it (not surprisingly) gave me the following:
...UnsatisfiedLinkError Could not load SWT library
Does this have something to do with the version of gtk that I'm running on my system? Why does eclipse include the libswt-pi3-gtk.4924r25.so library in their installation, then look for the libswt-pi4-gtk-4924r25.so library?
Installing libgthread resolved the issue for me (SLES15, GTK3).

Debugging OfBiz in Eclipse gives MissingResourceException

I downloaded the OfBiz Java application and the following line throws an MissingResourceException:
ResourceBundle res = ResourceBundle.getBundle(settingsResourceName);
The value of settingsResourceName is "cache", but I cannot find any file called cache.properties or cache_en.properties.
Where should I be looking? I'm new to Java. All my research on SO says there should be such a file.
I imported OfBiz in Eclipse using the Import menu option and selecting Existing Project from File System (I'm not in front of my dev machine so I don't remember the exact wording). But I chose the root folder of the downloaded OfBiz.
I then added the appropriate VM Arguments in the Run Configuration to get it to run properly at least. And that's it, on the first Run I got the above error. I think it has to do with a missing class path but I don't know what to add to class path.
Here is the stack trace:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.ofbiz.base.util.Debug.<clinit>(Debug.java:68)
at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:61)
at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202)
at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69)
at org.apache.ofbiz.base.start.Start.main(Start.java:84)
Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:174)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:170)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:166)
at org.apache.ofbiz.base.util.cache.UtilCache.<init>(UtilCache.java:124)
at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(UtilCache.java:769)
at org.apache.ofbiz.base.util.UtilProperties.<clinit>(UtilProperties.java:75)
... 5 more
UPDATE:
My mistake, I found two files both called cache.properties in the following folders:
ofbiz-trunk/build/resources/main
ofbiz-trunk/framework/base/config
But these are folders, not packages. I tried putting them in the .classpath but that did not work, I still kept getting the same error.
As suspected, I knew it was because of a missing reference to a class path. After looking at a section on this page: http://www.opensourcestrategies.com/ofbiz/ofbiz_eclipse.php, I learned that I was supposed to go to the Java Build Path and in the Libraries tab, click on Add Class Folder, then point that to ofbiz-trunk/framework/base/config. Which is where I have one of the cache.properties files.

netbeans cannot open shared library during RUN comm

everything worked fine but I've just tried to run my CUDA programs on Linux Ubuntu 12.10 in NetBeans and I get error:
dist/Debug/GNU-Linux-x86/my_cuda_1: error while loading shared
libraries: libcudart.so.5.0: cannot open shared object file: No such
file or directory
RUN FAILED (exit value 127, total time: 191ms)
the projects can build: compile + link without problems, I can also run it from commandline but if I try run it from NetBeans I get this error.
I was able to run it few minutes ago, what might happened?
I have added file my_lib to ld.so.conf.d containing such text:
/usr/local/cuda-5.0/lib64:/lib
/usr/lib
/usr/lib64
can it be a link issue libcudart.so.5.0 -> licudart.so?
there are two libs in cuda/lib libcudart.so.5.0 (link) and libcudart.so (link) and libcudart.so.5.0.35 (shared lib)
why it complains about .so.5.0? mayve link like:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so
is necessary
it is related to link to shared library I think
root#comp:# echo $LD_LIBRARY_PATH
/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib::/usr/local/cuda-5.0/lib64:/lib
isn't this :: a problem? seems that No because I changed this and still same error. I specify PATHS, I run ldconfig, I put exports in the .bashrc, still nothing.
the reason is that I cannot load these libraries if program is started from NetBeans GUI, however I start NetBeans as root always
add to the Project -> Properties -> Run -> Environment
Name: LD_LIBRARY_PATH
Value:
$LD_LIBRARY_PATH:/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:/lib
Thank you all. I don't know what happened before as it worked just fine.

Compiling android native app calling ndk-build from eclipse, on ubuntu

On ubuntu 11.10 I installed eclipse from repositories, installed adt and cdt plugins. I am able to compile the hello-jni example using command line, but i would like to use eclipse for the task.
I followed the guide here: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and defined a PATH variable in eclipse preferences (window->preferences->c/c++->environment), pointing to the ndk-r7b folder. But the project won't buid. I get this error:
(Cannot run program "ndk-build"
(in directory "/home/athos/android/ndk-r7b/samples/hello-jni"):
java.io.IOException:
error=2, File o directory non esistente)
(last line should be "no such file or directory" in english)
If I specify "${PATH}/ndk-build" or "/home/athos/android/ndk-r7b/ndk-build" as the build command. i get this:
/home/lavoro/android/ndk-r7b/ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package
/home/lavoro/android/ndk-r7b/ndk-build: 40: dirname: not found
or define the GNUMAKE variable to point to it.
If I define the GNUMAKE variable in window->preferences->c/c++->environment i get this:
ERROR: Your GNUMAKE variable is defined to an invalid name: /usr/bin/make
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
Which is funny, since It suggests the exact same directory I indicated. Make is installed and present at the indicated location.
What am I missing?
It's a bit ugly, but you can always put
/fully/qualified/path/to/ndk-build
In your build command.

"Error while loading manipulator"

I'm continually getting the following error under Eclipse Galileo while trying to install the WTP Web Page Editor plugin:
java.lang.IllegalStateException: Error while loading manipulator.
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:54)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:76)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:29)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:35)
at org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:129)
at org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:72)
at org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:44)
at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:54)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:389)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:61)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation.execute(ProvisioningOperation.java:37)
at org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner$1.run(ProvisioningOperationRunner.java:94)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
One blog said Eclipse Galileo doesn't play well with Java 1.6 (what??), so I've tried running Eclipse with Java 1.5 but that hasn't helped. Has anyone else had this problem and been able to get around it?
Edit BTW, below the error in the error log it also says
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null --> [R]javax.mail 1.4.0.v200905040518, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
You can try to follow the various suggestions mentioned in the bug 277242
Also check your eclipse.ini:
More generally, the error you're seeing can happen when we cannot read "-startup" since we use this to position the install.area.
As suggested by Jelle van Geuns in the comments (and confirmed by Halfstop):
I found that one MacOS there are two folders (MacOS and Eclipse) with two separate sets of configuration files.
Each had an 'org.eclipse.equinox.launcher' startup jar in the plugins sub-folder, but with slightly different versions.
The Eclipse executable resides in the MacOS folder.
But the eclipse.ini there was set up to look for the startup jar under Eclipse/plugins, but with the wrong version.
Solution that worked for me was to copy both versions of the startup.jar to both the plugins sub-folders.
Halfstop confirms:
I copied all of the what was in Eclipse to the MacOS directory and this solved it.
I just ran into this problem today. The answer provided by VonC et al helped to locate the problem but didn't quite fix it.
In my case, the location specified in -startup within the MacOS/eclipse.ini was incorrectly looking in the ../Eclipse/plugins folder rather than the ../MacOS/plugins folder.
I corrected the path and the error went away.
try to chown -R your_user_name:your_user_name /path/to/eclipe
Try edit
Eclipse/configuration/config.ini.
Make sure osgi.instance.area.default= value is right workspace. This works for me.
I'm not sure if the above answers adequately resolve this issue. I've found that, with a number of our eclipse derivative RCP products, that on some linux machines plugins will fail with log entries like this one:
!ENTRY org.eclipse.equinox.p2.engine 4 4 2017-02-23 12:00:49.492
!MESSAGE An error occurred while installing the items
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2017-02-23 12:00:49.492
!MESSAGE session context was:(profile=TIBCOBusinessStudio-4.0, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.tibco.eclipse.p2.installer 1.1.3.20161130, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2017-02-23 12:00:49.492
!MESSAGE Error while loading manipulator.
!STACK 0
java.lang.IllegalStateException: Error while loading manipulator.
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:59)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:75)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:32)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:38)
at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:183)
at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:95)
at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:75)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:159)
at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:79)
at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The reason this happens (I suspect) is that the actual file name of the config file is compared with the absolute name by the lazyloader. In my case the home dir is a symlink, so the two names don't match. The resolution was to edit the eclipse.ini (or whatever yours is called) and ensure that all the paths referencing the eclipse home dir are fully qualified and do not rely on symlinks.