diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index bfe3960de..0c17d8198 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -50,6 +50,10 @@ +January 16th, 2004 [greg]: Expanded the Locking in Glibc and +Re-adjusting the toolchain sections to also catch missing cc->gcc symlink and +provide more help for when things go wrong. + January 16th, 2004 [greg]: Implemented changes to make the running of the Chapter 5 test suites strictly optional i.e. the default action for the average reader is to not run them. Closes 719. diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 484a06d13..54cdd5c52 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -462,8 +462,10 @@ mv -f tempspecfile $SPECFILE && unset SPECFILE We recommend that you cut-and-paste the above rather than try and type it -all in. Or you can edit the specs file by hand if you want to: just replace any -occurrence of "/lib/ld-linux.so.2" with "/tools/lib/ld-linux.so.2". +all in. Or you can edit the specs file by hand if you want to: just replace the +occurrence of "/lib/ld-linux.so.2" with "/tools/lib/ld-linux.so.2". Be sure to +visually inspect the specs file to verify the intended change was actually +made. If you are working on a platform where the name of the dynamic linker is something other than ld-linux.so.2, you @@ -487,7 +489,7 @@ functions (compiling and linking) of the new toolchain are working as expected. For this we are going to perform a simple sanity check: echo 'main(){}' > dummy.c -gcc dummy.c +cc dummy.c readelf -l a.out | grep ': /tools' If everything is working correctly, there should be no errors, and the @@ -495,15 +497,23 @@ output of the last command will be:
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
-If you did not receive the output as shown above, or received no output at -all, then something is seriously wrong. You will need to investigate and retrace -your steps to find out where the problem is and correct it. There is no point in -continuing until this is done. Most likely something went wrong with the specs -file amendment above. Note especially that /tools/lib -appears as the prefix of our dynamic linker. Of course, if you are working on a -platform where the name of the dynamic linker is something other than -ld-linux.so.2, then the output will be slightly -different. +(Of course allowing for platform specific differences in dynamic linker +name). Note especially that /tools/lib +appears as the prefix of our dynamic linker. If you did not receive the output +as shown above, or received no output at all, then something is seriously wrong. +You will need to investigate and retrace your steps to find out where the +problem is and correct it. There is no point in continuing until this is done. +First, redo the sanity check using gcc instead of +cc. If this works it means the +/tools/bin/cc symlink is missing. Revisit + and fix the symlink. Second, ensure your $PATH +is correct. You can check this by running echo $PATH and +verifying that /tools/bin is at the head +of the list. If the $PATH is wrong it could mean you're not logged in as user +lfs or something went wrong back in +. Third, something may have gone wrong with +the specs file amendment above. In this case redo the specs file amendment +ensuring to cut-and-paste the commands as was recommended. Once you are satisfied that all is well, clean up the test files: diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 2ec21c6d3..c994e7650 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -98,7 +98,7 @@ Unix systems. Not everybody has the GNU C compiler installed. Simply running cc leaves the system administrator free to decide what C compiler to install, as long as there's a symlink pointing to it: -ln -sf gcc /tools/bin/cc +ln -s gcc /tools/bin/cc diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 839ac36e3..26e33a9d3 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -363,8 +363,8 @@ mv -f newspecfile $SPECFILE && unset SPECFILE Again, cutting and pasting the above is recommended. And just like -before, it is a good idea to check the specs file to ensure the intended -changes were actually made. +before, it is a good idea to visually inspect the specs file to verify the +intended change was actually made. If you are working on a platform where the name of the dynamic linker is something other than ld-linux.so.2, you @@ -380,7 +380,7 @@ basic functions (compiling and linking) of the adjusted toolchain are working as expected. For this we are going to perform a simple sanity check: echo 'main(){}' > dummy.c -gcc dummy.c +cc dummy.c readelf -l a.out | grep ': /lib' If everything is working correctly, there should be no errors, and the @@ -388,15 +388,13 @@ output of the last command will be:
[Requesting program interpreter: /lib/ld-linux.so.2]
-If you did not receive the output as shown above, or received no output at -all, then something is seriously wrong. You will need to investigate and retrace -your steps to find out where the problem is and correct it. There is no point in -continuing until this is done. Most likely something went wrong with the specs -file amendment above. Note especially that /lib now appears -as the prefix of our dynamic linker. Of course, if you are working on a platform -where the name of the dynamic linker is something other than -ld-linux.so.2, then the output will be slightly -different. +(Of course allowing for platform specific differences in dynamic linker +name). Note especially that /lib now +appears as the prefix of our dynamic linker. If you did not receive the output +as shown above, or received no output at all, then something is seriously wrong. +You will need to investigate and retrace your steps to find out where the +problem is and correct it. There is no point in continuing until this is done. +Most likely something went wrong with the specs file amendment above. Once you are satisfied that all is well, clean up the test files: