Kian Ahrabian
Kian Ahrabian

Reputation: 921

run PyCharm on arch linux

I use pycharm-professional on arch linux, but since yesterday it does not run properly, here is the error when running it in temrinal:

[kahrabian@Kian-Arch ~]$ pycharm 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f26f93b5be0, pid=1999, tid=139805401143040
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x00007f26f93b5be0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/kahrabian/java_error_in_PYCHARM_1999.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
/opt/pycharm-professional/bin/pycharm.sh: line 187:  1999 Aborted                 (core dumped) LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" $AGENT "-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" -classpath "$CLASSPATH" $VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" "-XX:ErrorFile=$HOME/java_error_in_PYCHARM_%p.log" -Djb.restart.code=88 -Didea.paths.selector=PyCharm40 $IDE_PROPERTIES_PROPERTY $IDE_JVM_ARGS $REQUIRED_JVM_ARGS $MAIN_CLASS_NAME "$@"

and here is the log file generated after trying to run pycharm: http://paste.ubuntu.com/12775734/ as I can't understand the problem and it's origin, I need some help to solve this problem.

Upvotes: 1

Views: 4554

Answers (5)

João Portela
João Portela

Reputation: 93

I had the same issue. I was using OpenJDK JRE 9, and that seems to have been the source of problem. I've later installed Oracle's JRE 8 and everything is okay. Maybe with OpenJDK JRE 8 it will work as well.

Upvotes: 0

Dominic LoBue
Dominic LoBue

Reputation: 81

to build on the answer given by @8bitAce:

You actually don't need to install the older glib2 version in order to use it to run pycharm. Just extract the old glib2 package somewhere in your home directory:

mkdir -p $HOME/oldlibs/pycharm
tar Jxf /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz -C $HOME/oldlibs/pycharm

Then start pycharm:

LD_PRELOAD=$HOME/oldlibs/pycharm/usr/lib/libglib-2.0.so pycharm

This way the rest of your programs (which may depend on the newer glib2 version) aren't forced to use an old glib2 version, and run the risk of other problems.

Upvotes: 0

Matti
Matti

Reputation: 11

There is a pre-built package in this repo:

[archlinuxcn]
SigLevel = Optional TrustAll
Server   = http://repo.archlinuxcn.org/$arch

Upvotes: -1

scottwernervt
scottwernervt

Reputation: 470

For anyone else running into this error and do not want to downgrade glib, the command from step #1 solution needs to be changed to:

# x64
LD_PRELOAD=/lib64/libglib-2.0.so pycharm
# x86
LD_PRELOAD=/lib/libglib-2.0.so pycharm

Upvotes: 1

Zigsaz
Zigsaz

Reputation: 445

Unfortunately this is a known incompatibility with the current glib and Oracle JVM.

See here: https://youtrack.jetbrains.com/issue/IDEA-146207 And here: https://bugzilla.gnome.org/show_bug.cgi?id=755609

There are a few workarounds that you can use for the time being (found from here: https://bugs.archlinux.org/task/46619)

  1. Prepend the command with PRELOAD=/lib/libglib-2.0.so (e.g. PRELOAD=/lib/libglib-2.0.so pycharm)
  2. Install this patched glib from the arch forum thread (I'd be weary to use this solution without first checking the safety of this package): http://pkgbuild.com/~heftig/glib2-2.46.0-2-x86_64.pkg.tar.xz
  3. Downgrade GLib-2 for now (only works if you still have the old package cached). The command to do this will look something like: pacman -U /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz. You can also downgrade package using other tools, like downgrade from AUR, the just run downgrade glib2

Hopefully this bug will be squashed soon.

Upvotes: 4

Related Questions