Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560228 - dev-libs/libedit: patch to build under musl (ISO10646)
Summary: dev-libs/libedit: patch to build under musl (ISO10646)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-09-11 17:58 UTC by toast+misc
Modified: 2023-05-27 07:25 UTC (History)
1 user (show)

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


Attachments
Patch to ::musl to fix the issue described above (0001-Fix-libedit-20130712.3.1-build-failure.patch,16.43 KB, text/plain)
2015-09-11 17:58 UTC, toast+misc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description toast+misc 2015-09-11 17:58:26 UTC
Created attachment 411630 [details]
Patch to ::musl to fix the issue described above

Libedit uses the __STDC_ISO_10646__ macro to verify that the first 127 code points of wchar_t are not assumed to be ascii-compatible.
This macro must be defined before any headers are included.
Musl is not yet using stdc-predef.h functionality provided by gcc >4.8.
Support for it is planned during the next release cycle (1.1.12).

This patch adds the latest ebuild of libedit, with -r99, which checks for ELIBC being musl, and for its version to be <1.1.12, in which case we add -D__STDC_ISO_10646__=201103L to cppflags.

It is notable that this does require gcc 4.8+ to work, but as far as I know that should be handled by the implicit dependency system; if not adding a check for that may be necessary (probably comparing best_version with $CC?)
Comment 1 Anthony Basile gentoo-dev 2015-09-12 00:05:56 UTC
Thanks this is committed to the musl overlay.  We'll leave the bug IN_PROGRESS so we'll remember to remove the patch when 1.1.12 comes out.
Comment 2 toast+misc 2015-10-23 00:07:34 UTC
Musl hit 1.1.12, but the problem is not solved.
Moreover, since the patch checks for musl version <1.1.12 the patch will probably stop working (fix is trivial, however).
Comment 3 toast+misc 2016-02-23 16:45:31 UTC
With musl 1.1.14 (and gcc -999) issue still persists without patch.
Comment 4 Felix Janda 2016-10-15 11:58:55 UTC
sys-libs/musl-1.1.15 has now stdc-predef.h and is stable. Does libedit
now compile fine without patches?
Comment 5 toast+misc 2016-10-15 16:35:14 UTC
dev-libs/libedit-20130712.3.1::gentoo compiles and installs fine.
Closing bug.