You don't need to install gant. The proper gant jar is already
included in the eclim repo and is added to the classpath without any
user intervention.
> Googling shows that
> a "exec returned 1" message can be caused by a wide variety of issues,
> but none of them seemed relevant in my case. As stated, I've installed
> both ant and gant, and certainly have write access to my Eclipse home
> directory, eclim repository, and vimfiles directory. I've never used
> ant before, I thought from the first few pages of docs that everything
> is configured.
Try running ant like so:
ant -debug
Hopefully that will give us more information to work with.
> Is there some trick to getting this working on Windows?
> Can someone confirm for my sanity's sake that eclim does in fact build
> on a Windows machine?
I built the code just fine on my Windows XP vm this morning.
> I read through the developer's guide ( http://eclim.org/guides/development.html
> ) but did not notice any mention of extra steps or build setup for
> Windows. I hoped the developer docs would provide something more, but
> currently only the architecture page is there.
You shouldn't have to do anything special, just install java, ant,
eclipse, checkout eclim, run ant... that should be sufficient.
> F:\>set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_02
> F:\>cd Documents\Ben\eclim
> F:\Documents\Ben\eclim>ant
> Buildfile: F:\Documents\Ben\eclim\build.xml
> deploy:
> gant:
> BUILD FAILED
> F:\Documents\Ben\eclim\build.xml:31: The following error occurred
> while executing this line:
> : exec returned: 1
> Total time: 17 seconds
--
eric
Ah, yes that would do it. I'll be sure to add a check and raise a
helpful error rather than failing like that. If you don't want to
install git, you can instead add a .version file to the eclim root
with something like 1.7.2-dev as the content.
--
eric
Nope, I tried again with a real Git repository. Same basic error:
BUILD FAILED
C:\eclim-git\eclim\build.xml:31: The following error occurred while
executing this line:
C:\eclim-git\eclim\build.xml:130: : Directory
C:\eclim-git\eclim\build\temp\eclipse\plugins\org.eclim_'chcp' is not
recognized as an internal or external command,
operable program or batch file.
'chcp' is not recognized as an internal or external command,
operable program or batch file.
Full log attached this time.
I checked in a fix[1] to improve handling of building from a non-git
checkout.
[1] https://github.com/ervandew/eclim/commit/906c6fd3c064d8a4fa97fb9120fc1382e466e2d1
--
eric
Where is that 'chcp' coming from? What does 'git describe' return?
--
eric
The .version file was originally indented for the source distribution
tar of eclim released along with the gui installer. Since the source
distribution is not a git checkout, I added the .version file as a
means to indicate what version of eclim to build in lieu of asking git
what the current version is.
The format is just the version number to use. eclipse/osgi I think requires
at least 3 dot separated digits and at most 1 dash, so the git
describe output can be used but the first dash has to be replaced
with a dot. So on a *nix box you could mimic what the build would use
by running:
$ git describe | sed 's/-/./' > .version
which would set the .version contents to: 1.7.2.158-g906c6fd
--
eric
If you run the full command that ant is running:
cmd /c git describe
do you get the same:
'chcp' is not recognized as an internal or external command, operable program or batch file.
message that the build seems to be getting from the output?
--
eric
No, in fact, all these work:
cmd /c git describe
chcp
cmd /c chcp
cmd /c "chcp"
cmd /s /c "chcp"
chcp.com is located in C:\Windows\System32, which is on my path, so I
don't understand why this doesn't work.
I have discovered that even though the above is the case, from within
Vim, :echo system('chcp') gives the same error which terminates the
ant build.
Even this gives an error:
:echo system('C:\Windows\System32\chcp.com')
even though running the same file directly from the console works just fine.
In fact, even though this file exists in a directory listing, Vim
cannot see it at all.
I'm very confused, I'll poke at it and report back.
C:\eclim-git\eclim>dir C:\WINDOWS\system32\*.com
Volume in drive C is Local Disk
Volume Serial Number is EA9A-15F2
Directory of C:\WINDOWS\system32
02/18/2007 06:00 AM 9,216 chcp.com
02/18/2007 06:00 AM 12,288 diskcomp.com
02/18/2007 06:00 AM 9,728 diskcopy.com
02/18/2007 06:00 AM 30,720 format.com
02/18/2007 06:00 AM 43,008 mode.com
02/18/2007 06:00 AM 25,088 more.com
02/18/2007 06:00 AM 17,408 tree.com
7 File(s) 147,456 bytes
0 Dir(s) 181,770,612,736 bytes free
C:\eclim-git\eclim>"C:\Program Files (x86)\vim\vim73\vim.exe" -N -u NONE -i NONE
:r !dir C:\WINDOWS\system32\*.com
Volume in drive C is Local Disk
Volume Serial Number is EA9A-15F2
Directory of C:\WINDOWS\system32
02/18/2007 06:00 AM 29,696 format.com
02/18/2007 06:00 AM 16,384 more.com
2 File(s) 46,080 bytes
0 Dir(s) 181,772,042,240 bytes free
I tried taking ownership of the file:
http://www.howtogeek.com/howto/windows-vista/how-to-delete-a-system-file-in-windows-vista/
(note I'm on XP 64-bit, not Vista or 7)
I found a similar issue in a different project which apparently was
never resolved:
https://bugs.launchpad.net/hugin/+bug/692957
Something similar was found in git before:
http://groups.google.com/group/railsinstaller/browse_thread/thread/c3b8b51854a442aa
But in that case the user's path did not contain C:\Windows\System32,
whereas mine does.
Mostly out of desperation, I copied C:\Windows\System32\chcp.com into
my git checkout location. This fixes the chcp error!
But now there are compiler errors. See attached.
That is very odd.
I made another change[1] to the build script to log the command error,
which results in better error messages if cmd.exe attempts to run a
command not found and prevents the error output of git.cmd's attempt
to run chcp from getting pre-pended to the git describe output.
[1] https://github.com/ervandew/eclim/commit/5cf8986d5a60fc7db81a99899e3655c69bd64d69
--
eric
What version of eclipse do you have installed? According to the
eclipse source that variable was added in eclipse 3.4 (ganymede),
which was released in 2008.
--
eric
I'm using Helios.
Eclipse SDK
Version: 3.6.2
Build id: M20110210-1200
Eclipse C/C++ Development Tools
Version: 7.0.2.201102110609
Build id: 201102110609
Eclipse CDT P2 Customizations for SDK installation
Version: 1.0.0.201102110609
Build id: 201102110609
I just downloaded the Indigo "Eclipse IDE for C/C++ Developers
(includes Incubating components)" and the ant build works just fine
(although I do now have a bunch more Vim files I'm not going to be
using).
Everything seems to be working fine with this version, I was worried
some of the Eclipse plugins I use from the discovery site from my
work's tools team wouldn't work with Indigo, but so far, so good. I
understand Eclipse works fine with multiple versions installed
side-by-side so I can always switch back for specific tasks if I run
into problems.
Thanks for all your help. You may want to look into those compiler
errors for the project's sake, but technically Eclim 1.7.x *says* it
requires Indigo, maybe this is the first real reason why, and I'm good
for now.
I'm glad to here you got it all built and running after all the
problems.
> Thanks for all your help. You may want to look into those compiler
> errors for the project's sake, but technically Eclim 1.7.x *says* it
> requires Indigo, maybe this is the first real reason why, and I'm good
> for now.
It looks like the javadoc @since 3.4 on that eclipse INSTANCE variable
is a damn lie (probably due to copy and paste).
--
eric
I think my last change[1] for this problem is good enough since the
build doesn't depend on chcp.com. The error message from the git call
will be printed while building but the build should still finish
successfully.
Oh, OK, I misunderstood what the fix was. I thought you were just
making the error more friendly. That should work too, on most systems
(i.e. as long as the default cmd.exe codepage can represent all the
required characters for whatever git is using it for).