Changeset 964103c for chapter08


Ignore:
Timestamp:
03/02/2022 01:15:18 PM (2 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/clfs-ng
Children:
727617d
Parents:
a5da281 (diff), 6cad449 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'trunk' into xry111/clfs-ng

Location:
chapter08
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gcc.xml

    ra5da281 r964103c  
    196196    some sanity checks:</para>
    197197
    198     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    199     href="adjusting.xml"
    200     xpointer="xpointer(//*[@os='a'])"/>
    201 
    202     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    203     href="adjusting.xml"
    204     xpointer="xpointer(//*[@os='b'])"/>
    205 
    206     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    207     href="adjusting.xml"
    208     xpointer="xpointer(//*[@os='c'])"/>
    209 
    210     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    211     href="adjusting.xml"
    212     xpointer="xpointer(//*[@os='d'])"/>
    213 
    214     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    215     href="adjusting.xml"
    216     xpointer="xpointer(//*[@os='e'])"/>
    217 
    218     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    219     href="adjusting.xml"
    220     xpointer="xpointer(//*[@os='f'])"/>
     198<screen><userinput>echo 'int main(){}' &gt; dummy.c
     199cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log
     200readelf -l a.out | grep ': /lib'</userinput></screen>
     201
     202  <para>There should be no errors,
     203  and the output of the last command will be (allowing for
     204  platform-specific differences in the dynamic linker name):</para>
     205
     206<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     207
     208  <para>Now make sure that we're setup to use the correct start files:</para>
     209
     210<screen><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen>
     211
     212  <para>The output of the last command should be:</para>
    221213
    222214<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
     
    231223  <filename class="directory">/usr/lib</filename> directory.</para>
    232224
    233     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    234     href="adjusting.xml"
    235     xpointer="xpointer(//*[@os='g'])"/>
     225  <para>Verify that the compiler is searching for the correct header
     226  files:</para>
    236227
    237228<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
    238229
    239     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    240     href="adjusting.xml"
    241     xpointer="xpointer(//*[@os='h'])"/>
     230  <para>This command should return the following output:</para>
    242231
    243232<screen><computeroutput>#include &lt;...&gt; search starts here:
     
    250239   different than the above, depending on your system architecture.</para>
    251240
    252     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    253     href="adjusting.xml"
    254     xpointer="xpointer(//*[@os='i'])"/>
    255 
    256     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    257     href="adjusting.xml"
    258     xpointer="xpointer(//*[@os='j'])"/>
    259 
    260     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    261     href="adjusting.xml"
    262     xpointer="xpointer(//*[@os='k'])"/>
     241  <para>Next, verify that the new linker is being used with the correct search paths:</para>
     242
     243<screen><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>
     244
     245  <para>References to paths that have components with '-linux-gnu' should
     246  be ignored, but otherwise the output of the last command should be:</para>
    263247
    264248<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
     
    283267SEARCH_DIR("/usr/lib");</computeroutput></screen>
    284268
    285     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    286     href="adjusting.xml"
    287     xpointer="xpointer(//*[@os='l'])"/>
    288 
    289     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    290     href="adjusting.xml"
    291     xpointer="xpointer(//*[@os='m'])"/>
    292 
    293     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    294     href="adjusting.xml"
    295     xpointer="xpointer(//*[@os='n'])"/>
    296 
    297     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    298     href="adjusting.xml"
    299     xpointer="xpointer(//*[@os='o'])"/>
    300 
    301     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    302     href="adjusting.xml"
    303     xpointer="xpointer(//*[@os='p'])"/>
    304 
    305     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    306     href="adjusting.xml"
    307     xpointer="xpointer(//*[@os='q'])"/>
    308 
    309     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    310     href="adjusting.xml"
    311     xpointer="xpointer(//*[@os='r'])"/>
    312 
    313     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    314     href="adjusting.xml"
    315     xpointer="xpointer(//*[@os='s'])"/>
    316 
    317     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    318     href="adjusting.xml"
    319     xpointer="xpointer(//*[@os='t'])"/>
    320 
    321     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    322     href="adjusting.xml"
    323     xpointer="xpointer(//*[@os='u'])"/>
    324 
    325     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    326     href="adjusting.xml"
    327     xpointer="xpointer(//*[@os='v'])"/>
     269  <para>Next make sure that we're using the correct libc:</para>
     270
     271<screen><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen>
     272
     273  <para>The output of the last command should be:</para>
     274
     275<screen><computeroutput>attempt to open /usr/lib/libc.so.6 succeeded</computeroutput></screen>
     276
     277  <para>Make sure GCC is using the correct dynamic linker:</para>
     278
     279<screen><userinput>grep found dummy.log</userinput></screen>
     280
     281  <para>The output of the last command should be (allowing for
     282  platform-specific differences in dynamic linker name):</para>
     283
     284<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
     285
     286  <para>If the output does not appear as shown above or is not received
     287  at all, then something is seriously wrong. Investigate and retrace the
     288  steps to find out where the problem is and correct it. <!--The most likely
     289  reason is that something went wrong with the specs file adjustment.--> Any
     290  issues will need to be resolved before continuing with the process.</para>
     291
     292  <para>Once everything is working correctly, clean up the test files:</para>
     293
     294<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
    328295
    329296    <para>Finally, move a misplaced file:</para>
  • chapter08/iproute2.xml

    ra5da281 r964103c  
    6262    <para>Compile the package:</para>
    6363
    64 <screen><userinput remap="make">make</userinput></screen>
     64<screen><userinput remap="make">make NETNS_RUN_DIR=/run/netns</userinput></screen>
    6565
    6666    <para>This package does not have a working test suite.</para>
  • chapter08/tcl.xml

    ra5da281 r964103c  
    6464cd unix
    6565./configure --prefix=/usr           \
    66             --mandir=/usr/share/man \
    67             $([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
    68 
    69     <variablelist>
    70       <title>The meaning of the configure options:</title>
    71 
    72       <varlistentry>
    73         <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
    74         <listitem>
    75           <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
    76           is replaced by the output of the shell command.  Here this output is
    77           empty if running on a 32 bit machine, and is
    78           <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
    79           </para>
    80         </listitem>
    81       </varlistentry>
    82 
    83     </variablelist>
     66            --mandir=/usr/share/man</userinput></screen>
    8467
    8568    <para>Build the package:</para>
Note: See TracChangeset for help on using the changeset viewer.