wala / WALA

T.J. Watson Libraries for Analysis, with frontends for Java, Android, and JavaScript, and may common static program analyses
http://github.com/wala/WALA
Eclipse Public License 2.0
762 stars 223 forks source link

Build fails, due to error in ``./com.ibm.wala.dalvik.test/build.xml``: Copy precondition not evaluated #343

Open jgsuess opened 6 years ago

jgsuess commented 6 years ago

in ./com.ibm.wala.dalvik.test/build.xml:40 the property androiddir is set

    <condition property="androiddir" value="${env.ANDROID_HOME}"> 
          <isset property="env.ANDROID_HOME" /> 
    </condition> 

however, even if unset (i.e. no ANDROID_HOME), it is still referenced in l.68 fetchDxJar and called via dependency from getJars

    <target name="fetchDxJar">
        <mkdir dir="${basedir}/lib/"/>
        <copy
            file="${androiddir}/build-tools/26.0.2/lib/dx.jar"
            tofile="${basedir}/lib/dx.jar" force="true"/>
    </target>

leading to build failure:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project com.ibm.wala.dalvik.test: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] (dir)/WALA/com.ibm.wala.dalvik.test/build.xml:72: Warning: Could not find file (dir)//WALA/com.ibm.wala.dalvik.test/${androiddir}/build-tools/26.0.2/lib/dx.jar to copy.
[ERROR] around Ant part ...<ant antfile="(dir)/WALA/com.ibm.wala.dalvik.test/build.xml" target="getJars"/>... @ 5:94 in (dir)/WALA/com.ibm.wala.dalvik.test/target/antrun/build-main.xml
jgsuess commented 6 years ago

All of this seems to lead to dx.jar from the Android SDK. Is the SDK a prerequisite for the build? Which version?

jgsuess commented 6 years ago

It seems that the required package for Ubuntu is the Build Tools Installer. The file ends in /usr/share/java/dx.jar.

msridhar commented 6 years ago

@jgsuess can we close this? Do we need a documentation fix somewhere?