FS#48385 - [gradle] upstream provided gradle-native-2.10.jar links against ncurses5 instead of ncurses6

Attached to Project: Community Packages
Opened by Dan (drmoose) - Tuesday, 01 March 2016, 16:05 GMT
Last edited by freswa (frederik) - Tuesday, 06 October 2020, 17:09 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Gradle 2.11-1 is built against ncurses 5 (which I suspect is an upstream problem), but when libncurses.so.5 isn't present, gradle silently assumes you have a dumb terminal. It can be forced to try to use ansi escape sequences with the --console=rich flag, but that has line wrapping issues.

For those unfamiliar with how it's supposed to look, the only evidence one might have that something is wrong comes from the first few lines of gradle --debug:

-----
10:05:12.001 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to load from native-platform backed ConsoleDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform-curses.so' for Linux amd64.
caused by: java.lang.UnsatisfiedLinkError: /home/drmoose/.gradle/native/19/linux-amd64/libnative-platform-curses.so: libncurses.so.5: cannot open shared object file: No such file or directory
-----

The ncurses5-compat-libs PKGBUILD in aur supplies a version of libncurses.so.5 that is compatible with gradle. Since gradle works without it (and there's no wiki page for gradle), I suggest adding something like this to the PKGBUILD for gradle:

----
optdepends=('ncurses-5-compat-libs: colored output, progress indicators')
----
This task depends upon

Closed by  freswa (frederik)
Tuesday, 06 October 2020, 17:09 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://github.com/gradle/gradle/issues/ 825
Comment by Dan (drmoose) - Tuesday, 01 March 2016, 16:09 GMT
my 'optdepends' line above has a typo. The aur package is ncurses5-compat-libs, not ncurses-5-compat-libs.
Comment by Levente Polyak (anthraxx) - Tuesday, 01 March 2016, 17:26 GMT
actually we should not reference AUR packages in official packages.
Can you report this issue to gradle and reference the bug report in this ticket?
gradle ships the problematic library as lib/gradle-native-2.10.jar and that jar is linked against ncurses5. They should somehow provide such dependency that is linked against ncurses6 (I assume gradle-native-2.10 just needs to be builds against ncurses6)

a references discussion: https://discuss.gradle.org/t/how-do-i-always-force-console-auto-in-a-gradle-properties-or-environment-variable/12039
Comment by Levente Polyak (anthraxx) - Thursday, 27 September 2018, 09:19 GMT
Do you still have issues? They still link against either libncurses.so.5 or libncurses.so.6 but we dont have either anymore. However colored output and progress indicators seem to work properly so i dont think we need that really?
Comment by Peter Schyma (pschyma) - Saturday, 01 June 2019, 18:09 GMT
I just ran into this issue. Having only ncurses installed, I get colored and progress indicator output if I install ncurses5-compat-libs or use --console=rich parameter.

Adding org.gradle.console=rich to ~/.gradle/gradle.properties restored the expected output. Maybe this should be added to the pacman output.

Loading...