Changeset d282f88


Ignore:
Timestamp:
01/21/2024 04:27:45 PM (5 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
943f225
Parents:
619e4d9
git-author:
Xi Ruoyao <xry111@…> (01/19/2024 04:47:33 AM)
git-committer:
Xi Ruoyao <xry111@…> (01/21/2024 04:27:45 PM)
Message:

ncurses: Modify the header to always use the ABI of ncursesw

instead of the 8-bit ncurses.

We don't provide the 8-bit ncurses library and we are "faking" it using
ncursesw. Thus innocent package may be compiled with the 8-bit ABI
(because it does not know what we are doing and so it does not use
the "expected" preprocessor definitions to enable the wide ABI) but
linked against ncursesw, causing a potential ABI mismatch.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r619e4d9 rd282f88  
    4242
    4343    <listitem>
     44      <para>2024-01-18</para>
     45      <itemizedlist>
     46        <listitem>
     47          <para>[xry111] - Edit a ncurses header to always use the
     48          wide-character ABI compatible with libncursesw.so because we
     49          are faking the 8-bit libncurses.so with it.  Fixes
     50          <ulink url="&lfs-ticket-root;5415">#5415</ulink>.</para>
     51        </listitem>
     52      </itemizedlist>
     53    </listitem>
     54
     55    <listitem>
    4456      <para>2024-01-09</para>
    4557      <itemizedlist>
  • chapter06/ncurses.xml

    r619e4d9 rd282f88  
    157157
    158158<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
    159 echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</userinput></screen>
     159echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so
     160sed -e 's/^#if.*XOPEN.*$/#if 1/' \
     161    -i $LFS/usr/include/curses.h</userinput></screen>
    160162<!--
    161163    <para>Remove an unneeded static library not handled by
     
    186188      </varlistentry>
    187189
     190      <varlistentry>
     191        <term><command>sed -e 's/^#if.*XOPEN.*$/#if 1/' ...</command></term>
     192        <listitem>
     193          <para>The header file <filename>curses.h</filename> contains
     194          the definition of various Ncurses data structures.  With different
     195          preprocessor macro definitions two different sets of the data
     196          structure definition may be used: the 8-bit definition is
     197          compatible with <filename>libncurses.so</filename> and the
     198          wide-character definition is compatible with
     199          <filename>libncursesw.so</filename>.  Since we are using
     200          <filename>libncursesw.so</filename> as a replacement of
     201          <filename>libncurses.so</filename>, edit the header file so it
     202          will always use the wide-character data structure definition
     203          compatible with <filename>libncursesw.so</filename>.</para>
     204        </listitem>
     205      </varlistentry>
     206
    188207    </variablelist>
    189208
  • chapter08/ncurses.xml

    r619e4d9 rd282f88  
    132132    from the library file.  Install the package with
    133133    <literal>DESTDIR</literal>, and replace the library file correctly using
    134     <command>install</command> command:</para>
     134    <command>install</command> command (the header
     135    <filename>curses.h</filename> is also edited to ensure the
     136    wide-character ABI to be used as what we've done in
     137    <xref linkend='ch-tools-ncurses'/>):</para>
    135138
    136139<screen><userinput remap="install">make DESTDIR=$PWD/dest install
    137140install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
    138141rm -v  dest/usr/lib/libncursesw.so.&ncurses-version;
     142sed -e 's/^#if.*XOPEN.*$/#if 1/' \
     143    -i dest/usr/include/curses.h
    139144cp -av dest/* /</userinput></screen>
    140145
Note: See TracChangeset for help on using the changeset viewer.