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

NixOs can't compile parser #53

Open
LamprosPitsillos opened this issue Aug 28, 2023 · 1 comment
Open

NixOs can't compile parser #53

LamprosPitsillos opened this issue Aug 28, 2023 · 1 comment

Comments

@LamprosPitsillos
Copy link

Downloading tree-sitter-norg...
Creating temporary directory
Extracting tree-sitter-norg...
Compiling...
cc -c -Os -std=c99 -fPIC -I./src -o parser.o src/parser.c
cc -c -Os -std=c++14 -fPIC -I./src -o scanner.o src/scanner.cc
src/scanner.cc:1:10: fatal error: 'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 error generated.
make: *** [/home/inferno/.local/share/nvim/lazy/nvim-treesitter/scripts/compile_parsers.makefi
le:41: scanner.o] Error 1
Error during compilation
Failed to execute the following command:
{
  cmd = "make",
  err = "Error during compilation",
  info = "Compiling...",
  opts = {
    args = { "--makefile=/home/inferno/.local/share/nvim/lazy/nvim-treesitter/scripts/compile_
parsers.makefile", "CC=cc", "CXX_STANDARD=c++14" },
    cwd = "/home/inferno/.local/share/nvim/tree-sitter-norg"                                  
  }
}                                 

I am trying to install a treesitter parser and i get this C++ error, fatal error: 'algorithm' file not found , what could be causing this ?

@3rd
Copy link

3rd commented Nov 2, 2023

Ran into this for both norg and one of my grammars.
If this happens it's an issue with the system-installed gcc and not Neorg-related.
Check if entering a shell with nix-shell -p gcc, opening Neovim in it, and installing the Neorg parser works.

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

2 participants