Bug #6829

ant change-to fails under Windows Server 2012 R2 with Cygwin

Added by Christopher Brooks over 3 years ago. Updated over 3 years ago.

build system
Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:


Under Windows Server 2012 R2 with Cygwin, I ran

mkdir kepler.modules
cd kepler.modules
svn co
cd build-area

and then ant change-to failed:

$ ant change-to -Dsuite=kepler
Buildfile: C:\Users\cxh\src\kepler.modules\build-area\build.xml

[change-to] Copying 1 file to C:\Users\cxh\src\kepler.modules\build-area
[change-to] Retrieving modules....
[change-to] kepler:
[change-to] Downloading (if necessary) kepler...
[change-to] svn co -r head C:\Users\cxh\src\kep\
[change-to] svn: E000002: Can't make directory '/cygdrive/c/Users/cxh/src/kepler.modules/build-area/C:\Users\cxh\
\src\kepler.modules\kepler': No such file or directory

C:\Users\cxh\src\kepler.modules\build-area\build.xml:104: ERROR: It appears that the command did not execute pro\
perly and exited with an exit code of: 1

Total time: 1 second

cxh@AMPERE ~/src/kepler.modules/build-area

I can give out accounts on if necessary.


#1 Updated by Daniel Crawl over 3 years ago

  • Target version set to 2.5.0

I can reproduce on Windows 7 and will fix this.

#2 Updated by Daniel Crawl over 3 years ago

  • Priority changed from Normal to Low

This looks like a problem with Cygwin, not Kepler since Kepler is using the correct path.

Apparently, this command has not worked on Cygwin for any of the Kepler 2.x releases, so I'm inclined to lower the priority.

#3 Updated by Christopher Brooks over 3 years ago

I don't agree that this is a low priority bug because it means it could mean that it is not possible to build Kepler under Windows. This used to work under Cygwin, I was able to run it for previous Kepler 2.x releases. I'm not sure what changed.

Building under Eclipse requires running svn and ant, it could be possible to do this from the DOS cmd shell, someone should check.

If we can't build Kepler under Windows then we will not be able to create Windows installers.

#4 Updated by Daniel Crawl over 3 years ago

You can definitely build Kepler on Windows in the cmd shell. Ant and svn need to be in your $PATH.

This problem is due to Cygwin not correctly handling paths. I just tried ant change-to under Cygwin for Kepler 2.0, 2.3, and 2.4, and they all failed...

You can build the Windows installer on Linux (and probably Mac). I did this for Kepler 2.4.

#5 Updated by Christopher Brooks over 3 years ago

Ok, good that we can build the development tree under cmd.

Not being able to build under Cygwin is a bit embarrassing and sends a message that Kepler is not serious about being developed under Windows.

Personally, I'm tempted to drop support for Windows because it is very difficult to use Windows to develop outside of the Microsoft tool set. Eclipse does ok, but the svn integration is problematic.

The Kepler community seems to be mostly Mac or Linux these days. The fact that no one has complained about this issue indicates that there are very few, if any, Kepler developers under Windows.

That said, there is a large community of Windows users out there...

#6 Updated by Daniel Crawl over 3 years ago

I suspect there is plenty of development under Windows that does not use Cygwin. :)

In any case, I'm willing to update Kepler to get this working, but it's not clear how since the paths returned by Java File objects under Cygwin are of the form "C:\...". Does every File path have to be run through the cygpath program? It would be impractical to do this for every File object used in Kepler.

#7 Updated by Christopher Brooks over 3 years ago

To handle \, I had pretty good results with doing a simple substitution.

You could also create URLs and go back and forth between File and URLs, converting to URIs as needed.

It used to be possible run ant change-to under Cygwin, so it could be that not that many changes are necessary.

A big issue in Cygwin is that the 'pwd' command could return something that starts with "/cygdrive". However, commands like Java don't typically understand that syntax. A common mistake under Ptolemy and Windows is to do

export PTII=`pwd`

Under Cygwin, this will give you something like /cygdrive/c/Users/cxh/src/ptII, which will not work with Java. $PTII/configure and ptolemy.util.StringUtilities both check for this.

#8 Updated by Daniel Crawl over 3 years ago

This issue is dependent on which svn is used. If a non-Cygwin svn is used, the paths do not have to be rewritten.

#9 Updated by Daniel Crawl over 3 years ago

  • Assignee changed from Daniel Crawl to Christopher Brooks

I implemented a fix. Reassigning to Christopher to verify.

#10 Updated by Christopher Brooks over 3 years ago

  • Status changed from New to Closed


I was able to build and run under Windows using Cygwin's svn 1.8.11.

Closing this one.

Also available in: Atom PDF