Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Failed to load a language-ruby package grammar - RHEL 7.7 #279

Open

Description

@jpbarron

Prerequisites

Description

Failed to load a language-ruby package grammar

Steps to Reproduce

  1. Be on RHEL 7.7 with Atom installed from Atom repo (currently atom.x86_64 0:1.41.0-0.1)
  2. Launch Atom
  3. See error about grammar not loading

Expected behavior:

No error.

Actual behavior:

[Enter steps to reproduce:]

Atom: 1.41.0 x64
Electron: 4.2.7
OS: "Red Hat
Thrown From: language-ruby package 0.72.20
User: root

Stack Trace

Failed to load a language-ruby package grammar

At /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/share/atom/resources/app.asar.unpacked/node_modules/tree-sitter-ruby/build/Release/tree_sitter_ruby_binding.node) in /usr/share/atom/resources/app.asar/node_modules/language-ruby/grammars/tree-sitter-ruby.json

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/share/atom/resources/app.asar.unpacked/node_modules/tree-sitter-ruby/build/Release/tree_sitter_ruby_binding.node)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:169:18)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/usr/share/atom/resources/app/static/<embedded>:11:146745)
    at /app.asar/node_modules/tree-sitter-ruby/index.js:2:20)
    at /app.asar/node_modules/tree-sitter-ruby/index.js:15:3)
    at Module.get_Module._compile (/usr/share/atom/resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/usr/share/atom/resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:20:18)
    at customRequire (/usr/share/atom/resources/app/static/<embedded>:1:688211)
    at new TreeSitterGrammar (/usr/share/atom/resources/app/static/<embedded>:11:3128927)
    at GrammarRegistry.createGrammar (/usr/share/atom/resources/app/static/<embedded>:11:360047)
    at l.readFile (/usr/share/atom/resources/app/static/<embedded>:11:359888)
    at u (/usr/share/atom/resources/app/static/<embedded>:11:580631)
    at /usr/share/atom/resources/app/static/<embedded>:11:581884
    at fs.read.error (ELECTRON_ASAR.js:573:9)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:460:17)
  at /app.asar/node_modules/language-ruby/grammars/tree-sitter-ruby.json:1:1

Commands

Non-Core Packages


Reproduces how often:

100%

Versions

Atom : 1.41.0
Electron: 4.2.7
Chrome : 69.0.3497.128
Node : 10.11.0

yum updates are current for Atom repo and EPEL and system repos.

Thanks!

Activity

  1. freelancewebdev commented on Dec 12, 2019

    @freelancewebdev

    I'm also seeing this, same specs as above but I'm using Mint 18.

  2. lembeh2004 commented on Dec 12, 2019

    @lembeh2004

    Have exactly the same issue (RedHat 7.7, Atom 1.41.0)

  3. hulalalb commented on Dec 13, 2019

    @hulalalb

    Same problem on CentOS 7.7 for Atom 1.41.0 x64

  4. alexisfrjp commented on Dec 13, 2019

    @alexisfrjp

    Same, needed to disable the package.

  5. ravijo commented on Dec 14, 2019

    @ravijo

    Same problem in Ubuntu 14.04 LTS too. I have disabled the package as a temporary workaround.

  6. VictorSago commented on Dec 24, 2019

    @VictorSago

    Same issue in Atom 1.42.0 x64 on Ubuntu 14.04 LTS with KDE desktop. Disabling Ruby packages fixes it.

  7. ZUUL42 commented on Jan 14, 2020

    @ZUUL42

    Problem persists into 1.43.0 x64.
    On RHEL 7.7

  8. thewpaney commented on Feb 4, 2020

    @thewpaney

    Seen consistently on CentOS 7.7 on Atom 1.43.0 x64.

  9. shovas commented on Feb 7, 2020

    @shovas

    +1 CentOS 7 latest on Atom 1.43.0 x64.

  10. yilerat19 commented on Feb 10, 2020

    @yilerat19

    Same here. CentOS 7 for Atom 1.43.0 x64

  11. Pardoxa commented on Feb 13, 2020

    @Pardoxa

    Same here
    Atom 1.44.0 x64
    On Red Hat Enterprise Linux Workstation release 7.7 (Maipo)

  12. snlawrence commented on Feb 14, 2020

    @snlawrence

    Same here.
    Atom 1.43.0
    OS: CentOS 7.7

    Edit: Just upgraded to Atom 1.44.0 and the error is persisting

  13. snlawrence commented on Feb 14, 2020

    @snlawrence

    I was able to work around this issue by installing gcc-5.4.0, and then exporting the path to the gcc-5.4.0/lib64 to LD_PATH_LIBRARY
    This is the script I used: https://gist.github.com/snlawrence/f199fe9434f6ddea715f0cd798f4b530

  14. jeprince commented on Mar 19, 2020

    @jeprince

    I was able to work around this issue by installing gcc-5.4.0, and then exporting the path to the gcc-5.4.0/lib64 to LD_PATH_LIBRARY
    This is the script I used: https://gist.github.com/snlawrence/f199fe9434f6ddea715f0cd798f4b530

    This did not work for me.
    Atom 1.45.0
    OS: CentOS 7.7

    I got this error:

    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.
    
  15. NAGESHHIRMUKHE commented on May 1, 2020

    @NAGESHHIRMUKHE

    Same error in atom-1.45.0-0.1.x86_64
    OS: Red Hat Enterprise Linux Workstation release 7.7 (Maipo)

  16. kabartay commented on May 9, 2020

    @kabartay

    Same issue on Ubuntu 14.04 LTS

  17. ewaldmire commented on Jun 2, 2020

    @ewaldmire

    snlawrence's solution worked for me with Atom 1.47 and CentOS 7.8
    I had to first do a yum install gcc-c++ (I think this is what jeprince missed) and then compile gcc similar to his script. I installed it to /opt/gcc54/ as a test.

    You can then do either:

    export LD_LIBRARY_PATH=/opt/gcc54/lib64/ && atom
    or
    export LD_PRELOAD=/opt/gcc54/lib64/libstdc++.so.6 && atom

  18. snlawrence commented on Jun 3, 2020

    @snlawrence

    snlawrence's solution worked for me with Atom 1.47 and CentOS 7.8
    I had to first do a yum install gcc-c++ (I think this is what jeprince missed) and then compile gcc similar to his script. I installed it to /opt/gcc54/ as a test.

    Good point! I've added gcc-c++ to the dependencies in my script.

  19. ladar commented on Oct 16, 2020

    @ladar

    I got tired of waiting for the developers to fix this bug. And having to figure out the solution everytime I install atom on a RHEL/CentOS 7 system. So I finally wrote an install script that does it all for me. It's based on what others have posted, but this version will also install atom, and then go onto build gcc 5.4.0 and install it into the /opt/gcc-5.4.0/ directory. Having it in /usr/local/ means it could end up in your default search paths, and cause breakage. The script also modifies the /usr/bin/atom launcher, so it becomes the only app to make use of the freshly built libraries.

    #/bin/bash -x
    
    echo "Downloading the atom rpm file..."
    curl --location --output atom.x86_64.rpm https://atom.io/download/rpm
    
    echo "Installing the atom rpm file..."
    sudo yum -y install atom.x86_64.rpm
    
    echo "Downloading gcc source files..."
    curl --location --output gcc-5.4.0.tar.bz2 https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2
    
    echo "Extracting files..."
    tar xvfj gcc-5.4.0.tar.bz2
    
    echo "Installing dependencies..."
    sudo yum -y install gmp-devel mpfr-devel libmpc-devel gcc-c++
    
    echo "Configure and install..."
    cd gcc-5.4.0 && ./configure --enable-languages=c,c++ --disable-multilib --prefix=/opt/gcc-5.4.0 && make -j$(nproc) && sudo make install
    
    echo "Adding the library path to the atom launcher..."
    sudo sed -i "11i\ \\nexport LD_LIBRARY_PATH=/opt/gcc-5.4.0/lib64/:\$LD_LIBRARY_PATH\\n" /usr/bin/atom
    
    echo "Cleaning up the build directory..."
    cd ../ && rm -rf atom.x86_64.rpm gcc-5.4.0.tar.bz2 gcc-5.4.0
    
    echo "Install complete."
  20. alexisfrjp commented on Oct 16, 2020

    @alexisfrjp

    I don't know if you could launch the 1.52.0 Atom version in Centos 7.8. It doesn't launch anymore after the update.

    Why do you need to build gcc?! Can't we just use the devtoolset-7 package that provides gcc 7.3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions