Linux from Scratch를 해보고 있는데 gcc-4.0.3에서 configure 부터 막히네요.

softpro의 이미지

이번에 큰 맘 먹고 LFS를 공부하고 있습니다.
문제는 스크래치 문서를 보면서 하나하나 익히고 있는데요.
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.html
binutil 설치후에 gcc-4.0.3을 컴파일 하려고 하는데 잘 이해가 잘 안되는 부분이 있습니다.

make /mnt/lfs/sources/gcc-build/gcc-4.0.3
./configure --prefix=/tools --with-local-prefix=/tools --disable-nls \
--enable-shared --enable-languages=c
configure: error: Building in the source directory is not supported in this release. See http://gcc.gnu.org/install/configure.html for more details.
위와 같이 configure를 설정하면 에러 메시지가 나옵니다.
그래서 아래 메시지 중에 사이트에 가서 알아봐도 왜 그런지 도저히 알수가 없네요.

slc의 이미지

gcc 4.0.3 source directory에 build라는 디렉토리 만들고
거기에서 해보세요..

source 디렉토리에서는 빌드 못하겠다는 메세지입니다..
다른 디렉토리 만들고 하라는... 4.대부터 바뀐것 같에요..

건투 빕니다.. 나중에 LFS 몇시간 정도 걸렸는지.. 말씀 좀 주세요..

------------------------------------------------------------
개인 메일 서버를 만들어 사용합시다..
언제부터 e-메일이 포털의 전유물이 된거지??
http://slcweb.homeip.net

softpro의 이미지

gcc-4.0.3/build$../configure --prefix=/tools --with-local-prefix=/tools --disable-nls \
--enable-shared --enable-languages=c

error: installation of configuration problem: C compiler cannot create executables.

그리고 config.log 파일을 열어보니 아래와 같습니다.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1808: checking for gcc
configure:1921: checking whether the C compiler (gcc ) works
configure:1937: gcc -o conftest conftest.c 1>&5
/tools/bin/ld: unrecognized option '--hash-style=gnu'
/tools/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
configure: failed program was:

#line 1932 "configure"
#include "confdefs.h"

main(){return(0);}

위와 같은 메시지가 나옵니다. 정말 갈길이 멀기만 합니다. ㅎㅎ

익명사용자의 이미지

혹시 chapter4를 건너 뛰신건 아닌가요?

softpro의 이미지

$LFS/tools 디렉토리 생성하고 lfs 유저도 생성해서 .bashrc .bash_profile 만들어 줬습니다.
쳅터 4에서 빠지 부분은 없는데요.

조금 꺼림직한게 5장에서 소개랑 툴체인 노트 이분분 스킵한거랑 binutil 설치시
$make
$make install

$make -C ld clean
$make -C ld LIB_PATH=/tools/lib
하고 나서 아래 명령을 실행하려고 했는데 ld-new 이놈을 찾을수가 없어서 스킵한거 빼고는 없는것 같습니다.
cp -v ld/ld-new /tools/bin

softpro의 이미지

위에서 했던 명령어들은 su - lfs 로 변경한후 실행했던 내용입니다.

그런데 쳅터 5에서 환경이 root 환경에서가 아닌 유저 생성하고 su - lfs로 변경후에
lfs 쉘 환경에서 해야 맞는거 아닌가요 ㅡㅡ;

어찌 됐는 root 환경에서 binutile 이나 gcc-4.0.3하는데 걸리는 문제가 없습니다.
근데 이렇게 해도 되는건지 초보자인 입장에서는 잘 하고 있는건지 걱정이네요 ^^;

장석태의 이미지

저도 fc4에서 하다가 fc3에서 하는데요 오류가 없더라구요 혹시 5.11 완료하셨다면 좀알켜주세요~!!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.