Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716900 - dev-util/pycharm-professional-2020.1: No JDK found. Please validate either PYCHARM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
Summary: dev-util/pycharm-professional-2020.1: No JDK found. Please validate either PY...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-10 09:04 UTC by Mark Nowiasz
Modified: 2020-05-25 09:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nowiasz 2020-04-10 09:04:19 UTC
After upgrading pycharm-professional to 2020.1 from 2019.3.4, pycharm is unable to start anymore:

No JDK found. Please validate either PYCHARM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

Downgrading to 2019.3.4 makes pycharm-professional work again

Reproducible: Always

Steps to Reproduce:
1. upgrade pycharm-professional to 2020.1
2. Try to start it
3. No luck
Actual Results:  
Error Dialog


emerge --info
Portage 2.3.98 (python 3.8.2-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.3.0, glibc-2.30-r7, 5.4.31-gentoo x86_64)
=================================================================
System uname: Linux-5.4.31-gentoo-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-glibc2.2.5
KiB Mem:    20375536 total,   1628888 free
KiB Swap:    8388604 total,   8361980 free
Timestamp of repository gentoo: Fri, 10 Apr 2020 05:30:01 +0000
Head commit of repository gentoo: 143dda37b357fa949abd681742f465d8cb5f981e
sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r2::gentoo, 3.6.10-r1::gentoo, 3.7.7-r1::gentoo, 3.8.2-r1::gentoo, 3.9.0_alpha5::gentoo
dev-util/cmake:           3.17.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

matrix
    location: /var/lib/layman/matrix
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ rsync://mirror.eu.oneandone.net/gentoo/ http://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cryptsetup cups dbus declarative dri dts dvd dvdr emboss encode exif ffmpeg flac fortran gdbm gif gimp git gles gles2 gpm gtk iconv icu ipv6 jpeg kde kipi kwallet latex lcms ldap libnotify libtirpc mad matroska mmx mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pentax phonon pim plasma png policykit ppds pulseaudio python qml qt5 readline scanner sdl seccomp semantic-desktop smartcard smp spell split-usr sse sse2 sse3 ssl startup-notification subversion svg systemd tcpd tiff touchpad truetype udev udisks unicode upower usb vaapi vim-syntax vorbis wayland widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_8" RUBY_TARGETS="ruby25 ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Erich Seifert 2020-04-10 17:33:46 UTC
I solved the problem by making the integrated Java runtime binaries executable:

# chmod +x /opt/pycharm-professional/jbr/bin/*
Comment 2 Mark Nowiasz 2020-04-10 17:54:14 UTC
(In reply to Erich Seifert from comment #1)
> I solved the problem by making the integrated Java runtime binaries
> executable:
> 
> # chmod +x /opt/pycharm-professional/jbr/bin/*

Thanks, works for me, too. Now, what's odd: According to tar

-------------8<----------------------------------------
tar -ztvf pycharm-professional-2020.1.tar.gz | grep jbr/bin
-rwxr-xr-x 0/0           13040 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jaotc
-rwxr-xr-x 0/0           12904 2020-03-30 12:12 pycharm-2020.1/jbr/bin/java
-rwxr-xr-x 0/0           12968 2020-03-30 12:12 pycharm-2020.1/jbr/bin/javac
-rwxr-xr-x 0/0           12936 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jdb
-rwxr-xr-x 0/0           12936 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jfr
-rwxr-xr-x 0/0           12936 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jhsdb
-rwxr-xr-x 0/0           12968 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jjs
-rwxr-xr-x 0/0           12976 2020-03-30 12:12 pycharm-2020.1/jbr/bin/jrunscript
-rwxr-xr-x 0/0           12944 2020-03-30 12:12 pycharm-2020.1/jbr/bin/keytool
-rwxr-xr-x 0/0           12944 2020-03-30 12:12 pycharm-2020.1/jbr/bin/pack200
-rwxr-xr-x 0/0           12936 2020-03-30 12:12 pycharm-2020.1/jbr/bin/rmid
-rwxr-xr-x 0/0           12944 2020-03-30 12:12 pycharm-2020.1/jbr/bin/rmiregistry
-rwxr-xr-x 0/0           12944 2020-03-30 12:12 pycharm-2020.1/jbr/bin/serialver
-rwxr-xr-x 0/0          117784 2020-03-30 12:12 pycharm-2020.1/jbr/bin/unpack200
----------------------->8---------------------------------------

The executable bit is set. But clearly not anymore after installing pycharm.. what's even more strange: the ebuild hasn't been changed (2019.3.4 vs 2020.1), yet 2019.3.4 works fine and needs no +x, 2020.1 does.
Comment 3 Anton Gubarkov 2020-04-13 18:59:32 UTC
pycharm-community suffers from the same problem.

It seems that doins added some more safeguards by clearing x bits.
Comment 4 Joakim Tjernlund 2020-04-17 10:07:55 UTC
Similar to https://bugs.gentoo.org/709380
Just rm the jbr dir so app uses that system Java
Comment 5 Joakim Tjernlund 2020-04-17 10:10:11 UTC
(In reply to Anton Gubarkov from comment #3)
> pycharm-community suffers from the same problem.
> 
> It seems that doins added some more safeguards by clearing x bits.

Has been so for a while but earlier pycharm's worked arond the problem
Comment 6 Dudu Edri 2020-04-29 18:13:00 UTC
When PyCharm starts, it uses the pycharm.sh script. On 2019.* versions the script looked for the bundled Java directory (jbr), verified that the java executable inside it is actually executable, and only then considered it for use. If it wasn't, it moved forward to the system's java, and that's why 2019.* versions worked even though the bundled java doesn't have execution permissions. On the other hand, the pycharm.sh script on 2020.1 version just checks whether the jbr directory exists, and if so, moves forward without verifying that the java file that resides inside it is actually executable. Only later in the script logic it checks whether it's executable (when it already skipped all other possible java locations), and if it's not, it fails with an error.

The ebuild already tries to remove the bundled java in the src_prepare function:
rm -rf jre || die

The bundled java directory isn't located inside a jre directory anymore (the directory is also called jbr in 2019.*). The regression happened due to the behavior change mentioned on the top of this comment, and not due to a directory name change.

I propose a simple fix here - just update the removal line on the src_prepare function to:
rm -rf jbr || die

And you're good to go. Verified on my overlay and it works - PyCharm starts up as expected.
Comment 7 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-05-25 09:12:01 UTC
Shpild not be relevant.