Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#856870: arduino-mk: Wrong directory (/usr/etc) used for avrdude config

238 views
Skip to first unread message

Tobias Diedrich

unread,
Mar 5, 2017, 1:00:02 PM3/5/17
to
Package: arduino-mk
Version: 1.5.2-1
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Maintainer,

https://anonscm.debian.org/cgit/debian-science/packages/arduino-mk.git/commit/?h=upstream&id=b368558d19605c9dc088e1a5f32de6c2fd5755b2
introduced a regression where now "make ispload" tries to run "avrdude [...] -C /usr/etc/avrdude.conf".

This is apparently caused by "Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278)".
Previously "-C path_to_config" was not added by default.
Now it uses ${AVR_TOOLS_DIR}/etc/avrdude.conf or ${AVR_TOOLS_DIR}/../avrdude.conf (depending on $(ARDUINO_VERSION)).
Furthermore, "dpkg -S avrdude.conf" shows:

$ dpkg -S avrdude.conf
avrdude: /etc/avrdude.conf
arduino-core: /usr/share/arduino/hardware/tools/avrdude.conf

$ ls -l /usr/share/arduino/hardware/tools/avrdude*
lrwxrwxrwx 1 root root 23 Apr 7 2014 /usr/share/arduino/hardware/tools/avrdude -> ../../../../bin/avrdude
lrwxrwxrwx 1 root root 17 Apr 7 2014 /usr/share/arduino/hardware/tools/avrdude.conf -> /etc/avrdude.conf

And AVR_TOOLS_DIR is detected as /usr rather than /usr/share/arduino/hardware/tools.
Also even if it was using /usr/share/arduino/hardware/tools, both ${AVR_TOOLS_DIR}/etc/avrdude.conf and ${AVR_TOOLS_DIR}/../avrdude.conf would not find the config AFAICS.

ii arduino-core 2:1.5.6.2+sdfsg2-3 all Code, examples, and libraries for the Arduino platform

- -- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.5 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages arduino-mk depends on:
ii arduino-core 2:1.5.6.2+sdfsg2-3
ii make 4.1-9.1
ii python 2.7.13-2
ii python-serial 3.2.1-1

Versions of packages arduino-mk recommends:
ii screen 4.5.0-3

arduino-mk suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iHsEARECADsWIQRxaBGQN9IG6CSWJyjmr+x6msfgvAUCWLxFhR0ccmFubWErZGVi
aWFuYnRzQHRkaWVkcmljaC5kZQAKCRDmr+x6msfgvISeAJ9RFkskeg+SGEivptgt
vmEVjkjkZACghKDD3VxhJtlI33URJQf30wjYiKE=
=yLpw
-----END PGP SIGNATURE-----

Joey Hess

unread,
Feb 14, 2022, 2:30:04 PM2/14/22
to
Version: 1.5.2-2.1

I'm now seeing this bug. Oddly, I did not see the bug back in 2020,
when I was successfully using arduino-mk. But now:

make do_upload
make[1]: Entering directory '/home/joey/src/arduino-copilot/Examples/Blink'
/usr/share/arduino/hardware/tools/avr/bin/avrdude -q -V -p atmega328p -C /usr/share/arduino/hardware/tools/avr/etc/avrdude.conf -D -c arduino -b 115200 -P /dev/ttyUSB0 \
-U flash:w:build-uno/Blink_.hex:i
avrdude: can't open config file "/usr/share/arduino/hardware/tools/avr/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "/usr/share/arduino/hardware/tools/avr/etc/avrdude.conf"
make[1]: *** [/usr/share/arduino/Arduino.mk:1462: do_upload] Error 1
make[1]: Leaving directory '/home/joey/src/arduino-copilot/Examples/Blink'
make: *** [/usr/share/arduino/Arduino.mk:1455: upload] Error 2

I think it was probably fixed in the interim and then broken again,
since the path is different than in the original bug report.

My workaround:

root@darkstar:/usr/share/arduino/hardware/tools/avr>mkdir etc
root@darkstar:/usr/share/arduino/hardware/tools/avr>cd etc
root@darkstar:/usr/share/arduino/hardware/tools/avr/etc>ln -s /etc/avrdude.conf

--
see shy jo
signature.asc
0 new messages