Hi all,
I almost done all steps in LFS but I got a error when install grub

here is paragraph in chapter 8.4 
Caution
This package will only build for x86 and x86_64 architectures containing 32-bit 
libs. If you chose to build on x86_64 without 32-bit libraries (no multilib), 
then you must use LILO instead. Information on “boot loading” for other 
architectures should be available in the usual resource-specific locations for 
those architectures.

Q1: my computer is X86_64 , but I wonder how to know what 32-bit libraries is 
or not ?

Q2: following is error message I got in config.log when I do "configure 
--prefix=/usr" , and I am confused about it .

================= message begin ==============================
configure:2388: $? = 0
configure:2390: gcc -v </dev/null >&5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.4.1/configure --prefix=/usr --libexecdir=/usr/lib 
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-clocale=gnu --enable-languages=c,c++ --disable-multilib 
--disable-bootstrap
Thread model: posix
gcc version 4.4.1 (GCC)
configure:2393: $? = 0
configure:2395: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2398: $? = 1
configure:2421: checking for C compiler default output file name
configure:2424: gcc -m32    conftest.c  >&5
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
configure:2427: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GRUB"
| #define PACKAGE_TARNAME "grub"
| #define PACKAGE_VERSION "0.97"
| #define PACKAGE_STRING "GRUB 0.97"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE "grub"
| #define VERSION "0.97"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2466: error: C compiler cannot create executables
See `config.log' for more details.
=================== message end ===============================


it looks like something wrong in libgcc , so I do sanity checking as following

================== message begin ===================================
root:/sources# 
root:/sources# echo 'main(){}' > dummy.c
root:/sources# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources# readelf -l a.out | grep ': /lib'
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
root:/sources# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/../../../../lib64/crt1.o succeeded
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/../../../../lib64/crti.o succeeded
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/../../../../lib64/crtn.o succeeded
root:/sources# grep -B4 '^ /usr/include' dummy.log
#include <...> �j�M�q�o�̶}�l�G
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/include-fixed
 /usr/include
root:/sources# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
root:/sources# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib64/libc.so.6 succeeded
root:/sources# 
==================== message end =================================



___________________________________________________ 
 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! 
 http://messenger.yahoo.com.tw/
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to