gcc 설치에 관한 질문입니다

romanian의 이미지

이렇게 게시판에 처음 글을 올리게 되네요...

일 하다가 필요하게 되어서 리눅스를 배우기 시작한 학생입니다.

여기에서 많은 도움을 받았다는 주변 사람들의 말을 듣고 이렇게 들어오게 되었습니다.

제가 지금 가지고 있는 문제는요...

저는 지금 쓰는 배포판(SuSE 10.0 - 2.6.13)에다가 rtlinux를 깔려고 합니다.

rtlinux는 커널 2.6.9에다가 rtlinux3.1을 prepatch시킨 것입니다.

그런데 SuSE 10.0 배포판은 gcc 4.0.2 가 포함되어 있더군요...

그래서 이걸로 커널 컴파일 하니깐,

자꾸 에러가 뜨더라구요...

일단, #make menuconfig
#make modules
#make modules_install

까지는 진행되었습니다...

그 사이에 무수한 warning이 있었지만요... --;

그런데, #make install을 하니깐 아래와 같이 에러가 떴습니다.

////////////////////////////////////////////////////////////////////////

standard input}: Assembler messages:
{standard input}:686: Error: suffix or operands invalid for `mov'
{standard input}:687: Error: suffix or operands invalid for `mov'
{standard input}:895: Error: suffix or operands invalid for `mov'
{standard input}:896: Error: suffix or operands invalid for `mov'
{standard input}:975: Error: suffix or operands invalid for `mov'
{standard input}:976: Error: suffix or operands invalid for `mov'
{standard input}:1064: Error: suffix or operands invalid for `mov'
{standard input}:1065: Error: suffix or operands invalid for `mov'
{standard input}:1154: Error: suffix or operands invalid for `mov'
{standard input}:1166: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] Error 1
make: *** [arch/i386/kernel] Error 2

///////////////////////////////////////////////////////////////////

처음 rtlinux를 다운받은 www.rtlinuxfree.com에 가서 게시판을 전부 뒤져보니 gcc를 gcc 2.95.3로 설치하여 컴파일 하라고 하더군요...

그래서 gcc-2.95.3.tar.gz을 구하여 /usr/lib/에다가 풀어서 컴파일 하였지요...

kldp게시판에 보니 이것저것 조건을 붙여서 컴파일 하는 게 나와있지만 잘 모르겠어서 기본적으로 설치하는 과정을 따랐습니다...

#./configure
#make
#make install

이렇게 진행하니 또다시 에러가 뜨더라구요...@.@

//////////////////////////////////////////////////////////////////////

decl.c: In function ‘start_struct’:
decl.c:4451: error: argument ‘code’ doesn’t match prototype
ch-tree.h:736: error: prototype declaration
make[2]: *** [decl.o] Error 1
make[2]: Leaving directory `/usr/lib/gcc-2.95.3/gcc/ch'
make[1]: *** [cc1chill] Error 2
make[1]: Leaving directory `/usr/lib/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2

//////////////////////////////////////////////////////////////////////

어찌할지 도저히 모르겠어서 이렇게 글을 올리게 되었습니다...

일단 gcc만 설치되면 컴파일 하면 될 것 같은데 gcc마저 컴파일 에러가 뜨니 막막하네요...

이미 gcc가 깔려있으면 이렇게 문제가 생기나요?

gcc2.95.3을 어떻게 해서든지 좀 깔았으면 합니다...

그럼 답변 부탁드리겠습니다...

hys545의 이미지

romanian wrote:
이렇게 게시판에 처음 글을 올리게 되네요...

일 하다가 필요하게 되어서 리눅스를 배우기 시작한 학생입니다.

여기에서 많은 도움을 받았다는 주변 사람들의 말을 듣고 이렇게 들어오게 되었습니다.

제가 지금 가지고 있는 문제는요...

저는 지금 쓰는 배포판(SuSE 10.0 - 2.6.13)에다가 rtlinux를 깔려고 합니다.

rtlinux는 커널 2.6.9에다가 rtlinux3.1을 prepatch시킨 것입니다.

그런데 SuSE 10.0 배포판은 gcc 4.0.2 가 포함되어 있더군요...

그래서 이걸로 커널 컴파일 하니깐,

자꾸 에러가 뜨더라구요...

일단, #make menuconfig
#make modules
#make modules_install

까지는 진행되었습니다...

그 사이에 무수한 warning이 있었지만요... --;

그런데, #make install을 하니깐 아래와 같이 에러가 떴습니다.

////////////////////////////////////////////////////////////////////////

standard input}: Assembler messages:
{standard input}:686: Error: suffix or operands invalid for `mov'
{standard input}:687: Error: suffix or operands invalid for `mov'
{standard input}:895: Error: suffix or operands invalid for `mov'
{standard input}:896: Error: suffix or operands invalid for `mov'
{standard input}:975: Error: suffix or operands invalid for `mov'
{standard input}:976: Error: suffix or operands invalid for `mov'
{standard input}:1064: Error: suffix or operands invalid for `mov'
{standard input}:1065: Error: suffix or operands invalid for `mov'
{standard input}:1154: Error: suffix or operands invalid for `mov'
{standard input}:1166: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] Error 1
make: *** [arch/i386/kernel] Error 2

///////////////////////////////////////////////////////////////////

처음 rtlinux를 다운받은 www.rtlinuxfree.com에 가서 게시판을 전부 뒤져보니 gcc를 gcc 2.95.3로 설치하여 컴파일 하라고 하더군요...

그래서 gcc-2.95.3.tar.gz을 구하여 /usr/lib/에다가 풀어서 컴파일 하였지요...

kldp게시판에 보니 이것저것 조건을 붙여서 컴파일 하는 게 나와있지만 잘 모르겠어서 기본적으로 설치하는 과정을 따랐습니다...

#./configure
#make
#make install

이렇게 진행하니 또다시 에러가 뜨더라구요...@.@

//////////////////////////////////////////////////////////////////////

decl.c: In function ‘start_struct’:
decl.c:4451: error: argument ‘code’ doesn’t match prototype
ch-tree.h:736: error: prototype declaration
make[2]: *** [decl.o] Error 1
make[2]: Leaving directory `/usr/lib/gcc-2.95.3/gcc/ch'
make[1]: *** [cc1chill] Error 2
make[1]: Leaving directory `/usr/lib/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2

//////////////////////////////////////////////////////////////////////

어찌할지 도저히 모르겠어서 이렇게 글을 올리게 되었습니다...

일단 gcc만 설치되면 컴파일 하면 될 것 같은데 gcc마저 컴파일 에러가 뜨니 막막하네요...

이미 gcc가 깔려있으면 이렇게 문제가 생기나요?

gcc2.95.3을 어떻게 해서든지 좀 깔았으면 합니다...

그럼 답변 부탁드리겠습니다...


그냥 깔면 기존에 gcc-4가 먼저 실행될겁니다.
이런 경우는 수동으로 gcc지정해주야 합니다.
makefile에 보면
cc=gcc이런 식으로 되어있는게 있습닉다
이걸 gcc-2.95.3 을 가리키도록 고쳐주야합니다.

즐린

romanian의 이미지

답변 주셔서 감사합니다...

위의 말씀대로 하기 위해서 ./configure 하고 나서
Makefile을 생성한 후에 vi 편집기로 들어가서

CC=gcc부분을 CC=gcc-2.95.3으로 바꾸었습니다...

그런데 이렇게 하니깐 make가 제대로 안 되더라구요...

보통 make하면 꽤 많은 시간이 걸리면서 처리를 하는데 조금 처리하다가 에러가 떠서 멈추더라구요...

make[1]: Entering directory `/usr/lib/gcc-2.95.3/libiberty'
if [ x"no" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
test x"no" != xyes || \
gcc-2.95.3 -c -DHAVE_CONFIG_H -g -O2 -I. -I./../include argv.c -o pic/argv.o
gcc-2.95.3 -c -DHAVE_CONFIG_H -g -O2 -I. -I./../include argv.c
make[1]: gcc-2.95.3: Command not found
make[1]: *** [argv.o] Error 127
make[1]: Leaving directory `/usr/lib/gcc-2.95.3/libiberty'
make: *** [all-libiberty] Error 2

그냥 또 무작정 여기다가 make install하니깐 이렇게 에러 발생하면서 멈추고요...

/bin/sh ./mkinstalldirs /usr/local /usr/local
make[1]: Entering directory `/usr/lib/gcc-2.95.3/gcc'
(cd intl && make all)
make[2]: Entering directory `/usr/lib/gcc-2.95.3/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/lib/gcc-2.95.3/gcc/intl'
gcc-2.95.3 -c -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config -I./../include \
./gencheck.c
make[1]: gcc-2.95.3: Command not found
make[1]: *** [gencheck.o] Error 127
make[1]: Leaving directory `/usr/lib/gcc-2.95.3/gcc'
make: *** [install-gcc] Error 2

계속 이것때문에 잡고 있으려니 답답해 죽겠네요... :cry:

이 에러에 대한 답변도 좀 부탁드립니다...

그럼...

rtlinux 떼고 졸업하자!!

Stand Alone Complex의 이미지

gcc-2.95.3 을 그대로 넣으시면 어찌하십니까.. :!:

자기 컴퓨터에 깔린 gcc버전을 확인하시고 그걸 쓰셔야죠...

그리고 커널은 gcc-4.x에서 컴파일이 안됩니다.

gcc-2.x나 gcc-3.x가 깔려있는지 확인하시고

그것에 맞추어서 gcc-머머머 이렇게 해주세요..

RET ;My life :P

romanian의 이미지

휴... 결국은 tar.gz로 설치하는 걸 포기하고 rpm 파일을 구해서 깔았습니다....

gcc-2.95.3-2suse82.i686.rpm

이전 gcc4.0.2는 지웠구요...

디렉토리도 다 지정해서 gcc가 작동은 되는 것 같은데...

계속 컴파일 오류는 생기네요...

휴...

위에 뜨는 에러 해결할 방법이 없나요??

rtlinux 떼고 졸업하자!!

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.