Open arjunvadapalli opened 8 years ago
There is .github directory but no .git directory.
To build htsjdk from source, you first need to clone the htsjdk github repository using the "git clone" command, and then run gradle within your clone.
Quoting from #660:
Failing to build if the .git directory isn't found is a known issue ( #636 ). We thought it was very low priority, but it's an easy fix so if it's causing problems we can definitely address that.
So, why does this happen if I start from https://github.com/samtools/htsjdk/archive/htsjdk-2.5.1.tar.gz file?
>>> Emerging (26 of 101) dev-java/htsjdk-2.5.1::science
* htsjdk-2.5.1.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
* Using: oracle-jdk-bin-1.8
>>> Unpacking source...
>>> Unpacking htsjdk-2.5.1.tar.gz to /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work
>>> Source unpacked in /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work
>>> Preparing source in /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1 ...
>>> Source prepared.
>>> Configuring source in /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1 ...
Rewriting attributes
Rewriting ./build.xml
>>> Source configured.
>>> Compiling source in /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1 ...
Downloading https://services.gradle.org/distributions/gradle-2.13-bin.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13-bin.zip to /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7
Set executable permissions for: /scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13/bin/gradle
Download https://plugins.gradle.org/m2/gradle/plugin/com/palantir/gradle/gitversion/gradle-git-version/0.5.1/gradle-git-version-0.5.1.pom
Download https://plugins.gradle.org/m2/com/github/jengelman/gradle/plugins/shadow/1.2.3/shadow-1.2.3.pom
Download https://repo1.maven.org/maven2/org/kt3k/gradle/plugin/coveralls-gradle-plugin/2.6.3/coveralls-gradle-plugin-2.6.3.pom
Download https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/4.1.1.201511131810-r/org.eclipse.jgit-4.1.1.201511131810-r.pom
Download https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit-parent/4.1.1.201511131810-r/org.eclipse.jgit-parent-4.1.1.201511131810-r.pom
Download https://repo1.maven.org/maven2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.pom
Download https://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
Download https://repo1.maven.org/maven2/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
Download https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.pom
Download https://repo1.maven.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.pom
Download https://repo1.maven.org/maven2/org/apache/ant/ant-parent/1.9.4/ant-parent-1.9.4.pom
Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-backports-compat23/2.4.4/groovy-backports-compat23-2.4.4.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.3/httpcomponents-client-4.3.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/project/7/project-7.pom
Download https://repo1.maven.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom
Download https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
Download https://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3/httpclient-4.3.pom
Download https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.3/json-lib-2.3.pom
Download https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.pom
Download https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.pom
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Download https://repo1.maven.org/maven2/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.pom
Download https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.53/jsch-0.1.53.pom
Download https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/6/oss-parent-6.pom
Download https://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.2/slf4j-parent-1.7.2.pom
Download https://repo1.maven.org/maven2/org/eclipse/jdt/org.eclipse.jdt.annotation/1.1.0/org.eclipse.jdt.annotation-1.1.0.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.3.6/httpcomponents-client-4.3.6.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.3.3/httpcomponents-core-4.3.3.pom
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.pom
Download https://plugins.gradle.org/m2/gradle/plugin/com/palantir/gradle/gitversion/gradle-git-version/0.5.1/gradle-git-version-0.5.1.jar
Download https://plugins.gradle.org/m2/com/github/jengelman/gradle/plugins/shadow/1.2.3/shadow-1.2.3.jar
Download https://repo1.maven.org/maven2/org/kt3k/gradle/plugin/coveralls-gradle-plugin/2.6.3/coveralls-gradle-plugin-2.6.3.jar
Download https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/4.1.1.201511131810-r/org.eclipse.jgit-4.1.1.201511131810-r.jar
Download https://repo1.maven.org/maven2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.jar
Download https://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Download https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
Download https://repo1.maven.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar
Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-backports-compat23/2.4.4/groovy-backports-compat23-2.4.4.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.jar
Download https://repo1.maven.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.jar
Download https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
Download https://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar
Download https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.3/json-lib-2.3-jdk15.jar
Download https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.jar
Download https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Download https://repo1.maven.org/maven2/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar
Download https://repo1.maven.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
Download https://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
Download https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar
Download https://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.jar
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar
Download https://repo1.maven.org/maven2/org/eclipse/jdt/org.eclipse.jdt.annotation/1.1.0/org.eclipse.jdt.annotation-1.1.0.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
FAILURE: Build failed with an exception.
* Where:
Build file '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1/build.gradle' line: 52
* What went wrong:
A problem occurred evaluating root project 'htsjdk-2.5.1'.
> Cannot find '.git' directory
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 36.403 secs
* ERROR: dev-java/htsjdk-2.5.1::science failed (compile phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 133: Called src_compile
* environment, line 4036: Called die
* The specific snippet of code:
* GRADLE_USER_HOME="${WORKDIR}" ./gradlew build || die
*
* If you need support, post the output of `emerge --info '=dev-java/htsjdk-2.5.1::science'`,
* the complete build log and the output of `emerge -pqv '=dev-java/htsjdk-2.5.1::science'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=oracle-jdk-bin-1.8 CLASSPATH="" JAVA_HOME="/opt/oracle-jdk-bin-1.8.0.92"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =htsjdk-2.5.1
* The complete build log is located at '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/temp/build.log'.
* The ebuild environment file is located at '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/temp/environment'.
* Working directory: '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1'
* S: '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/work/htsjdk-2.5.1'
>>> Failed to emerge dev-java/htsjdk-2.5.1, Log file:
>>> '/scratch/var/tmp/portage/dev-java/htsjdk-2.5.1/temp/build.log'
@mmokrejs Because that .tar.gz
archive contains the code from this repository, but is not itself a git repository. You need to git clone
this repository, and build within that clone.
Do you mean this?
gzip -dc htsjdk-2.5.1.tar.gz | tar xf -
cd htsjdk-2.5.1
git clone https://github.com/samtools/htsjdk.git
./gradlew
Or should I fiddle with $GIT_DIR
or $GIT_WORK_TREE
or $GIT_COMMON_DIR
env variables? Note I have no write access to $HOME/.git from under this user, so I need to eventually redirect git to store its crap in some temp space. Ideally in current working directory.
You don't need to download the .tar.gz
at all. Just git clone
this repository, cd into the clone, and run ./gradlew jar
to build an htsjdk-only jar, or ./gradlew shadowJar
to build a monolithic jar that includes htsjdk plus all of htsjdk's dependencies. See the README for this repo for more build options.
Subject of the issue
Downloaded htsjdk-2.4.1, unzipped file and ran gradlew script on Cygwin prompt. The necessary plugins were downloaded but the compilation ended with an error saying
FAILURE: Build failed with an exception.
What went wrong: A problem occurred evaluating root project 'htsjdk-2.4.1'.
Steps to reproduce
Tell us how to reproduce this issue. If possible, include a short code snippet to demonstrate the problem.
Expected behaviour
compile htsjdk.jar
Actual behaviour
Tell us what happens instead