public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
  2026-03-03 16:28 [Buildroot] [PATCH] " Shubham Chakraborty
@ 2026-03-03 18:21 ` Shubham Chakraborty
  0 siblings, 0 replies; 6+ messages in thread
From: Shubham Chakraborty @ 2026-03-03 18:21 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Shubham Chakraborty

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 static toolchains.

Upstream: Inactive-Upstream [Buildroot specific]
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>

---
Changes v1 -> v2:
  - Fixed the malformed patch
  - Removed unnecessary whitespace

Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
---
 ...atic-linking-with-icu-uc-static-musl.patch | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch

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
new file mode 100644
index 0000000000..e17f6ac775
--- /dev/null
+++ b/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
@@ -0,0 +1,26 @@
+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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
       [not found] <mailman.37807.1772576641.2009750.buildroot@buildroot.org>
@ 2026-03-04  4:35 ` Andreas Ziegler
  2026-03-04  6:54   ` Shubham Chakraborty
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Ziegler @ 2026-03-04  4:35 UTC (permalink / raw)
  To: Shubham Chakraborty; +Cc: buildroot, Thomas Petazzoni, Romain Naour

Hi Shubham,

[add Romain Naour -> author of 0003]

The commit message in patch #3 states it addresses the static linking, 
but changes the shared linking statement instead. Since it obviously 
works, probably the commit message is wrong? Or can this patch simply be 
replaced with yours?

(patch related remarks below)

On 2026-03-03 23:51, Shubham Chakraborty wrote:
> 
> 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 static toolchains.
        ^^^^
This probably affects not only musl toolchains.

> 
> Upstream: Inactive-Upstream [Buildroot specific]
> Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> 
> ---
> Changes v1 -> v2:
>   - Fixed the malformed patch
>   - Removed unnecessary whitespace
> 
> Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> ---
>  ...atic-linking-with-icu-uc-static-musl.patch | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 
> package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
> 
> 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
> new file mode 100644
> index 0000000000..e17f6ac775
> --- /dev/null
> +++ b/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
> @@ -0,0 +1,26 @@
> +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.

The existing 0003-fix-static-linking-with-icu-uc.patch could be replaced 
with a patch that addresses both issues.

> +
> +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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
  2026-03-04  4:35 ` [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains Andreas Ziegler
@ 2026-03-04  6:54   ` Shubham Chakraborty
  2026-03-08 11:44     ` Shubham Chakraborty
  0 siblings, 1 reply; 6+ messages in thread
From: Shubham Chakraborty @ 2026-03-04  6:54 UTC (permalink / raw)
  To: br025; +Cc: buildroot, thomas.petazzoni, romain.naour

Hi Andreas,

Thanks for the review.

I will send a v3 that replaces both 0003 and 0004 with a single
patch adding -lstdc++ to both Libs and Libs.private, with no
musl-specific language.

Romain, would you be okay with me adding your Co-developed-by
and Signed-off-by tags to the combined patch?

Best regards,
Shubham Chakraborty
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
  2026-03-04  6:54   ` Shubham Chakraborty
@ 2026-03-08 11:44     ` Shubham Chakraborty
  2026-03-26  7:01       ` Shubham Chakraborty
  0 siblings, 1 reply; 6+ messages in thread
From: Shubham Chakraborty @ 2026-03-08 11:44 UTC (permalink / raw)
  To: br025; +Cc: buildroot, thomas.petazzoni, Romain Naour


[-- Attachment #1.1: Type: text/plain, Size: 588 bytes --]

Resending as previous email bounced from romain.naour@openwide.fr.
Using gmail address from DEVELOPERS file instead.

On Wed, Mar 4, 2026 at 12:24 PM Shubham Chakraborty <
chakrabortyshubham66@gmail.com> wrote:

> Hi Andreas,
>
> Thanks for the review.
>
> I will send a v3 that replaces both 0003 and 0004 with a single
> patch adding -lstdc++ to both Libs and Libs.private, with no
> musl-specific language.
>
> Romain, would you be okay with me adding your Co-developed-by
> and Signed-off-by tags to the combined patch?
>
> Best regards,
> Shubham Chakraborty
>

[-- Attachment #1.2: Type: text/html, Size: 969 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
  2026-03-08 11:44     ` Shubham Chakraborty
@ 2026-03-26  7:01       ` Shubham Chakraborty
  2026-03-26  8:13         ` Andreas Ziegler
  0 siblings, 1 reply; 6+ messages in thread
From: Shubham Chakraborty @ 2026-03-26  7:01 UTC (permalink / raw)
  To: br025; +Cc: buildroot, thomas.petazzoni, Romain Naour


[-- Attachment #1.1: Type: text/plain, Size: 1203 bytes --]

Hi Andreas,

Romain doesn’t seem to be active, so I’d like your guidance on how to
proceed.

For v3, would you prefer that I:

   1. regenerate a single combined patch (replacing 0003 and 0004) using
   git format-patch, or
   2. keep 0003 and update it by editing the existing patch to include my
   changes?

Also, in this case, should I keep only my Signed-off-by, or retain Romain’s
attribution in some form?

Thanks for your guidance.

Best regards,
Shubham

On Sun, Mar 8, 2026 at 5:14 PM Shubham Chakraborty <
chakrabortyshubham66@gmail.com> wrote:

> Resending as previous email bounced from romain.naour@openwide.fr.
> Using gmail address from DEVELOPERS file instead.
>
> On Wed, Mar 4, 2026 at 12:24 PM Shubham Chakraborty <
> chakrabortyshubham66@gmail.com> wrote:
>
>> Hi Andreas,
>>
>> Thanks for the review.
>>
>> I will send a v3 that replaces both 0003 and 0004 with a single
>> patch adding -lstdc++ to both Libs and Libs.private, with no
>> musl-specific language.
>>
>> Romain, would you be okay with me adding your Co-developed-by
>> and Signed-off-by tags to the combined patch?
>>
>> Best regards,
>> Shubham Chakraborty
>>
>

[-- Attachment #1.2: Type: text/html, Size: 2046 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains
  2026-03-26  7:01       ` Shubham Chakraborty
@ 2026-03-26  8:13         ` Andreas Ziegler
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Ziegler @ 2026-03-26  8:13 UTC (permalink / raw)
  To: Shubham Chakraborty; +Cc: buildroot, thomas.petazzoni, Romain Naour

Hi Shubham,

On 2026-03-26 07:01, Shubham Chakraborty wrote:
> Hi Andreas,
> 
> Romain doesn’t seem to be active, so I’d like your guidance on how to
> proceed.
> 
> For v3, would you prefer that I:
> 
>    1. regenerate a single combined patch (replacing 0003 and 0004) 
> using
>    git format-patch, or
>    2. keep 0003 and update it by editing the existing patch to include 
> my
>    changes?
> 
> Also, in this case, should I keep only my Signed-off-by, or retain 
> Romain’s
> attribution in some form?
> 

What I would do is this: Add a comment below the last Signed-off-by, add 
your Signed-off-by, and then modify the patch itself accordingly.

<example>

Add -lstdc++ in Libs.private of icu-uc.pc.

Fixes:
http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
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 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff -git icu.orig/source/Makefile.in icu/source/Makefile.in

</example>

> Thanks for your guidance.
> 
> Best regards,
> Shubham

<cut>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-26  8:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.37807.1772576641.2009750.buildroot@buildroot.org>
2026-03-04  4:35 ` [Buildroot] [PATCH v2] package/icu: fix static linking with icu-uc for musl static toolchains Andreas Ziegler
2026-03-04  6:54   ` Shubham Chakraborty
2026-03-08 11:44     ` Shubham Chakraborty
2026-03-26  7:01       ` Shubham Chakraborty
2026-03-26  8:13         ` Andreas Ziegler
2026-03-03 16:28 [Buildroot] [PATCH] " Shubham Chakraborty
2026-03-03 18:21 ` [Buildroot] [PATCH v2] " Shubham Chakraborty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox