Trouble installing on Ubuntu

256 views
Skip to first unread message

Ben Fritz

unread,
Jul 7, 2012, 2:46:33 AM7/7/12
to eclim...@googlegroups.com
I'm trying to install from source on Ubuntu, and have never once used Eclipse on a non-Windows system before.

My problem is that I have no idea where to find the directory to use for eclipse.home.

I don't want to install eclim system-wide, especially not the cutting-edge version from git.

From talking with folks on #eclipse on freenode, I was led to believe I could define an $ECLIPSE_HOME environment variable to point to an arbitrary directory.

So I tried that, and ran ant using that directory. But Eclipse does not show eclimd anywhere in the list of views.

I was then told on #eclipse that I had wasted my time and I should not expect setting ECLIPSE_HOME in this way to work.

So, what directory DO I use for a user-specific install of eclim? Is this even possible or will I need to use sudo to install to the system-wide location? Isthat system-wide location just the location Eclipse was installed to by the software center?

Ben Fritz

unread,
Jul 7, 2012, 2:56:47 AM7/7/12
to eclim...@googlegroups.com
I've tried a new directory as I mentioned, i also tried installing to ~/.eclipse, and ~/.eclipse/org.eclipse.platform_3.7.0_155965261

Eric Van Dewoestine

unread,
Jul 7, 2012, 10:25:39 AM7/7/12
to eclim...@googlegroups.com
You should be able to do this (adjust any paths as necessary):

$ cd <ECLIM_SRC_ROOT>
$ echo "
eclipse.home=/usr/lib/eclipse
eclipse.local=$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261
" > user.properties
$ ant

The eclipse.local tells eclim where to install the eclipse plugins for
user local installs, but for everything else (building the classpath,
determining available features, etc) eclim will use eclipse.home.

There is one thing to note about this though: eclim will only detect
available eclipse features from eclipse.home, not eclipse.local. So if
you want eclim's cdt support, cdt must be installed at eclipse.home. I
plan to fix this limitation, but I haven't gotten around to it yet.

Let me know if that works and if not, let me know what the error is.

It's also worth noting that the dead simple workaround is to just
download an eclipse distribution from eclipse.org, untar it in your
home directory (no other steps necessary for installing eclipse), and
build eclim against that.

--
eric

Ben Fritz

unread,
Jul 7, 2012, 12:56:17 PM7/7/12
to eclim...@googlegroups.com


On Saturday, July 7, 2012 9:25:39 AM UTC-5, Eric Van Dewoestine wrote: 
You should be able to do this (adjust any paths as necessary): 

  $ cd <ECLIM_SRC_ROOT>
  $ echo "
    eclipse.home=/usr/lib/eclipse
    eclipse.local=$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261
    " > user.properties
  $ ant

The eclipse.local tells eclim where to install the eclipse plugins for
user local installs, but for everything else (building the classpath,
determining available features, etc) eclim will use eclipse.home.

Thanks, at least now it seems to be installing in the right location, and building the right plugins.
 
ben:~/Code/eclim$ ant
Buildfile: /home/ben/Code/eclim/build.xml

deploy:

gant:
[echo] ${eclipse}: /usr/lib/eclipse
[echo] # Skipping org.eclim.pdt, missing org.eclipse.php
[echo] # Skipping org.eclim.jdt, missing org.eclipse.jdt
[echo] # Skipping org.eclim.dltkruby, missing org.eclipse.dltk.ruby
[echo] # Skipping org.eclim.dltk, missing org.eclipse.dltk.core
[echo] # Skipping org.eclim.wst, missing org.eclipse.wst.web_ui.feature
[echo] Plugins:
[echo] org.eclim.cdt
[echo] org.eclim.python

...

------ org.eclim.python.build.vim
------ build.vim
------ build
[copy] Copying 73 files to /home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins
[exec] rm: cannot remove `/home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/eclim': No such file or directory
[exec] rm: cannot remove `/home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/eclimd': No such file or directory
[exec] Result: 1
------ deploy.eclipse

...

BUILD SUCCESSFUL
Total time: 27 seconds

ben:~/Code/eclim$ ls \~/.eclipse/org.eclipse.platform_3.7.0_155965261/
eclim eclimd features plugins

ben:~/Code/eclim$ ls \~/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins
org.eclim_1.7.6.17-g63cc023 org.eclim.vimplugin_1.7.6.17-g63cc023
org.eclim.core_1.7.6.17-g63cc023
 
There is one thing to note about this though: eclim will only detect
available eclipse features from eclipse.home, not eclipse.local. So if
you want eclim's cdt support, cdt must be installed at eclipse.home. I
plan to fix this limitation, but I haven't gotten around to it yet.

That was a trick! I had to do "sudo /usr/lib/eclipse/eclipse", add the correct discovery site, install plugins, then exit and "sudo chmod -R a+r /usr/lib/eclipse". I thought that would be easier to do...
  
Let me know if that works and if not, let me know what the error is.

I don't get an error message, and it LOOKS like everything is as it should be (as far as I know, I have no idea how Eclipse works under the hood), but still eclimd does not show in the list of views. Also, "Vim" does not show up in the "Open With" menu for source files.
 

It's also worth noting that the dead simple workaround is to just
download an eclipse distribution from eclipse.org, untar it in your
home directory (no other steps necessary for installing eclipse), and
build eclim against that.
 

I don't want to do that, I like using the package manager/software center. It is really starting to look like I'm going to need to, however. 

Ben Fritz

unread,
Jul 7, 2012, 3:00:14 PM7/7/12
to eclim...@googlegroups.com
I tried a grep for "eclim" in ~/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration, which I thought should contain some sort of entry for eclim after reading this: http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/multi_user_installs.html

There were no search hits. Was my assumption wrong, or did the install fail?

Ben Fritz

unread,
Jul 7, 2012, 3:16:03 PM7/7/12
to eclim...@googlegroups.com


On Saturday, July 7, 2012 2:00:14 PM UTC-5, Ben Fritz wrote:
I tried a grep for "eclim" in ~/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration, which I thought should contain some sort of entry for eclim after reading this: http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/multi_user_installs.html

There were no search hits. Was my assumption wrong, or did the install fail?


Oops, nevermind. I just forgot to recurse:

ben:~/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration$ grep eclim **/*
org.eclipse.equinox.simpleconfigurator/bundles.info:org.eclim,1.7.6.17-g63cc023,../../../home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.eclim_1.7.6.17-g63cc023/,4,false
org.eclipse.equinox.simpleconfigurator/bundles.info:org.eclim.cdt,1.7.6.17-g63cc023,../../../home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.eclim.cdt_1.7.6.17-g63cc023/,4,false
org.eclipse.equinox.simpleconfigurator/bundles.info:org.eclim.core,1.7.6.17-g63cc023,../../../home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.eclim.core_1.7.6.17-g63cc023/,4,false
org.eclipse.equinox.simpleconfigurator/bundles.info:org.eclim.vimplugin,1.7.6.17-g63cc023,../../../home/ben/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.eclim.vimplugin_1.7.6.17-g63cc023/,4,false
 

Ben Fritz

unread,
Jul 7, 2012, 3:40:59 PM7/7/12
to eclim...@googlegroups.com
I have a couple other plugins in my local ~/.eclipse directory, which show as installed, but their view is not available.


But that doesn't make sense, since I'm running Indigo and supposedly this was fixed in Helios. ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=322929 )

Ben Fritz

unread,
Jul 7, 2012, 3:41:21 PM7/7/12
to eclim...@googlegroups.com

Ben Fritz

unread,
Jul 7, 2012, 5:53:21 PM7/7/12
to eclim...@googlegroups.com
I posted to the Eclipse forums about this, since it doesn't seem limited to eclim:


Still, if anyone on this list has some insight, that would be awesome.

I think I'm going to download from eclipse.org and install to my user directory for now, but I'll leave the old install around to try debugging this problem if somebody picks up the forum topic and helps me through it. 

Eric Van Dewoestine

unread,
Jul 8, 2012, 3:58:58 PM7/8/12
to eclim...@googlegroups.com
It turns out my build script was halfway there with regards to
building against features installed in the eclipse.local dir. The
build script would recognize the features installed, but it wasn't
adding the eclipse.local jars to the classpath when building. I just
committed a fix[1] for that.

> > Let me know if that works and if not, let me know what the error is.
> >
>
> I don't get an error message, and it LOOKS like everything is as it should
> be (as far as I know, I have no idea how Eclipse works under the hood), but
> still eclimd does not show in the list of views. Also, "Vim" does not show
> up in the "Open With" menu for source files.

Unfortunately, eclipse can be very finicky. For some reason I never
manage to run into problems, but I do get reports from users about
new plugins no longer registering properly and requiring a fresh
eclipse install to get them working again.

I just went through the following steps on my ubuntu VM (12.04)
without any issues:

1. removed any local eclipse files so that my env is hopefully back to
a stock state ($ rm -r ~/.eclipse)
2. started eclipse as a regular user, installed CDT via eclipse's
update manager then stopped eclipse.
2. checked out and built eclim with eclipse.home and eclipse.local set
accordingly in my user.properties (the cdt feature was properly
recognized and compiled against with the latest eclim build script)
3. ran eclipse again as a regular user and I confirmed that the Eclim views
were available.

> >
> > It's also worth noting that the dead simple workaround is to just
> > download an eclipse distribution from eclipse.org, untar it in your
> > home directory (no other steps necessary for installing eclipse), and
> > build eclim against that.
> >
> >
>
> I don't want to do that, I like using the package manager/software center.
> It is really starting to look like I'm going to need to, however.

I agree that it's ideal to have the system's package manager managing
your software as it should, but unfortunately eclipse's own software
management is grotesquely complex and mixing and matching between
using the system package manager and eclipse's can make matters worse.
So even though I dislike recommending it, installing from an
eclipse.org tar tends to provide the path of least resistance.

[1] https://github.com/ervandew/eclim/commit/babc2b18f2a3c2033efbd55f95159376a6fad207

--
eric
Reply all
Reply to author
Forward
0 new messages