Ignore:
Timestamp:
01/17/2006 08:46:21 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Children:
f658b21
Parents:
5aa74f2
Message:

Ported the proper r7279 plus r7281 from trunk to alphabetical.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/alphabetical/BOOK@7282 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/adjusting.xml

    r5aa74f2 r23102484  
    99  <?dbhtml filename="adjusting.html"?>
    1010
    11   <title>Ajustar las herramientas</title>
     11  <title>Adjusting the Toolchain</title>
    1212
    13   <para>Ahora que se han instalado las librerías de C temporales, todas las
    14   herramientas que compilemos en el resto de este capítulo deberían enlazarse
    15   contra ellas. Para conseguirlo, deben ajustarse el enlazador y el fichero
    16   specs del compilador.</para>
     13  <para>Now that the temporary C libraries have been installed, all
     14  tools compiled in the rest of this chapter should be linked against
     15  these libraries. In order to accomplish this, the linker and the
     16  compiler's specs file need to be adjusted.</para>
    1717
    18   <para>El enlazador, que se ajustó al final del primer paso de Binutils,
    19   se instala ejecutando el siguiente comando desde el directorio
    20   <filename class="directory">binutils-build</filename>:</para>
     18  <para>The linker, adjusted at the end of the first pass of Binutils,
     19  is installed by running the following command from within the
     20  <filename class="directory">binutils-build</filename> directory:</para>
    2121
    2222<screen><userinput>make -C ld install</userinput></screen>
    2323
    24   <para>Desde ahora todo se enlazará solamente contra las librerías que hay en
    25   <filename class="directory">/tools/lib</filename>.</para>
     24  <para>From this point onwards, everything will link only against the
     25  libraries in <filename class="directory">/tools/lib</filename>.</para>
    2626
    2727  <note>
    28     <para>Si por alguna razón olvidaste el aviso sobre conservar los directorios
    29     de las fuentes y de construcción del primer paso de Binutils, ignora el
    30     comando anterior. El resultado es la pequeña pega de que los siguientes
    31     programas de pruebas se enlazarán contra las librerías del anfitrión. Esto
    32     no es lo ideal, pero no es un gran problema. La situación se corregirá
    33     cuando instalemos un poco más adelante la segunda fase de Binutils.</para>
     28    <para>If the earlier warning to retain the Binutils source and
     29    build directories from the first pass was missed, ignore the above
     30    command. This results in a small chance that the subsequent testing
     31    programs will link against libraries on the host. This is not ideal,
     32    but it is not a major problem. The situation is corrected when the
     33    second pass of Binutils is installed later.</para>
    3434  </note>
    3535
    36   <para>Ahora que se ha instalado el enlazador ajustado, debes eliminar los
    37   directorios de las fuentes y de construcción de Binutils.</para>
     36  <para>Now that the adjusted linker is installed, the Binutils build and source
     37  directories should be removed.</para>
    3838
    39   <para>Lo siguiente esapuntar GCC al nuevo enlazador dinámico. Esto se hace
    40   volcando el fichero <quote>specs</quote>de GCC a un lugar en el que GCC lo
    41   busque por defecto. Entonces una simple sustitución <command>sed</command>
    42   altera el enlazdor inámic que GCC usará:</para>
     39  <para>The next task is to point GCC to the new dynamic linker. This is done by
     40  dumping GCC's <quote>specs</quote> file to a location where GCC will look for it
     41  by default. A simple <command>sed</command> substitution then alters the
     42  dynamic linker that GCC will use:</para>
    4343
    44 <!-- Ampersands are needed to allow cut and paste -->
     44<!-- Ampersands are needed to allow copy and paste -->
    4545<screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp;
    4646gcc -dumpspecs > $SPECFILE &amp;&amp;
     
    4949unset SPECFILE</userinput></screen>
    5050
    51   <para><phrase condition="html">Recomendamos que copies y pegues lo anterior
    52   para asegurar que no hay errores.</phrase> Alternativamente, puedes editar el
    53   fichero specs a mano si quieres. Esto se hace reemplazando cada aparición de
    54   <quote>/lib/ld-linux.so.2</quote> con <quote>/tools/lib/ld-linux.so.2</quote>.</para>
     51  <para>It is recommended that the above command be copy-and-pasted in order to
     52  ensure accuracy. Alternatively, the specs file can be edited by hand. This is
     53  done by replacing every occurrence of <quote>/lib/ld-linux.so.2</quote> with
     54  <quote>/tools/lib/ld-linux.so.2</quote></para>
    5555
    56   <para>Asegúrate de revisar visualmente el fichero specs para
    57   verificar que se han hecho los cambios deseados.</para>
     56  <para>Be sure to visually inspect the specs file in order to verify the
     57  intended changes have been made.</para>
    5858
    5959  <important>
    60     <para>Si estás trabajando sobre una plataforma en la que el nombre del
    61     enlazador dinámico no es <filename class="libraryfile">ld-linux.so.2</filename>,
    62     en el anterior comando debes sustituir <filename>ld-linux.so.2</filename> con
    63     el nombre del enlazador dinámico de tu plataforma. En caso necesario consulta
    64     la <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
     60    <para>If working on a platform where the name of the dynamic linker is
     61    something other than <filename class="libraryfile">ld-linux.so.2</filename>,
     62    replace <quote>ld-linux.so.2</quote> with the name of the platform's
     63    dynamic linker in the above commands. Refer back to <xref
     64    linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
    6565  </important>
    6666
    67   <para>Durante el proceso de construcción, GCC ejecuta un guión
    68   (<command>fixincludes</command>) que explora el sistema buscando ficheros de
    69   cabecera que puedan necesitar ser corregidos (que pueden contener errores de
    70   sintaxis, por ejemplo), e instala las versiones corregidas en un directorio
    71   privado. Existe la posibilidad de que, como resultado de este proceso, algunos
    72   ficheros de cabecera del sistema anfitrión se hayan colado dentro de dicho
    73   directorio privado de cabeceras de GCC. Como el resto de este capítulo sólo
    74   necesita las cabeceras de GCC y Glibc, que ya han sido instaladas, cualquier
    75   cabecera <quote>fijada</quote> puede borrarse sin problemas. Esto ayuda a
    76   evitar que cualquier cabecera del anfitrión contamine el entorno de
    77   construcción. Ejecuta los siguientes comandos para eliminr dichos ficheros de
    78   cabecera (puede que encuentres más facil copiar y pegar estos comandos en vez
    79   de teclearlos, debido a su longitud):</para>
     67  <para>During the build process, GCC runs a script
     68  (<command>fixincludes</command>) that scans the system for header files
     69  that may need to be fixed (they might contain syntax errors, for example),
     70  and installs the fixed versions in a private include directory. There is a
     71  possibility that, as a result of this process, some header files from the
     72  host system have found their way into GCC's private include directory. As
     73  the rest of this chapter only requires the headers from GCC and Glibc,
     74  which have both been installed at this point, any <quote>fixed</quote>
     75  headers can safely be removed. This helps to avoid any host headers
     76  polluting the build environment. Run the following commands to remove the
     77  header files in GCC's private include directory (you may find it easier to
     78  copy and paste these commands, rather than typing them by hand, due to
     79  their length):</para>
    8080
    8181<!-- && used to ease copy and pasting -->
     
    8686
    8787  <caution>
    88     <para>En este punto es obligatorio parar y asegurarse de que las operaciones
    89     básicas (compilación y enlazado) de las nuevas herramientas funcionan como
    90     se espera. Para esto vamos a hacer una simple comprobación:</para>
     88    <para>At this point, it is imperative to stop and ensure that the basic
     89    functions (compiling and linking) of the new toolchain are working as
     90    expected. To perform a sanity check, run the following commands:</para>
    9191
    9292<screen><userinput>echo 'main(){}' &gt; dummy.c
     
    9494readelf -l a.out | grep ': /tools'</userinput></screen>
    9595
    96     <para>Si todo funciona correctamente, no debe haber errores y la salida del
    97     último comando debe ser:</para>
     96    <para>If everything is working correctly, there should be no errors,
     97    and the output of the last command will be of the form:</para>
    9898
    9999<screen><computeroutput>[Requesting program interpreter:
    100     /tools/lib/ld-linux.so.2]
    101 
    102 [Intérprete de programa solicitado:
    103100    /tools/lib/ld-linux.so.2]</computeroutput></screen>
    104101
    105     <para>Confirma que <filename class="directory">/tools/lib</filename>
    106     aparezca como el prefijo de tu enlazador dinámico.</para>
     102    <para>Note that <filename class="directory">/tools/lib</filename>
     103    appears as the prefix of the dynamic linker.</para>
    107104
    108     <para>Si no recibes una salida como la mostrada arriba, o no hay salida
    109     alguna, algo está seriamente mal. Investiga y revisa tus pasos para
    110     encontrar el problema y corregirlo. El problema debe resolverse antes de
    111     continuar. Primero, repite la comprobación de sanidad usando
    112     <command>gcc</command> en vez de <command>cc</command>. Si esto funciona
    113     significa que falta el enlace simbólico <filename
    114     class="symlink">/tools/bin/cc</filename>. Vuelve a la <xref
    115     linkend="ch-tools-gcc-pass1"/> e instala el enlace simbólico. Seguidamente,
    116     asegúrate de que tu <envar>PATH</envar> es correcto. Puedes comprobarlo
    117     ejecutando <command>echo $PATH</command> y verificando que <filename
    118     class="directory">/tools/bin</filename> está en cabeza de la lista. Si
    119     el <envar>PATH</envar> está mal puede significar que no has ingresado
    120     como usuario <systemitem class="username">lfs</systemitem> o que algo
    121     salió mal en la <xref linkend="ch-tools-settingenviron"/>. Otra opción es
    122     que algo pudo ir mal en el anterior arreglo del fichero specs. En este caso,
    123     repite el arreglo del fichero<phrase condition="html"> asegurándote de
    124     copiar y pegar los comandos como se recomendó</phrase>.</para>
     105    <para>If the output is not shown as above or there was no output at all,
     106    then something is wrong. Investigate and retrace the steps to find out
     107    where the problem is and correct it. This issue must be resolved before
     108    continuing on. First, perform the sanity check again, using
     109    <command>gcc</command> instead of <command>cc</command>. If this works,
     110    then the <filename class="symlink">/tools/bin/cc</filename> symlink is
     111    missing. Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install
     112    the symlink. Next, ensure that the <envar>PATH</envar> is correct. This
     113    can be checked by running <command>echo $PATH</command> and verifying that
     114    <filename class="directory">/tools/bin</filename> is at the head of the
     115    list. If the <envar>PATH</envar> is wrong it could mean that you are not
     116    logged in as user <systemitem class="username">lfs</systemitem> or that
     117    something went wrong back in <xref linkend="ch-tools-settingenviron"
     118    role="."/> Another option is that something may have gone wrong with the
     119    specs file amendment above. In this case, redo the specs file amendment,
     120    being careful to copy-and-paste the commands.</para>
    125121
    126     <para>Cuando todo esté bien, borra los ficheros de prueba:</para>
     122    <para>Once all is well, clean up the test files:</para>
    127123
    128124<screen><userinput>rm -v dummy.c a.out</userinput></screen>
    129125
    130     <para>La construcción de TCL en la siguiente sección servirá como comprobación
    131     adicional de que las herramientas se han construido correctamente. Si la
    132     construcción de TCL falla, esto es una indicación de que algo fué mal durante
    133     la instalación de Binutils, GCC o Glibc, pero no con el propio TCL.</para>
     126    <para>Building TCL in the next section will serve as an additional check that
     127    the toolchain has been built properly.  If TCL fails to build, it is an
     128    indication that something has gone wrong with the Binutils, GCC, or Glibc
     129    installation, but not with TCL itself.</para>
    134130  </caution>
    135131
Note: See TracChangeset for help on using the changeset viewer.