UCTRONICS_Smart_Robot_Car_RaspberryPi icon indicating copy to clipboard operation
UCTRONICS_Smart_Robot_Car_RaspberryPi copied to clipboard

/etc/rc.local fails to compile robot car when 'make clean' has error

Open mike-sfg opened this issue 6 years ago • 0 comments

The /etc/rc.local script contains this section of code:

cd /home/pi/UCTRONICS_Smart_Robot_Car_RaspberryPi/C/ sudo make clean sudo make sudo ./UCTRONICS_Smart_Robot_Car_RaspberryPi

When running sudo make clean it tries to delete a number of files from a previous compilation. If it doesn't find the file UCTRONICS_Smart_Robot_Car_RaspberryPi it will return an error and the next step 'sudo make' won't work.

Sometimes my robot car fails to compile the program upon boot-up and when I try to manually run the /etc/rc.local script, it gives this error. I'm not sure why this happens -- perhaps it was due to an improper shutdown.

Perhaps the makefile needs to ignore nonexistent files for clean targets. Or the workaround I used was to modify rc.local to simply execute the existing binary application instead of re-compiling it each time.

mike-sfg avatar Jan 05 '19 22:01 mike-sfg