0

I've met problems when I edit MakeFile, and the original code is as below:

 TERMINAL :=terminator
 debug: 
 $(UCOREIMG)
 $(V)$(QEMU) -S -s -parallel stdio -hda $< -serial null &
 $(V)sleep 2
 $(V)$(TERMINAL)  -e "cgdb -q -x ./tools/gdbinit"

And when I use the command"make debug", I was given:

/bin/sh: 1: terminator: not found
Makefile:221: recipe for target 'debug' failed
make: *** [debug] Error 127
peanuts
  • 35
  • 1
  • 5
  • 1
    Did you try to replace `terminator` with a terminal emulator that you have on your system, such as `xterm` or `gnome-terminal`? – Dima Chubarov Mar 08 '18 at 15:35
  • Indenting everything with a single space is probably part of the problem. `TERMINAL` and `debug` should be blocked-left. The stuff under `debug:` should be indented with a tab. Also see [Can you make valid Makefiles without tab characters?](https://stackoverflow.com/q/2131213/608639), [When to use space or tab in Makefile?](https://stackoverflow.com/q/28712585/608639), [What is the reasoning behind the Makefile whitespace syntax?](https://stackoverflow.com/q/1755550/608639), etc. – jww Mar 08 '18 at 18:27
  • That's exactly what I am confusing, I've tried several emulator's name, they just didn't work. I want to know what the emulator's name is. – peanuts Mar 11 '18 at 03:48

1 Answers1

0

You can do several things:

  • Install terminator on your system. This can be the best option, as your Makefile requests for it.

  • Use another terminal emulator like xterm or gnome-terminal for that. cgdb will run on them without any problem also, and you'll have a fast way to solve the problem without having to dig where terminator comes from. For this, just substitute terminator with gnome-terminal or xterm in the Makefile.

  • If you run on a linux console, without the possibility of launching a virtual terminal application, then you have to do more work and switch to another console an execute there the command by hand. For that:

    # switch to tty02, for example.
    cd "the/directory/where/the/terminator/program/was/tried"
    cgdb -q -x ./tools/gdbinit
    
Luis Colorado
  • 10,974
  • 1
  • 16
  • 31