From: Yegor Yefremov via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Wojciech M . Zabolotny" <wzab01@gmail.com>
Subject: [Buildroot] [PATCH v2 2/2] package/avrdude: fix libserialport dependency
Date: Sat, 24 Oct 2026 00:57:51 +0200 [thread overview]
Message-ID: <20261023225751.2614512-2-yegorslists@googlemail.com> (raw)
In-Reply-To: <20261023225751.2614512-1-yegorslists@googlemail.com>
Since version 8.0, avrdude automatically detects and links against
libserialport when it finds it in the sysroot
(find_library(HAVE_LIBSERIALPORT ...) in CMakeLists.txt), and there is
no option to disable it.
Buildroot doesn't declare this dependency, so whether avrdude gets
libserialport support depends on the build order. With
BR2_PACKAGE_LIBSERIALPORT=y, building avrdude before libserialport
gives:
HAVE_LIBSERIALPORT:FILEPATH=HAVE_LIBSERIALPORT-NOTFOUND
while building libserialport first links avrdude against it. This
makes the build non-reproducible.
Add libserialport to the dependencies when it is enabled, and
otherwise pass -DHAVE_LIBSERIALPORT=OFF, so that find_library() skips
the search and libserialport support is disabled.
This issue has been present since commit 0e16ff09e953
("package/avrdude: bump to version 8.0"), as avrdude 8.0 added
libserialport detection. It therefore affects 2025.05 and later.
Fixes: 0e16ff09e9538d46c9726f8998080d55dfa5d41f ("package/avrdude: bump to version 8.0")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
Changes v1 -> v2:
- new patch
package/avrdude/avrdude.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/avrdude/avrdude.mk b/package/avrdude/avrdude.mk
index 476f031c99..fbad44a191 100644
--- a/package/avrdude/avrdude.mk
+++ b/package/avrdude/avrdude.mk
@@ -25,6 +25,12 @@ else ifeq ($(BR2_PACKAGE_LIBFTDI),y)
AVRDUDE_DEPENDENCIES += libftdi
endif
+ifeq ($(BR2_PACKAGE_LIBSERIALPORT),y)
+AVRDUDE_DEPENDENCIES += libserialport
+else
+AVRDUDE_CONF_OPTS += -DHAVE_LIBSERIALPORT=OFF
+endif
+
ifeq ($(BR2_PACKAGE_HIDAPI),y)
AVRDUDE_DEPENDENCIES += hidapi
endif
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-10-23 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 11:02 [Buildroot] [PATCH] package/avrdude: fix readline dependency Yegor Yefremov via buildroot
2026-10-23 22:57 ` [Buildroot] [PATCH v2 1/2] " Yegor Yefremov
2026-10-23 22:57 ` Yegor Yefremov via buildroot [this message]
2026-10-25 20:54 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023225751.2614512-2-yegorslists@googlemail.com \
--to=buildroot@buildroot.org \
--cc=wzab01@gmail.com \
--cc=yegorslists@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.