gcc 설치에 관한 질문입니다
이렇게 게시판에 처음 글을 올리게 되네요...
일 하다가 필요하게 되어서 리눅스를 배우기 시작한 학생입니다.
여기에서 많은 도움을 받았다는 주변 사람들의 말을 듣고 이렇게 들어오게 되었습니다.
제가 지금 가지고 있는 문제는요...
저는 지금 쓰는 배포판(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을 어떻게 해서든지 좀 깔았으면 합니다...
그럼 답변 부탁드리겠습니다...
Re: gcc 설치에 관한 질문입니다
그냥 깔면 기존에 gcc-4가 먼저 실행될겁니다.
이런 경우는 수동으로 gcc지정해주야 합니다.
makefile에 보면
cc=gcc이런 식으로 되어있는게 있습닉다
이걸 gcc-2.95.3 을 가리키도록 고쳐주야합니다.
즐린
답변 주셔서 감사합니다...위의 말씀대로 하기 위해서 ./conf
답변 주셔서 감사합니다...
위의 말씀대로 하기 위해서 ./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 떼고 졸업하자!!
gcc-2.95.3 을 그대로 넣으시면 어찌하십니까.. :!: 자
gcc-2.95.3 을 그대로 넣으시면 어찌하십니까.. :!:
자기 컴퓨터에 깔린 gcc버전을 확인하시고 그걸 쓰셔야죠...
그리고 커널은 gcc-4.x에서 컴파일이 안됩니다.
gcc-2.x나 gcc-3.x가 깔려있는지 확인하시고
그것에 맞추어서 gcc-머머머 이렇게 해주세요..
RET ;My life :P
휴... 결국은 tar.gz로 설치하는 걸 포기하고 rpm 파일을 구해서
휴... 결국은 tar.gz로 설치하는 걸 포기하고 rpm 파일을 구해서 깔았습니다....
gcc-2.95.3-2suse82.i686.rpm
이전 gcc4.0.2는 지웠구요...
디렉토리도 다 지정해서 gcc가 작동은 되는 것 같은데...
계속 컴파일 오류는 생기네요...
휴...
위에 뜨는 에러 해결할 방법이 없나요??
rtlinux 떼고 졸업하자!!
댓글 달기