Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“:TSInstall norg” command stuck on compiling #36

Open
alandao opened this issue Feb 18, 2022 · 3 comments
Open

“:TSInstall norg” command stuck on compiling #36

alandao opened this issue Feb 18, 2022 · 3 comments

Comments

@alandao
Copy link

alandao commented Feb 18, 2022

theHamsta@ from nvim-treesitter/nvim-treesitter recommended me to forward this issue here.

Describe the bug

I’m not able to install the norg parser. It never finishes compiling.

To Reproduce

  1. Open up nvim
  2. Run :TSInstall norg

Expected behavior

I expected the norg parser to be installed within a few seconds

Output of :checkhealth nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check()                                                                           
========================================================================                                                             
## Installation                                                                                                                      
  - WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :           TSInstall)                                                                                                                         
  - OK: `node` found v14.18.1 (only needed for :TSInstallFromGrammar)                                                                
  - OK: `git` executable found.                                                                                                      
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }                                          
    Version: gcc (GCC) 10.3.0                                                                                                        
  - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.    
                                                                                                                                     
## Parser/Features H L F I J                                                                                                         
  - nix            ✓ ✓ ✓ . ✓                                                                                                         
  - clojure        ✓ ✓ ✓ . ✓                                                                                                         
                                                                                                                                     
  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections                                                                    
         +) multiple parsers found, only one will be used                                                                            
         x) errors found in the query, try to run :TSUpdate {lang}

Output of nvim --version

NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by nixbld

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/nix/store/29bl3zlp96r1w8d0ii3zcim1p9fdk1xm-neovim-unwrapped-0.6.1/share/nvim
"

Run :checkhealth for more info

Additional context

No response

@alandao
Copy link
Author

alandao commented Feb 21, 2022

From nvim-treesitter/nvim-treesitter#2538, I was able to successfully run ":TSInstall norg" after installing gnumake on NixOS

@toshmukhamedov
Copy link

I also got error when I try to install it with :TSInstall norg

Check health


==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.22.5 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.12.2 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "arm64",
  release = "23.4.0",
  sysname = "Darwin",
  version = "Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - fish                ✓ ✓ ✓ ✓ ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - norg_meta           ✓ . . ✓ .
  - proto               ✓ . ✓ . .
  - rust                ✓ ✓ ✓ ✓ ✓
  - toml                ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vimdoc              ✓ . . . ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

Neovim version

NVIM v0.10.0-dev-2995+ga1550dbf0-Homebrew
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info

Error log

nvim-treesitter[norg]: Error during compilation                                                                                                                          
src/scanner.cc:176:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]                                                                            
enum class TagType : char                                                                                                                                                
     ^                                                                                                                                                                   
src/scanner.cc:194:10: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]                                                                          
    for (auto& elem : vec)                                                                                                                                               
         ^                                                                                                                                                               
src/scanner.cc:194:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]                                                                           
    for (auto& elem : vec)                                                                                                                                               
                    ^                                                                                                                                                    
src/scanner.cc:213:16: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    m_Previous = 0,  // previous char                                                                                                                                    
               ^                                                                                                                                                         
src/scanner.cc:214:15: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    m_Current = 0;   // current char                                                                                                                                     
              ^                                                                                                                                                          
src/scanner.cc:216:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    TagType m_TagContext = TagType::NONE;                                                                                                                                
                         ^                                                                                                                                               
src/scanner.cc:217:23: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    size_t m_TagLevel = 0;                                                                                                                                               
                      ^                                                                                                                                                  
src/scanner.cc:219:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    bool m_InLinkLocation = false;                                                                                                                                       
                          ^                                                                                                                                              
src/scanner.cc:223:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    TokenType m_LastToken = NONE;                                                                                                                                        
                          ^                                                                                                                                              
src/scanner.cc:226:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    size_t m_ParsedChars = 0;                                                                                                                                            
                         ^                                                                                                                                               
src/scanner.cc:228:50: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const array<int32_t, 12> m_DetachedModifiers = {                                                                                                                     
                                                 ^                                                                                                                       
src/scanner.cc:243:74: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const unordered_map<int32_t, TokenType> m_DetachedModifierExtensions = {                                                                                             
                                                                         ^                                                                                               
src/scanner.cc:256:65: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const unordered_map<int32_t, TokenType> m_AttachedModifiers = {                                                                                                      
                                                                ^                                                                                                        
src/scanner.cc:811:6: error: expected expression                                                                                                                         
    [[nodiscard]]                                                                                                                                                        
     ^                                                                                                                                                                   
src/scanner.cc:812:5: error: expected member name or ';' after declaration specifiers  

@AyaanAhmed25
Copy link

I also got error when I try to install it with :TSInstall norg

Check health


==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.22.5 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.12.2 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "arm64",
  release = "23.4.0",
  sysname = "Darwin",
  version = "Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - fish                ✓ ✓ ✓ ✓ ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - norg_meta           ✓ . . ✓ .
  - proto               ✓ . ✓ . .
  - rust                ✓ ✓ ✓ ✓ ✓
  - toml                ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vimdoc              ✓ . . . ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

Neovim version

NVIM v0.10.0-dev-2995+ga1550dbf0-Homebrew
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info

Error log

nvim-treesitter[norg]: Error during compilation                                                                                                                          
src/scanner.cc:176:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]                                                                            
enum class TagType : char                                                                                                                                                
     ^                                                                                                                                                                   
src/scanner.cc:194:10: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]                                                                          
    for (auto& elem : vec)                                                                                                                                               
         ^                                                                                                                                                               
src/scanner.cc:194:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]                                                                           
    for (auto& elem : vec)                                                                                                                                               
                    ^                                                                                                                                                    
src/scanner.cc:213:16: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    m_Previous = 0,  // previous char                                                                                                                                    
               ^                                                                                                                                                         
src/scanner.cc:214:15: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    m_Current = 0;   // current char                                                                                                                                     
              ^                                                                                                                                                          
src/scanner.cc:216:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    TagType m_TagContext = TagType::NONE;                                                                                                                                
                         ^                                                                                                                                               
src/scanner.cc:217:23: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    size_t m_TagLevel = 0;                                                                                                                                               
                      ^                                                                                                                                                  
src/scanner.cc:219:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    bool m_InLinkLocation = false;                                                                                                                                       
                          ^                                                                                                                                              
src/scanner.cc:223:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    TokenType m_LastToken = NONE;                                                                                                                                        
                          ^                                                                                                                                              
src/scanner.cc:226:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    size_t m_ParsedChars = 0;                                                                                                                                            
                         ^                                                                                                                                               
src/scanner.cc:228:50: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const array<int32_t, 12> m_DetachedModifiers = {                                                                                                                     
                                                 ^                                                                                                                       
src/scanner.cc:243:74: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const unordered_map<int32_t, TokenType> m_DetachedModifierExtensions = {                                                                                             
                                                                         ^                                                                                               
src/scanner.cc:256:65: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]                                          
    const unordered_map<int32_t, TokenType> m_AttachedModifiers = {                                                                                                      
                                                                ^                                                                                                        
src/scanner.cc:811:6: error: expected expression                                                                                                                         
    [[nodiscard]]                                                                                                                                                        
     ^                                                                                                                                                                   
src/scanner.cc:812:5: error: expected member name or ';' after declaration specifiers  

I also had this issue, there are steps in documentation to resolve this.

If you are on mac, for some reason for me even compiling it with clang 15 (installed via xcode-select --install) didnt work, I had to set CC to gcc-14 (installed via homebrew) for it to finally compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants