이번 운영체제론 프로젝트로 pintos를 진행하고 있습니다. 그런데 설치 중 에러가 발생해서 많이 난감했습니다. 그 중 문제 하나를 해결하였기에 기록을 남깁니다.
gcc -Wall -W -c -o squish-pty.o squish-pty.c
squish-pty.c:10:21: error: stropts.h: 그런 파일이나 디렉터리가 없습니다
squish-pty.c: In function ‘main’:
squish-pty.c:292: warning: implicit declaration of function ‘isastream’
squish-pty.c:294: error: ‘I_PUSH’ undeclared (first use in this function)
squish-pty.c:294: error: (Each undeclared identifier is reported only once
squish-pty.c:294: error: for each function it appears in.)
make: *** [squish-pty.o] 오류 1
위와 같은 에러 메시지를 내면서 컴파일이 진행되지 않았습니다. 여기에 해결법을 찾다가 stropts.h를 추가하는 방법을 찾아냈습니다.
[[email protected] ~]# yum provides */stropts.h
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* fedora: ftp.kaist.ac.kr
* updates: ftp.kaist.ac.kr
xulrunner-devel-1.9.1-0.20.beta4.fc11.i586 : Development files for Gecko
Repo : fedora
Matched from:
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers/stropts.h
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers_js/stropts.harm-gp2x-linux-glibc-2.3.6-6.fc11.noarch : Cross Compiled GNU C Library targeted at arm-gp2x-linux
Repo : fedora
Matched from:
Filename : /usr/arm-gp2x-linux/include/stropts.h
Filename : /usr/arm-gp2x-linux/include/sys/stropts.h
Filename : /usr/arm-gp2x-linux/include/bits/stropts.hxulrunner-devel-1.9.1.3-1.fc11.i586 : Development files for Gecko
Repo : updates
Matched from:
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers/stropts.h
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers_js/stropts.hxulrunner-devel-1.9.1.3-1.fc11.i586 : Development files for Gecko
Repo : installed
Matched from:
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers/stropts.h
Filename : /usr/include/xulrunner-sdk-1.9.1/system_wrappers_js/stropts.harm-gp2x-linux-glibc-2.3.6-6.fc11.noarch : Cross Compiled GNU C Library targeted at arm-gp2x-linux
Repo : installed
Matched from:
Filename : /usr/arm-gp2x-linux/include/stropts.h
Filename : /usr/arm-gp2x-linux/include/sys/stropts.h
Filename : /usr/arm-gp2x-linux/include/bits/stropts.h
‘yum provides */stropts.h’라는 명령어로 stropts.h가 들어있는 패키지를 확인한 후 이를 설치하였습니다. 그리고 컴파일 시 옵션으로 해당 header 파일의 위치를 넣었습니다. 저는 pintos에서 제공하는 pintos/src/utils/Makefile을 수정하여 이를 해결하였습니다.
all: setitimer-helper squish-pty squish-unix
CC = gcc
CFLAGS = -Wall -W -I/usr/arm-gp2x-linux/include/
LDFLAGS = -lm
setitimer-helper: setitimer-helper.o
squish-pty: squish-pty.o
squish-unix: squish-unix.oclean:
rm -f *.o setitimer-helper squish-pty squish-unix
CFLAGS에 –I 옵션으로 header 파일의 위치를 추가한 것입니다.
이렇게 하니 문제 없이 컴파일 되는 것을 확인하였습니다.
참조
핀토스 군요 :) 지난 학기 저거 한다고 진땀을 흘렸죠
저는 실습 수업에서 했는데 이제 일반 운영체제 수업으로 옮겼나 보네요
엄영익 교수님 수업인가요? 아니면 새로오신 교수님 수업인가요?
그래서 교수님께서도 1학기에 그 수업을 들었냐고 물으시더군요.
새로오신 김진수 교수님께서 진행하십니다.OTL…
앞으로 험난한 여정의 길을 걸을 듯..ㅜ