Opened 11 years ago

Closed 10 years ago

#36646 closed defect (fixed)

groovy @2.0.5: gradle-1.2-bin.zip.part (No such file or directory)

Reported by: breun (Nils Breunese) Owned by: breskeby@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: cdeil (Christoph Deil), iskigow@…, michael_hodgins@…, neverov.andrey@…, nchen.dev@…, macports@…, tsitelov (Dmitry Tsitelov), ksze (Kal Sze), jens@…, eliseomarmol@…
Port: groovy

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I tried to install Groovy 2.0.5. from MacPorts, but the build fails:

$ sudo port install groovy
--->  Fetching archive for groovy
--->  Attempting to fetch groovy-2.0.5_0.darwin_12.noarch.tbz2 from http://lil.fr.packages.macports.org/groovy
--->  Attempting to fetch groovy-2.0.5_0.darwin_12.noarch.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/groovy
--->  Attempting to fetch groovy-2.0.5_0.darwin_12.noarch.tbz2 from http://packages.macports.org/groovy
--->  Fetching distfiles for groovy
--->  Attempting to fetch groovy-src-2.0.5.zip from http://lil.fr.distfiles.macports.org/groovy
--->  Verifying checksum(s) for groovy
--->  Extracting groovy
--->  Configuring groovy
--->  Building groovy
Error: org.macports.build for port groovy returned: command execution failed
Please see the log file for port groovy for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port groovy failed

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/main.log contains:

version:1
:debug:main Checking for conflicts against groovy
:debug:main Searching for dependency: groovy-devel
:debug:main Didn't find receipt, going to depspec regex for: groovy-devel
:debug:main Executing org.macports.main (groovy)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.configure (groovy)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Thu Oct 18 16:21:12 CEST 2012
:notice:build --->  Building groovy
:debug:build Executing org.macports.build (groovy)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.8'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work/groovy-2.0.5" && ./gradlew installGroovy -g /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work/groovy-2.0.5" && ./gradlew installGroovy -g /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work 
:info:build Downloading http://services.gradle.org/distributions/gradle-1.2-bin.zip
:info:build 
:info:build Exception in thread "main" java.io.FileNotFoundException: /opt/local/var/macports/home/.gradle/wrapper/dists/gradle-1.2-bin/35oej0jnbfh6of4dd05531edaj/gradle-1.2-bin.zip.part (No such file or directory)
:info:build 	at java.io.FileOutputStream.open(Native Method)
:info:build 	at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
:info:build 	at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
:info:build 	at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
:info:build 	at org.gradle.wrapper.Download.download(Download.java:49)
:info:build 	at org.gradle.wrapper.Install.createDist(Install.java:51)
:info:build 	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
:info:build 	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work/groovy-2.0.5" && ./gradlew installGroovy -g /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work 
:info:build Exit code: 1
:error:build org.macports.build for port groovy returned: command execution failed
:debug:build Error code: CHILDSTATUS 42208 1
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for groovy: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port groovy for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/main.log

Attachments (2)

groovy_Portfile.patch (400 bytes) - added by macports@… 11 years ago.
Here's a patch for the groovy @2.1.0_0 Portfile that fixes this problem.
main.log (33.0 KB) - added by ksze (Kal Sze) 11 years ago.
New failing build log after having applied the workaround.

Download all attachments as: .zip

Change History (36)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to breskeby@…
Port: groovy added

Remember to use WikiFormatting, to set the Port field, and to Cc the maintainer of that port.

comment:2 Changed 11 years ago by cdeil (Christoph Deil)

Cc: Deil.Christoph@… added

Cc Me!

comment:3 Changed 11 years ago by jlgrock@…

I am also seeing this error. The first time I ran this, I got a 404 error. The second time I ran it, the new log file (which overwrites the old one) seems to show the information above. Unfortunately, I don't know how to get back to the original state to check to see what the 404 is on, but I thought this information might be useful in correcting the issue.

comment:4 in reply to:  3 Changed 11 years ago by jlgrock@…

Replying to jlgrock@…:

I am also seeing this error. The first time I ran this, I got a 404 error. The second time I ran it, the new log file (which overwrites the old one) seems to show the information above. Unfortunately, I don't know how to get back to the original state to check to see what the 404 is on, but I thought this information might be useful in correcting the issue.

Also noticing that I may have run macports to install gradle at a different point, which is indicating that I already have groovy 1.8.6. The previous installation may be interfering as well. Though if I check for the status of Groovy through macports, it is stating that Groovy isn't installed. Again, just throwing in additional information, in the off chance that it helps.

Last edited 11 years ago by jlgrock@… (previous) (diff)

comment:5 Changed 11 years ago by breun (Nils Breunese)

The error seems to occur when trying to download http://services.gradle.org/distributions/gradle-1.2-bin.zip

This URL redirects to http://downloads.gradle.org/distributions/gradle-1.2-bin.zip

Maybe the installer doesn't handle this redirect properly?

comment:6 Changed 11 years ago by jmroot (Joshua Root)

Ports aren't meant to download anything in the build phase; that should happen in the fetch phase. But it should probably depend on the gradle port anyway instead of downloading its own copy.

comment:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: iskigow@… added
Summary: Installing Groovy 2.0.5 failsgroovy @2.0.5: gradle-1.2-bin.zip.part (No such file or directory)

Has duplicate #37469.

comment:8 Changed 11 years ago by michael_hodgins@…

Cc: michael_hodgins@… added

Cc Me!

comment:9 Changed 11 years ago by neverov.andrey@…

Cc: neverov.andrey@… added

Cc Me!

comment:10 Changed 11 years ago by breun (Nils Breunese)

The groovy port has been updated to Groovy 2.0.6, but it still won't install:

:info:build Downloading http://services.gradle.org/distributions/gradle-1.2-bin.zip
:info:build 
:info:build Exception in thread "main" java.io.FileNotFoundException: /opt/local/var/macports/home/.gradle/wrapper/dists/gradle-1.2-bin/35oej0jnbfh6of4dd05531edaj/gradle-1.2-bin.zip.part (No such file or directory)
:info:build     at java.io.FileOutputStream.open(Native Method)
:info:build     at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
:info:build     at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
:info:build     at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
:info:build     at org.gradle.wrapper.Download.download(Download.java:49)
:info:build     at org.gradle.wrapper.Install.createDist(Install.java:51)
:info:build     at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
:info:build     at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work/groovy-2.0.6" && ./gradlew installGroovy -g /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_groovy/groovy/work 
:info:build Exit code: 1
:error:build org.macports.build for port groovy returned: command execution failed
:debug:build Error code: CHILDSTATUS 1976 1
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"

comment:11 Changed 11 years ago by nchen.dev@…

Here's a simple workaround that the port maintainer can easily do:

Change build.cmd on line 40 of the portfile from

./gradlew

to

GRADLE_USER_HOME=${workpath} ./gradlew

I am not certain what has changed between the different versions of Gradle/gradlew that the Groovy source is using, but if you don't explicitly set the GRADLE_USER_HOME to some directory, it tries to install it into /opt/local/var/macports/home/.gradle which the script does not have access to.

comment:12 Changed 11 years ago by nchen.dev@…

Cc: nchen.dev@… added

Cc Me!

comment:13 Changed 11 years ago by simonazriel@…

I have confirmed that changing the build.cmd in the Portfile for the java/groovy package after download to:

GRADLE_USER_HOME=${workpath} ./gradlew

will allow the package to build. This is a useful workaround until the package maintainer can get it together to push another version. For now I have a working macports version of groovy again.

comment:14 Changed 11 years ago by breun (Nils Breunese)

Thanks for the workaround, I was able to install Groovy as well after changing line 40 of /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/java/groovy/Portfile to

build.cmd       GRADLE_USER_HOME=${workpath} ./gradlew

comment:15 Changed 11 years ago by iskigow@…

Thanks for the workaround, I was able to upgrade Groovy as well after changing the line

from:

build.cmd                                    ./gradlew

to:

build.cmd       GRADLE_USER_HOME=${workpath} ./gradlew

On the file: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/java/groovy/Portfile

comment:16 Changed 11 years ago by breun (Nils Breunese)

Groovy 2.1.0 has been released for MacPorts, but this bug is still present, so the upgrade failed. I had to apply the workaround again.

comment:17 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

Changed 11 years ago by macports@…

Attachment: groovy_Portfile.patch added

Here's a patch for the groovy @2.1.0_0 Portfile that fixes this problem.

comment:18 Changed 11 years ago by simonazriel@…

Groovy 2.1.1_0 - still the same problem. Who maintains this port. Can we get them to update the portfile once and for all and check it in?

Version 0, edited 11 years ago by simonazriel@… (next)

comment:19 Changed 11 years ago by tsitelov (Dmitry Tsitelov)

Cc: cit@… added

Cc Me!

comment:20 Changed 11 years ago by larryv (Lawrence Velázquez)

Has duplicate #38531.

comment:21 Changed 11 years ago by ksze (Kal Sze)

As of this writing, the version of Groovy in MacPorts is 2.1.3_0. I still have to apply the workaround to get the build process going. However, I now bump into a new build error and I don't know whether it is related. New build log attached.

Changed 11 years ago by ksze (Kal Sze)

Attachment: main.log added

New failing build log after having applied the workaround.

comment:22 Changed 11 years ago by breun (Nils Breunese)

The dependency error in that main.log doesn't seem related to this issue. I recommend opening a new issue.

comment:23 Changed 11 years ago by macports@…

This is still a problem, and the patch still fixes it. Why hasn't the patch been applied upstream?

comment:24 Changed 11 years ago by breun (Nils Breunese)

Strangely enough it works fine without the patch on my MacBook, but my iMac still needs it.

comment:25 Changed 11 years ago by ksze (Kal Sze)

Why does the build process of Groovy even depend on Gradle? Gradle uses a Groovy DSL. Wouldn't it be a case of chicken-or-the-egg?

FWIW, the official build instructions at http://groovy.codehaus.org/Building+Groovy+from+Source indicate the use of Apache Ant, not Gradle.

comment:26 Changed 11 years ago by ksze (Kal Sze)

Cc: swordangel@… added

Cc Me!

comment:27 Changed 11 years ago by jens@…

Cc: jens@… added

Cc Me!

comment:28 Changed 11 years ago by eliseomarmol@…

Cc: eliseomarmol@… added

Cc Me!

comment:29 Changed 11 years ago by macports@…

groovy @2.1.3_0 still fails to build without the patch, and builds flawlessly with the patch applied. Why isn't anyone pushing the patch upstream?

comment:30 Changed 11 years ago by steve.swinsburg@…

I was getting the original build error, so applied the patch and now the build hangs at: ---> Building groovy

FYI the developer is: https://twitter.com/breskeby

I've sent a note.

Last edited 11 years ago by steve.swinsburg@… (previous) (diff)

comment:31 in reply to:  30 Changed 11 years ago by breskeby@…

Replying to steve.swinsburg@…:

I was getting the original build error, so applied the patch and now the build hangs at: ---> Building groovy

FYI the developer is: https://twitter.com/breskeby

I've sent a note.

Hello, the reason why the build appears to hang at "building groovy" is, that the gradle wrapper needs to download to gradle distribution to build groovy from its sources. I've applied the patch for reconfiguring the gradle user home. can you double check that fix. BTW. I've also updated to 2.1.5

comment:32 Changed 11 years ago by breskeby@…

I've applied the fix. sorry for the long delay. Can you double check the fix?

cheers, René

comment:33 Changed 11 years ago by steve.swinsburg@…

Thanks René, I can confirm that this version works. Thanks for fixing this! Much appreciated.

cheers, Steve

comment:34 Changed 10 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Calling this fixed.

Note: See TracTickets for help on using tickets.