Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904696 - dev-libs/libedit build error on musl-based system: "wchar_t must store ISO 10646 characters"
Summary: dev-libs/libedit build error on musl-based system: "wchar_t must store ISO 10...
Status: RESOLVED DUPLICATE of bug 870001
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-20 07:37 UTC by Eike Beyer
Modified: 2023-04-20 10:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log of dev-libs/libedit (build.log,24.45 KB, text/x-log)
2023-04-20 07:37 UTC, Eike Beyer
Details
emerge --info '=dev-libs/libedit-20221030.3.1::gentoo' (emerge--info.txt,6.53 KB, text/plain)
2023-04-20 07:41 UTC, Eike Beyer
Details
Patch for the package with this workaround (musl-workaround.patch,507 bytes, patch)
2023-04-20 07:43 UTC, Eike Beyer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Beyer 2023-04-20 07:37:40 UTC
Created attachment 860422 [details]
Build log of dev-libs/libedit

Hi. I'm getting error on a system with musl while buildihg dev-libs/libedit:

> error: wchar_t must store ISO 10646 characters        #error wchar_t must store ISO 10646 characters

Some little googling is giving me this solution:

> Musl is ISO 10646 compliant but doesn't define __STDC_ISO_10646__, so
let's define it manually.

(link removed by new account restrictions of bugzilla)

So i made this workaround for the ebuild:

--- /var/db/repos/gentoo/dev-libs/libedit/libedit-20221030.3.1.ebuild.orig	2023-04-20 06:31:59.533722158 +0000
+++ /var/db/repos/gentoo/dev-libs/libedit/libedit-20221030.3.1.ebuild	2023-04-20 06:03:40.097167209 +0000
@@ -25,6 +25,13 @@
 
 QA_PKGCONFIG_VERSION=$(ver_cut 2-3)
 
+pkg_setup() {
+	# musl workaround
+	if test `eselect profile show | grep "musl"`; then
+		CFLAGS="${CFLAGS} -D__STDC_ISO_10646__=201103L"
+	fi
+}
+
 multilib_src_configure() {
 	local myconf=(
 		$(use_enable static-libs static)

----------

And package builds fine for me with this patch.
Comment 1 Eike Beyer 2023-04-20 07:41:03 UTC
Created attachment 860424 [details]
emerge --info '=dev-libs/libedit-20221030.3.1::gentoo'
Comment 2 Eike Beyer 2023-04-20 07:43:44 UTC
Created attachment 860425 [details, diff]
Patch for the package with this workaround
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-20 10:28:06 UTC

*** This bug has been marked as a duplicate of bug 870001 ***