raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
878 stars 221 forks source link

make not working on Ubuntu 22.04 #183

Closed rebeccaRossRobotics closed 1 year ago

rebeccaRossRobotics commented 1 year ago

Describe the bug

I followed the instructions for building on linux, but get an error when running make

rebecca@rebecca-ThinkPad-L14-Gen-1:~$ cd usbboot/
rebecca@rebecca-ThinkPad-L14-Gen-1:~/usbboot$ make
cc -Wall -Wextra -g -o bin2c bin2c.c
make: cc: No such file or directory
make: *** [Makefile:13: bin2c] Error 127
rebecca@rebecca-ThinkPad-L14-Gen-1:~/usbboot$ 

Steps to reproduce the behaviour

Device(s)

Other

Compute Module IO board.

No response

RPIBOOT logs

No response

Kernel logs

No response

Device UART logs

No response

pelwell commented 1 year ago

The error message is saying that "cc" isn't a recognised program. Either you have no C compiler installed or "make" hasn't been configured to use it by default.

What does which gcc report? If it finds something, try make CC=gcc.

rebeccaRossRobotics commented 1 year ago

Hi Thanks for the speedy response!

which gcc doesn't return anything.

rebecca@rebecca-ThinkPad-L14-Gen-1:~$ which gcc
rebecca@rebecca-ThinkPad-L14-Gen-1:~$ 

I assume that means i haven't got a c compiler installed as you suggested. Which would make sense as I clean installed ubuntu a couple of days ago

ghollingworth commented 1 year ago

sudo apt install build-essential

Should be the right thing then.

If this works, please close the issue... Thx

rebeccaRossRobotics commented 1 year ago

yes that was it! thanks so much!