Not being able to compile projects
aca20rma opened this issue · 3 comments
aca20rma commented
when I try to compile I get this Message
rashid@192 lang_1_buggy % defects4j compile
Running ant (compile)...................................................... FAIL
Executed command: cd /Users/rashid/Desktop/S2/lang_1_buggy && /Users/rashid/Desktop/S2/defects4j/major/bin/ant -f /Users/rashid/Desktop/S2/defects4j/framework/projects/defects4j.build.xml -Dd4j.home=/Users/rashid/Desktop/S2/defects4j -Dd4j.dir.projects=/Users/rashid/Desktop/S2/defects4j/framework/projects -Dbasedir=/Users/rashid/Desktop/S2/lang_1_buggy -Dbuild.compiler=javac1.7 compile 2>&1
/Users/rashid/Desktop/S2/defects4j/major/bin/ant: line 12: /Library/Internet: No such file or directory
Cannot compile sources! at /Users/rashid/Desktop/S2/defects4j/framework/bin/d4j/d4j-compile line 82.
Compilation failed in require at /Users/rashid/Desktop/S2/defects4j/framework/bin/defects4j line 195.
This is the output of my environment
rashid@192 lang_1_buggy % java -version
java version "1.8.0_361"
Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.361-b09, mixed mode)
rashid@192 lang_1_buggy % echo $JAVA_HOME
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
rashid@192 lang_1_buggy % cd ..
rashid@192 S2 % echo $JAVA_HOME
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
rashid@192 S2 % locale
LANG=""
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
jose commented
@aca20rma, could you please run the following command
cat /Users/rashid/Desktop/S2/defects4j/major/bin/ant
and paste here the output?
aca20rma commented
this is my output
#!/bin/sh
BASE="`dirname $0`/.."
if [ -z "$JAVA_HOME" ]; then
CMD="java"
else
CMD="$JAVA_HOME/bin/java"
fi
$CMD \
-XX:ReservedCodeCacheSize=256M \
-XX:MaxPermSize=1G \
-Djava.awt.headless=true \
-Xbootclasspath/a:$BASE/config/config.jar \
-jar $BASE/lib/ant-launcher.jar -Dbuild.compiler=javac1.7 $*
jose commented
You can't compile any bug because your JAVA_HOME
points to a path with empty spaces
rashid@192 S2 % echo $JAVA_HOME
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
I guess you've to quote the $CMD
on line 11, so that the command executed is
"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
instead of
/Library/Internet
Please let me know if my suggestion fixes this issue.
Additionally, I've also noticed that your major/bin/ant
file ends as
-jar $BASE/lib/ant-launcher.jar -Dbuild.compiler=javac1.7 $*
and the official one as
-jar $BASE/lib/ant-launcher.jar $*
Why have you added -Dbuild.compiler=javac1.7
to the major/bin/ant
file?