fabianishere / brainfuck

Brainfuck interpreter written in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error on make; editline/readline.h: no such file or directory

smlavine opened this issue · comments

Hello. When I try to make the program, an error shows that editline/readline/h does not exist.

[ 40%] Built target libbrainfuck_static [ 60%] Building C object CMakeFiles/brainfuck.dir/src/main.c.o /media/sebastian/UUI/sml/Coding/BF/brainfuck/src/main.c:24:11: fatal error: editline/readline.h: No such file or directory #include <editline/readline.h> ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/brainfuck.dir/build.make:62: recipe for target 'CMakeFiles/brainfuck.dir/src/main.c.o' failed make[2]: *** [CMakeFiles/brainfuck.dir/src/main.c.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/brainfuck.dir/all' failed make[1]: *** [CMakeFiles/brainfuck.dir/all] Error 2

I have libedit in a directory in my home directory, and I have the dependencies required for that as well. Am I doing something wrong?

Hi! Are you sure the header files of libedit are on your include path?

What platform are you using exactly and how do you have the libedit library installed?

Currently, the compiler is in /media/sebastian/UUI/sml/Coding/BF/brainfuck, with the build directory in the brainfuck directory. The libedit directory is in /home/sebastian. I am on Ubuntu 17.10.

Does it build if you install libedit (e.g. sudo apt-get install libedit-dev)?

It built, but the command "brainfuck" doesn't work, even in the right directory.

In the build directory, you should invoke it by ./brainfuck instead of just brainfuck.

Could you verify that the brainfuck file is an ELF binary (file ./brainfuck) and you have execute permissions for the binary (ls -la ./brainfuck)?

It is an ELF, but I do not have execute permissions. It's really weird, even when I do chmod +x brainfuck, it doesn't change, and even changing it through Nautilus and selecting properties, it will uncheck the box when I check it, or change any other properties. It seems I don't have any permissions for it, even in root.

Running sudo chmod +rx brainfuck does not solve the issue? Did you run make as normal user by the way?

No, sudo chmod +rx brainfuck didn't do anything, and make was ran as a normal user.

What filesystem are you using? It could be related to your filesystem not supporting permissions or it being mounted as non-executable.

It works now! The problem was that the interpreter was on a flash drive, I think.
+++++++++++++++++++++[>++++[>+<-]<-]>>.++++++++++++++++++++.-------.+++++++++++++.---.<<++++++++[>++++[>>+<<-]<-]>>>.<++++++++++++++.----------.++++++.>.<+.-----------------.+++++++++++++.+++++++.>.<------------.++++++++.------------------.+++++.>+.