Bug 220322

Summary: devel/gradle: update to 4.0
Product: Ports & Packages Reporter: Pavel Timofeev <timp87>
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Only Me CC: gasol.wu, tobik
Priority: --- Flags: bugzilla: maintainer-feedback? (gasol.wu)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D11565
Attachments:
Description Flags
port patch
none
port patch 2
tobik: maintainer-approval? (gasol.wu)
openjfx8.diff none

Description Pavel Timofeev 2017-06-28 05:47:05 UTC
Created attachment 183871 [details]
port patch

- update devel/gradle to 4.0
- switch from misc/compat9x to lang/gcc for libstdc++.so.6 dependency
Comment 1 Pavel Timofeev 2017-06-28 05:47:31 UTC
root@vlt2:/usr/ports/devel/gradle # portlint -AC
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: LIB_DEPENDS don't specify the ABI version number .6 in libstdc++.so.6 unless it is really necessary.
WARN: Makefile: LIB_DEPENDS the new format is libFOO.so (e.g., liblibstdc++.so.6.so).
WARN: /usr/ports/devel/gradle/distinfo: [1]: TIMESTAMP is over 30 days old
0 fatal errors and 4 warnings found.
Comment 2 Pavel Timofeev 2017-06-28 06:47:01 UTC
Poudriere log https://drive.google.com/file/d/0By9yUmYFrRAKbDQxUEs2UjEzeVk



====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
====>> Checking for staging violations... done
=======================<phase: package        >============================
===>  Building package for gradle-4.0
===========================================================================
=======================<phase: install-mtree  >============================
===========================================================================
====>> Recording filesystem state for preinst... done
=======================<phase: install        >============================
===>  Installing for gradle-4.0
===>   gradle-4.0 depends on file: /usr/local/openjdk8/bin/java - found
===>   gradle-4.0 depends on shared library: libstdc++.so.6 - found (/usr/local/lib/gcc5/libstdc++.so.6)
===>  Checking if gradle already installed
===>   Registering installation for gradle-4.0
[FreeBSD:11:amd64-default] Installing gradle-4.0...
===========================================================================
====>> Checking shared library dependencies
=======================<phase: deinstall      >============================
===>  Deinstalling for gradle
===>   Deinstalling gradle-4.0
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        gradle-4.0

Number of packages to be removed: 1

The operation will free 72 MiB.
[FreeBSD:11:amd64-default] [1/1] Deinstalling gradle-4.0...
[FreeBSD:11:amd64-default] [1/1] Deleting files for gradle-4.0: .......... done
===========================================================================
====>> Checking for extra files and directories
[00:44:13] ====>> Installing from package
[FreeBSD:11:amd64-default] Installing gradle-4.0...
[FreeBSD:11:amd64-default] Extracting gradle-4.0: .......... done
[00:44:17] ====>> Cleaning up
===>  Cleaning for gradle-4.0
[00:44:17] ====>> Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        gradle-4.0

Number of packages to be removed: 1
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-28 14:40:33 UTC
> switch from misc/compat9x to lang/gcc for libstdc++.so.6 dependency

Is this really still necessary?

https://github.com/adammurdoch/native-platform/issues/8 claims this was fixed
in native-platform 0.12 and Gradle 4.0 bundles native-platform 0.14.
Comment 4 Pavel Timofeev 2017-06-28 18:14:59 UTC
(In reply to Tobias Kortkamp from comment #3)

Looks like this is not true:

[root@nostromo /tmp]# uname -a
FreeBSD nostromo 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r320326: Sun Jun 25 10:39:20 MSK 2017     pavel.timofeev@nostromo:/usr/obj/usr/src/sys/GENERIC  amd64

[root@nostromo /tmp]# fetch 'https://services.gradle.org/distributions/gradle-4.0-bin.zip'
gradle-4.0-bin.zip                            100% of   64 MB 2874 kBps 00m23s

[root@nostromo /tmp]# unzip gradle-4.0-bin.zip 
Archive:  gradle-4.0-bin.zip
...
 extracting: gradle-4.0/lib/plugins/snakeyaml-1.6.jar  
 extracting: gradle-4.0/lib/plugins/httpcore-4.4.4.jar  
 extracting: gradle-4.0/lib/plugins/xml-apis-1.3.04.jar  
 extracting: gradle-4.0/lib/plugins/hamcrest-core-1.3.jar 

[root@nostromo /tmp]# ls -l gradle-4.0/lib/native-platform-freebsd-*
-rw-r--r--  1 root  wheel  17988 Mar  9 03:15 gradle-4.0/lib/native-platform-freebsd-amd64-libcpp-0.14.jar
-rw-r--r--  1 root  wheel  17101 Mar  9 03:15 gradle-4.0/lib/native-platform-freebsd-amd64-libstdcpp-0.14.jar
-rw-r--r--  1 root  wheel  18885 Mar  9 03:15 gradle-4.0/lib/native-platform-freebsd-i386-libcpp-0.14.jar
-rw-r--r--  1 root  wheel  16356 Mar  9 03:15 gradle-4.0/lib/native-platform-freebsd-i386-libstdcpp-0.14.jar

[root@nostromo /tmp]# unzip gradle-4.0/lib/native-platform-freebsd-amd64-libstdcpp-0.14.jar
Archive:  gradle-4.0/lib/native-platform-freebsd-amd64-libstdcpp-0.14.jar
   creating: META-INF/
 extracting: META-INF/MANIFEST.MF  
   creating: net/
   creating: net/rubygrapefruit/
   creating: net/rubygrapefruit/platform/
   creating: net/rubygrapefruit/platform/freebsd-amd64-libstdcpp/
 extracting: net/rubygrapefruit/platform/freebsd-amd64-libstdcpp/libnative-platform-curses.so  
 extracting: net/rubygrapefruit/platform/freebsd-amd64-libstdcpp/libnative-platform.so  

[root@nostromo /tmp]# ldd net/rubygrapefruit/platform/freebsd-amd64-libstdcpp/libnative-platform.so
net/rubygrapefruit/platform/freebsd-amd64-libstdcpp/libnative-platform.so:
	libstdc++.so.6 => not found (0)
	libm.so.5 => /lib/libm.so.5 (0x801000000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80122d000)
	libc.so.7 => /lib/libc.so.7 (0x800825000)



Am I doing something wrong? Should we reopen that ticket (or create new)?
Comment 5 Pavel Timofeev 2017-06-28 18:49:45 UTC
(In reply to timp87 from comment #4)
Also if I remove lang/gcc or misc/compat9x gradle4 fails
Comment 6 Pavel Timofeev 2017-06-29 09:54:37 UTC
(In reply to Tobias Kortkamp from comment #3)
I asked for clarification in https://github.com/adammurdoch/native-platform/issues/8




BTW I think we should remove
NO_ARCH=yes
and add
ONLY_FOR_ARCHS=i386 amd64

since this binary distribution is shipped with native-platform shared objects built for these two platforms.

Or rework this port to build gradle from src distribution.
Comment 7 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-30 09:51:44 UTC
(In reply to timp87 from comment #5)
I don't see this here.  It works fine without libstdc++.so.6.
What error message do you see?

In other news the update to Gradle 4.0 will unfortunately break
java/openjfx8-devel :-(
https://pkg.tobik.me/logs/openjfx8-devel-20160228_2.log
Comment 8 Pavel Timofeev 2017-06-30 15:51:04 UTC
(In reply to Tobias Kortkamp from comment #7)
Hmm, I don't know what happened, but I can't reproduced it now. You're right, sorry.
Comment 9 Pavel Timofeev 2017-06-30 16:00:08 UTC
Created attachment 183944 [details]
port patch 2

Removed libstdc++.so.6 from dependencies
Sort pkg-plist
Comment 10 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-30 18:49:56 UTC
Created attachment 183955 [details]
openjfx8.diff

(In reply to timp87 from comment #8)
Ah, no worries. It's good that it works without libstdc++.so.6 now :)

I fixed the java/openjfx8-devel build, so now we just have to wait for
maintainer approval/timeout.
Comment 11 Tobias Kortkamp freebsd_committer freebsd_triage 2017-07-12 14:12:20 UTC
Proceeding with maintainer timeout.
Comment 12 commit-hook freebsd_committer freebsd_triage 2017-07-13 15:46:21 UTC
A commit references this bug:

Author: tobik
Date: Thu Jul 13 15:46:06 UTC 2017
New revision: 445657
URL: https://svnweb.freebsd.org/changeset/ports/445657

Log:
  Update to Gradle 4.0

  - Remove the misc/compat9x dependency since the bundled
    native-platform no longer depends on libstdc++.so.6
  - Fix MASTER_SITES: Both {https,http}://services.gradle.org redirect
    to https://downloads.gradle.org
  - Set EXTRACT_SUFX instead of setting WRKSRC + DISTNAME

  PR:		220322
  Submitted by:	timp87@gmail.com
  Approved by:	mat (mentor), gasol.wu@gmail.com (maintainer timeout, 2 weeks)
  Differential Revision:	https://reviews.freebsd.org/D11565

Changes:
  head/devel/gradle/Makefile
  head/devel/gradle/distinfo
  head/devel/gradle/pkg-plist
Comment 13 commit-hook freebsd_committer freebsd_triage 2017-07-13 15:47:24 UTC
A commit references this bug:

Author: tobik
Date: Thu Jul 13 15:46:36 UTC 2017
New revision: 445658
URL: https://svnweb.freebsd.org/changeset/ports/445658

Log:
  Fix build of java/openjfx8-devel with Gradle 4.0

  PR:		220322
  Approved by:	mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11565

Changes:
  head/java/openjfx8-devel/Makefile