The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
gcc install error, !*! Thomas, 07-Апр-05, 20:33  [смотреть все]
нашел в инете доку по сборке линукса из исходников, Linux From Scratch называется. один из этапов - сборка gcc. собираю по доке:

../gcc-3.4.3/configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c
make BOOT_LDFLAGS="-static" bootstrap

и здесь ошибка:

make[2]: Entering directory `/vtmp/sources/gcc-build/gcc'
stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc-3.4.3/gcc -I../../gcc-3.4.3/gcc/. -I../../gcc-3.4.3/gcc/../include ../../gcc-3.4.3/gcc/genmodes.c -o genmodes.o
stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc-3.4.3/gcc -I../../gcc-3.4.3/gcc/. -I../../gcc-3.4.3/gcc/../include ../../gcc-3.4.3/gcc/errors.c -o errors.o
stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -static -o genmodes \
genmodes.o errors.o ../libiberty/libiberty.a
/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [genmodes] Error 1
make[2]: Leaving directory `/vtmp/sources/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/vtmp/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2

система:
linux-2.6.3 (mandrake 10.0)
gcc-3.3.2
make-3.80

в чем может быть проблема? (только не говорите, что в ДНК:-)) )

  • gcc install error, !*! Muke, 20:53 , 07-Апр-05 (1)
    • gcc install error, !*! Thomas, 21:35 , 07-Апр-05 (2)
      спасибо, что подсказали, в какую сторону смотреть. поставил glibc-static-devel, уже минут 15 компилируется и не вылетает. а тогда выкидывал ошибку минуты через 3-4. впрочем, посмотрим, может, ему еще чего-нибудь не хватит. хотя зависимости вроде как должны в configure проверяться
    • gcc install error, !*! Thomas, 06:29 , 08-Апр-05 (3)
      все нормально скомпилилось. дальше опять проблемы.
      идем в chroot:
      chroot "$LFS" /tools/bin/env -i \
          HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
          PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
          /tools/bin/bash --login +h

      пишет: "I have no name!:/#", как и должен. пишем chown 0:0 -R /tools
      и на этом все, шелл не реагирует, ведет себя так, как будто выполняет команду. пробовал другие команды - echo, pwd выполняет нормально, т.е. возвращается к режиму ввода, на остальные реакция та же. подозреваю, что он реагирует так на команды, вывод которых содержит более одной строки. может, это у bash 3.0 глюк такой?

      • gcc install error, !*! Thomas, 00:31 , 10-Апр-05 (4)
        проблема решена путем установки bash-2.05. но возникла еще одна, и опять с gcc: компилятор не находит заголовочные файлы. он ищет их только в директории с исходниками gcc и, соответственно, не находит, и make вылетает с ошибкой:

        In file included from ../../gcc-3.4.3/gcc/crtstuff.c:62:
        ../../gcc-3.4.3/gcc/tsystem.h:79:19: stdio.h: No such file or directory
        ../../gcc-3.4.3/gcc/tsystem.h:82:23: sys/types.h: No such file or directory
        ../../gcc-3.4.3/gcc/tsystem.h:85:19: errno.h: No such file or directory
        ../../gcc-3.4.3/gcc/tsystem.h:92:20: string.h: No such file or directory
        ../../gcc-3.4.3/gcc/tsystem.h:93:20: stdlib.h: No such file or directory
        ../../gcc-3.4.3/gcc/tsystem.h:94:20: unistd.h: No such file or directory
        In file included from /sources/gcc-build/gcc/include/syslimits.h:7,
                         from /sources/gcc-build/gcc/include/limits.h:11,
                         from ../../gcc-3.4.3/gcc/tsystem.h:97,
                         from ../../gcc-3.4.3/gcc/crtstuff.c:62:
        /sources/gcc-build/gcc/include/limits.h:122:61: limits.h: No such file or directory
        In file included from ../../gcc-3.4.3/gcc/crtstuff.c:62:
        ../../gcc-3.4.3/gcc/tsystem.h:100:18: time.h: No such file or directory
        make[1]: *** [crtbegin.o] Error 1
        make[1]: Leaving directory `/sources/gcc-build/gcc'
        make: *** [all-gcc] Error 2

        нужные заголовки есть в /usr/include и /tools/glibc-kernheaders/linux. вопрос: как заставить компилятор искать заголовочные файлы и из этих директорий?




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру