Closed jlxip closed 5 years ago
You should be aware that even though you compile statically linked binaries, there are still some external resources that your executable file may rely on. In this particular case you rely on terminal information which is not provided by MLS.
Run the program with strace
in the Minimal OS environment. You can use static-get to obtain strace
. You will find out the problem is that there is no information about the different supported terminals. The information for the different terminals can be taken from the terminfo
package from static-get
(or you can copy it from your existing machine). After that you should set the TERM
environment variable to point to some known terminal information and you should be just fine.
Thank you very much! That worked perfectly. There's only so many things to learn about GNU/Linux.
Hi again. So this time I was coding a really simple NCurses program:
I compile this with
g++ test.cpp -o test -static -lncurses -ltinfo
, and gives no errors.Then, I run it on my machine, and works like a charm.
The thing is that when I copy the binary into the filesystem of the OS, when I run it from a VM, it prints:
Error opening terminal: linux
. So I'm guessing there's something missing, but I haven't been able to figure out what.Ideas?