public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
From: Andreas Ziegler <br025@umbiko.net>
To: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Cc: buildroot@buildroot.org, thomas.petazzoni@bootlin.com,
	romain.naour@gmail.com
Subject: Re: [Buildroot] [PATCH v3] package/icu: fix static linking with icu-uc
Date: Fri, 27 Mar 2026 04:27:03 +0000	[thread overview]
Message-ID: <8fff630f63cf5dbca36e7efe3a8f13ef@umbiko.net> (raw)
In-Reply-To: <20260326113620.2433228-1-chakrabortyshubham66@gmail.com>

Hi Shubham,

On 2026-03-26 11:36, Shubham Chakraborty wrote:
> Extend the existing patch to also add -lstdc++ to the Libs
> field, fixing static linking issues with libicuuc.a.
> 
> This combines the previous 0003 and 0004 changes into a
> single patch, following review feedback from Andreas.
> 
> Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> ---
> Changes v2 -> v3:
>   - Merge previous 0003 and 0004 into a single patch
>   - Extend existing fix to also add -lstdc++ to Libs (static linking 
> case)
>   - Keep original authorship and add my Signed-off-by below Romain's
>   - Update commit message and description based on review feedback
> ---
>  .../0003-fix-static-linking-with-icu-uc.patch | 29 ++++++++++++-------
>  ...atic-linking-with-icu-uc-static-musl.patch | 26 -----------------
>  2 files changed, 19 insertions(+), 36 deletions(-)
>  delete mode 100644 
> package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
> 
> diff --git a/package/icu/0003-fix-static-linking-with-icu-uc.patch 
> b/package/icu/0003-fix-static-linking-with-icu-uc.patch
> index 36a3d1f696..ec393254e8 100644
> --- a/package/icu/0003-fix-static-linking-with-icu-uc.patch
> +++ b/package/icu/0003-fix-static-linking-with-icu-uc.patch
> @@ -3,9 +3,6 @@ From: Romain Naour <romain.naour@openwide.fr>
>  Date: Wed, 22 Jul 2015 22:43:25 +0200
>  Subject: [PATCH] fix static linking with icu-uc
> 
> -During static linking with a C application and libicuuc.a,
> --lstdc++ is required.
> -
>  Add -lstdc++ in Libs.private of icu-uc.pc.
> 
>  Fixes:
> @@ -13,14 +10,26 @@ 
> http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef52
> 
>  Signed-off-by: Romain Naour <romain.naour@openwide.fr>
>  ---
> - source/Makefile.in | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> +This patch currently addresses linking against stdc++ for 
> shared-library
> +builds. Add -lstdc++ to the static build flags also, to fix 'undefined
> +reference' errors when linking programs like xmlcatalog (libxml2)
> +with musl static toolchains.
> +
> +Upstream: Inactive-Upstream [Buildroot specific]
> +Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> +---
> + source/Makefile.in | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> -diff -git icu.orig/source/Makefile.in icu/source/Makefile.in
> ---- icu.orig/source/Makefile.in	2025-03-13 19:31:23.000000000 +0100
> -+++ icu/source/Makefile.in	2025-09-22 08:56:36.791792784 +0200
> -@@ -279,7 +279,7 @@
> - 	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" 
> '$${baselibs}' >> $@
> +diff --git icu.orig/source/Makefile.in icu/source/Makefile.in
> +--- icu.orig/source/Makefile.in
> ++++ icu/source/Makefile.in
> +@@ -279,10 +279,10 @@ config/icu-uc.pc: config/icu.pc Makefile 
> icudefs.mk
> + 	@echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data 
> libraries" >> $@
> + 	@echo "Name: $(PACKAGE)-uc" >> $@
> + ifeq ($(ENABLE_SHARED),)
> +-	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" 
> '$${baselibs}' >> $@
> ++	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" 
> '$${baselibs}' -lstdc++ >> $@
>   else
>   	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" >> $@
>  -	@echo "Libs.private:" "${ICULIBS_DT}" '$${baselibs}' >> $@
> diff --git 
> a/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch 
> b/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
> deleted file mode 100644
> index e17f6ac775..0000000000
> --- a/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
> +++ /dev/null

Your patch seems not to be based on the current Buildroot master branch. 
It cannot be applied, unfortunately.

> @@ -1,26 +0,0 @@
> -From 2107f9dfb39eeb6559fb4271c7af8b39aef521ca Mon Sep 17 00:00:00 2001
> -From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> -Date: Tue, 3 Mar 2026 10:00:00 +0000
> -Subject: [PATCH] fix static linking with icu-uc (static case)
> -
> -During static linking with a C application and libicuuc.a,
> --lstdc++ is required. The previous patch (0003) only addressed the
> -shared library case (Libs.private). This patch adds -lstdc++ to the
> -main Libs line for the static case to fix undefined reference
> -errors when linking programs like xmlcatalog (libxml2) with
> -musl toolchains.
> -
> -Upstream: Inactive-Upstream [Buildroot specific]
> -Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> ----
> - source/Makefile.in | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff -git icu.orig/source/Makefile.in icu/source/Makefile.in
> ---- icu.orig/source/Makefile.in
> -+++ icu/source/Makefile.in
> -@@ -281,3 +281,3 @@
> - ifeq ($(ENABLE_SHARED),)
> --	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" 
> '$${baselibs}' >> $@
> -+	@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" 
> '$${baselibs}' -lstdc++ >> $@
> - else
> --
> 2.53.0

Kind regards,
Andreas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-03-27  4:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 16:28 [Buildroot] [PATCH] package/icu: fix static linking with icu-uc for musl static toolchains Shubham Chakraborty
2026-03-03 18:21 ` [Buildroot] [PATCH v2] " Shubham Chakraborty
2026-03-26 11:36   ` [Buildroot] [PATCH v3] package/icu: fix static linking with icu-uc Shubham Chakraborty
2026-03-27  4:27     ` Andreas Ziegler [this message]
2026-03-27  9:50       ` Shubham Chakraborty
2026-03-27  9:43     ` [Buildroot] [PATCH v4] Extend the existing patch to also add -lstdc++ to the Libs field, fixing static linking issues with libicuuc.a Shubham Chakraborty
2026-03-28  5:30       ` Andreas Ziegler
2026-03-28  8:16         ` Shubham Chakraborty
2026-03-28  7:47       ` [Buildroot] [PATCH v5] icu: fix static linking by adding -lstdc++ to pkg-config Shubham Chakraborty
2026-03-29  6:33         ` Andreas Ziegler

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=8fff630f63cf5dbca36e7efe3a8f13ef@umbiko.net \
    --to=br025@umbiko.net \
    --cc=buildroot@buildroot.org \
    --cc=chakrabortyshubham66@gmail.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox