barry-m / checker-framework

Automatically exported from code.google.com/p/checker-framework
Other
0 stars 0 forks source link

Cannot build checker-framework under Windows #254

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow build instructions found at 
http://types.cs.washington.edu/checker-framework/current/checkers-manual.html#bu
ild-source
2. Step "25.3.4  Build the Checker Framework" fails with:

C:\Users\Gili\Documents\jr308\checker-framework\checkers\build.xml:188: java.io.
IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_40\jre\bin\java.
exe": CreateProcess error=206, The filename or extension is too long

3. You can fix this by searching for ${src.files.spaceseparated} and using the 
@options syntax with the <java> command as follows:

    <echo message="${src.files.spaceseparated}" file="srcfiles.txt"/>
        <java fork="true"
              failonerror="true"
              classpath="${javac.lib}:${javaparser.lib}:${javacutils.lib}:${dataflow.lib}:${tests.junit}"
              classname="com.sun.tools.javac.Main">
            <jvmarg line="-Xbootclasspath/p:${javac.lib}"/>
            <arg value="-g"/>
            <arg line="-sourcepath ${src}"/>
            <arg line="-d ${build}"/>
            <arg line="@srcfiles.txt"/>
            <arg line="-version"/>
            <arg line="-XDTA:noannotationsincomments"/>
            <arg line="-Xlint"/>
            <arg line="-Werror"/>
        </java>
        <delete file="srcfiles.txt"/>

4. Build fails with:

C:\Users\Gili\Documents\jr308\checker-framework\checkers\build.xml:791: Execute
failed: java.io.IOException: Cannot run program "make": CreateProcess error=2, T
he system cannot find the file specified

There is no workaround because Windows does not have make. You will need to 
find an alternative for building under Windows.

Original issue reported on code.google.com by cow...@bbs.darktech.org on 15 Sep 2013 at 10:22

GoogleCodeExporter commented 9 years ago

Original comment by cow...@bbs.darktech.org on 15 Sep 2013 at 10:26

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for that patch, I'll look at integrating it.

Building on Windows is currently not supported. You should be able to use 
Cygwin to get make, but there are probably other problems lurking.

One related problem is 
https://code.google.com/p/annotation-tools/issues/detail?id=39 which prevents 
us from building the annotated JDK on Windows.
Once we have annotation-tools support on Windows, it should be easy to convert 
the Makefiles to Ant scripts.

Original comment by wdi...@gmail.com on 15 Sep 2013 at 10:31

GoogleCodeExporter commented 9 years ago
The command-line length issue is fixed for the three main projects:
https://code.google.com/p/checker-framework/source/detail?r=fc1f757743e3

I didn't see similar code in the javaparser build. Let's see whether the 
problem also shows up there.

Original comment by wdi...@gmail.com on 15 Sep 2013 at 10:55