arduino/arduino-builder

avr-g++: error: cannot access device-specs for 'atmega328p' expected at 'device-specs/specs-atmega328p'

Closed this issue · 4 comments

Ubuntu 16.04 with KDE installed but this error is via ssh at the CLI. Newly installed using the latest golang, arduino-builder and IDE, all installed from respective tar.gz-type files (none from Ubuntu repository), striclty using the default directory locations. I got the error BOTH with AND without running the IDE for it to make the ~/.arduino15 directory on its first compile+download. The download to the board via IDE was successful, unlike results with arduino-builder.

The command lines that produced the error, run from their respective directories, are:

./main -hardware /home/homeowner/arduino-1.8.5/hardware -tools /home/homeowner/arduino-1.8.5/tools -fqbn arduino:avr:uno ~/arduino.dir/thermostat.v.0.0.004/thermostat.v.0.0.004.ino

as well as

./arduino-builder -hardware /home/homeowner/arduino-1.8.5/hardware -tools /home/homeowner/arduino-1.8.5/tools -fqbn arduino:avr:uno -debug-level 1 -compile ~/arduino.dir/thermostat.v.0.0.004/thermostat.v.0.0.004.ino

The IDE executed the following command as it compiles:

/home/homeowner/arduino-1.8.5/arduino-builder -compile -logger=machine -hardware /home/homeowner/arduino-1.8.5/hardware -hardware /home/homeowner/Arduino/hardware -tools /home/homeowner/arduino-1.8.5/tools-builder -tools /home/homeowner/arduino-1.8.5/hardware/tools/avr -built-in-libraries /home/homeowner/arduino-1.8.5/libraries -libraries /home/homeowner/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path /tmp/arduino_build_216182 -warnings=null -prefs=build.warn_data_percentage=75 /home/homeowner/Arduino/thermostat/thermostat.ino

and executes the following command as it uploads:

/home/homeowner/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/homeowner/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -q -q -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_216182/thermostat.ino.hex:i

Both also work from CLI via ssh immediately following execution by IDE.

(Note that one error along my travels was

fork/exec /bin/avr-g++: no such file or directory

for which I made the following link:

ln /home/homeowner/Arduino/build/linux/work/hardware/tools/avr/bin/avr-g++ /bin

Maybe that was the incorrect way to handle that?????)

I do notice a capitalization difference in the name of the ~/arduino-1.8.5 directory. One of the machines has it existing as ~/Arduino-1.8.5. Will investigate....
...after investigating a few minutes worth, I found that the lower cased directory name came from a file named arduino-1.8.5-linux64.tar.xz while the upper cased directory was from the file named Arduino-1.8.5.tar.xz. Haven't looked yet to see where I got each one....

Hi @kenneth558 ,
the builder can also work in a fully standalone way when all the paths are configured correctly. The first command is missing tools-builder folder which contains ctags, needed to forward-declare missing prototypes.

Furthermore, /bin/avr-g++ error means that {runtime.avr-gcc.path} could not be expanded by the builder since it didn't find any matching tool. On a normal installation (if you only need avr support) tools live in $arduinoBaseFolder/hardware/tools/avr so you need to add that path to -tools to let the builder find the compiler. No symlink needed 😉

Please close the issue if this answers your doubts, thanks!

I'll close the issue b/c I'm confident I can enact a workaround for my own needs. The puzzling fact that there are multiple versions of the IDE 1.8.5 (one unzipping with and the other unzipping seemingly without arduino-builder, as gleaned from searching my post-unzip directories) hopefully will not totally block my project's progress further, though it does indicate teamwork issues.

As I closed this, I was in the process of looking at the contrasting outputs of the two IDE tar files as shown by running the following command on both of them:

tar -tf Downloads/arduino-1.8.5-linux64.tar.xz|grep builder

and

tar -tf Downloads/Arduino-1.8.5.tar.xz|grep builder

The differences between the two zip files, which I don't include here, should be made known to the development team members involved. I feel pretty sure that differences like what you'll see there can produce frustrating scenarios between end users and development team members who assist them when each is using a different setup.

Arduino-1.8.5.tar.xz is not an official build. All the official ones are listed on https://www.arduino.cc/en/Main/Software and these are the checksums.
Any other distribution is to be considered unofficial and totally unsupported. Thanks

Very nice to know! Thank you and Lord bless!!!