Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to install picard-2.5.0 using gradle or ant #602

Closed
vwchen001 opened this issue Jul 14, 2016 · 12 comments
Closed

unable to install picard-2.5.0 using gradle or ant #602

vwchen001 opened this issue Jul 14, 2016 · 12 comments

Comments

@vwchen001
Copy link

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/sbsuser/Test_wchen/picard-2.5.0-gradle/build.gradle' line: 19

  • What went wrong:
    An exception occurred applying plugin request [id: 'org.ajoberstar.grgit', version: '1.4.2']

    Failed to apply plugin [id 'org.ajoberstar.grgit']
    One of setGitDir or setWorkTree must be called.
    Please help! Thanks!

@vwchen001
Copy link
Author

git --version
git version 1.8.4.1

which git
/usr/local/bin/git

@lbergelson
Copy link
Member

Hi @vwchen001,

I can reproduce the problem you're seeing if I delete my .git directory in picard. The build is looking for the .git file because it has some functionality that interacts with github, it seems like it's failing if it can't find a git repo.

Can you check if you have a .git directory in your picard root. If not, could you try re-cloning from github and seeing if it works then? ( git clone git@github.com:broadinstitute/picard.git )

@vwchen001
Copy link
Author

sudo ./git clone git@github.com:broadinstitute/picard.git
[sudo] password for sbsuser:
Cloning into 'picard'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@lbergelson
Copy link
Member

lbergelson commented Jul 14, 2016

Ah, sorry! Try with https, it sounds like you don't have github keys set up.

git clone https://github.com/broadinstitute/picard.git

Also, you shouldn't need sudo for a git clone unless you're cloning into a directory that has write restrictions (which isn't a great idea in general).

@vwchen001
Copy link
Author

This is done:
./git clone https://github.com/broadinstitute/picard.git

Still same errors when I do:
./gradlew compileJava

Thanks for looking into this!

@lbergelson
Copy link
Member

Strange. I'm not sure what's going on exactly. I tried cloning a fresh copy using git 1.8.3.4 which is the oldest git I had and that worked fine. I think that the grgit plugin bundles it's own copy of jgit, so I think it doesn't matter what the system version is. I'm a bit stumped.

I have a few questions:

  1. What operating system are you using?
  2. What does java -version say?
  3. Did you used to be able to build it with ant?
  4. Doe it work if you replace build.gradle with this version that doesn't use grgit at all?

@vwchen001
Copy link
Author

  1. Red Hat Enterprise Linux Server release 5.11
    x86_64 GNU/Linux
  2. java version "1.8.0_91"
    Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
  3. don't remember. picard1.111 was installed on this server, and is now having invalid and corrupted jar file.
  4. It doesn't. Still the same error:
    FAILURE: Build failed with an exception.
  • Where:
    Build file '/home/sbsuser/Test_wchen/picard-2.5.0-gradle/build.gradle' line: 55

  • What went wrong:
    A problem occurred evaluating root project 'picard-2.5.0-gradle'.

    Cannot find '.git' directory

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'picard-2.5.0-gradle'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:157)
    at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:72)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:162)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:529)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:90)
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
    at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:125)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:122)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:241)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:214)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:207)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: java.lang.IllegalArgumentException: Cannot find '.git' directory
    at com.palantir.gradle.gitversion.GitVersionPlugin.getRootGitDir(GitVersionPlugin.groovy:86)
    at com.palantir.gradle.gitversion.GitVersionPlugin.this$dist$invoke$1(GitVersionPlugin.groovy)
    at com.palantir.gradle.gitversion.GitVersionPlugin$1.methodMissing(GitVersionPlugin.groovy)
    at com.palantir.gradle.gitversion.GitVersionPlugin$1.get(GitVersionPlugin.groovy:39)
    at com.palantir.gradle.gitversion.GitVersionPlugin$1.get(GitVersionPlugin.groovy)
    at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:131)
    at com.google.common.base.Supplier$get.call(Unknown Source)
    at com.palantir.gradle.gitversion.GitVersionPlugin$_apply_closure1.doCall(GitVersionPlugin.groovy:52)
    at com.palantir.gradle.gitversion.GitVersionPlugin$_apply_closure1.doCall(GitVersionPlugin.groovy)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:159)
    at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
    at build_e320ez0qdsmxgzk2619w8nyhj.run(/home/sbsuser/Test_wchen/picard-2.5.0-gradle/build.gradle:55)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
    ... 50 more

BUILD FAILED

@lbergelson
Copy link
Member

Thanks for all the information. I just want to verify that there is a .git directory in your picard folder? The error that you posted makes it look like the version plugin we're using which uses git describe is failing because there is no .git directory. I'm not sure how that's possible if it was just cloned from github though.

@vwchen001
Copy link
Author

Just noticed there is a whole folder picard/ cloned inside current folder. Inside that directory there is a hidden .git. These were successful:
ant clone-htsjdk
./gradlew compileJava
./gradlew compileTest
./gradlew jar
./gradlew shadowJar

./gradlew build or ./gradlew test finished 85%, 7 FAILED:
Gradle suite > Gradle test > picard.illumina.ExtractIlluminaBarcodesTest.testDualBarcodes FAILED
java.io.IOException: Too many open files
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at java.io.File.createTempFile(File.java:2070)
at picard.illumina.ExtractIlluminaBarcodesTest.testDualBarcodes(ExtractIlluminaBarcodesTest.java:241)
Running Test: Test method testNonWritableOutputFile(picard.illumina.ExtractIlluminaBarcodesTest)
.....

Building 85% > :test > 828 tests completed, 7 failed

Didn't find AddOrReplaceReadGroup.jar anywhere? Only these:
./gradle/wrapper/gradle-wrapper.jar
./build/tmp/expandedArchives/org.jacoco.agent-0.7.5.201505241946.jar_dhp1q2ihs2dujhjcoclutoda2/jacocoagent.jar
./build/libs/picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT-javadoc.jar
./build/libs/picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT.jar
./build/libs/picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT-all.jar
./build/libs/picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT-sources.jar

Thanks a lot for your help!

@lbergelson
Copy link
Member

Ahah, I'm glad you've figured it out!

There are no longer individual jars for every tool like there were with earlier versions of picard. Now you can use any picard tool from a single jar by running

java -jar picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT-all.jar That should display a list of all the available tools

Alternatively you can run ./gradlew installDist which will create a launcher script that can be invoked directly build/install/picard/bin/picard

@vwchen001
Copy link
Author

Yes, it works very well! Thanks!

From: Louis Bergelson [mailto:notifications@github.com]
Sent: Friday, July 15, 2016 12:32 PM
To: broadinstitute/picard
Cc: Chen,Wei; Mention
Subject: Re: [broadinstitute/picard] unable to install picard-2.5.0 using gradle or ant (#602)

Ahah, I'm glad you've figured it out!

There are no longer individual jars for every tool like there were with earlier versions of picard. Now you can use any picard tool from a single jar by running

java -jar picard-2.5.0-gradle-7-ge37fd06-SNAPSHOT-all.jar That should display a list of all the available tools

Alternatively you can run ./gradlew installDist which will create a launcher script that can be invoked directly build/install/picard/bin/picard


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/602#issuecomment-233015845, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APpNy5LJo1nLNfOv8012WcBfngo5LyOSks5qV8P1gaJpZM4JMqbE.
The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

@lbergelson
Copy link
Member

Good news then. I'm going to close this ticket. Feel free to reopen it or a new ticket if you have further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants