![](/zbxe/layouts/mr_layouts_1st/images/default/blank.gif)
도와주세요!!
안녕하세요~!
요즘 태풍이다 뭐다 날씨도 야시꾸리하고 마음도 뒤숭숭한게 하는일 해결도 잘 안되고..ㅠ_ㅠ
다름이 아니라 Cross-compiler 버전업을 위해 다시 재작중에 있습니다.
대략의 버전은
1. binutils-2.17
2. gcc-4.1.1
3. newlib-1.14.0
4. gdb-6.5
이렇게구요... 검색을 통하여 설치하는 과정 그대로 하는데 이런 에러가 발생하네요..
In file included from ./gthr-default.h:1,
from ../.././gcc/gthr.h:114,
from ../.././gcc/unwind-dw2.c:42:
../.././gcc/gthr-posix.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_key_t’
../.././gcc/gthr-posix.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_once_t’
../.././gcc/gthr-posix.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_mutex_t’
../.././gcc/gthr-posix.h:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_recursive_mutex_t’
../.././gcc/gthr-posix.h:88: error: ‘pthread_once’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:88: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_once’
../.././gcc/gthr-posix.h:89: error: ‘pthread_getspecific’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:89: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_getspecific’
../.././gcc/gthr-posix.h:90: error: ‘pthread_setspecific’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:90: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_setspecific’
../.././gcc/gthr-posix.h:91: error: ‘pthread_create’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:91: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_create’
../.././gcc/gthr-posix.h:92: error: ‘pthread_cancel’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:92: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_cancel’
../.././gcc/gthr-posix.h:93: error: ‘pthread_mutex_lock’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:93: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_lock’
../.././gcc/gthr-posix.h:94: error: ‘pthread_mutex_trylock’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:94: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_trylock’
../.././gcc/gthr-posix.h:95: error: ‘pthread_mutex_unlock’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:95: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_unlock’
../.././gcc/gthr-posix.h:96: error: ‘pthread_mutex_init’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:96: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_init’
../.././gcc/gthr-posix.h:99: error: ‘pthread_key_create’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:99: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_key_create’
../.././gcc/gthr-posix.h:100: error: ‘pthread_key_delete’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:100: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_key_delete’
../.././gcc/gthr-posix.h:101: error: ‘pthread_mutexattr_init’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:101: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_init’
../.././gcc/gthr-posix.h:102: error: ‘pthread_mutexattr_settype’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:102: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_settype’
../.././gcc/gthr-posix.h:103: error: ‘pthread_mutexattr_destroy’ undeclared here (not in a function)
../.././gcc/gthr-posix.h:103: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_destroy’
../.././gcc/gthr-posix.h:513: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:522: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:528: error: expected ‘)’ before ‘key’
../.././gcc/gthr-posix.h:534: error: expected ‘)’ before ‘key’
../.././gcc/gthr-posix.h:540: error: expected ‘)’ before ‘key’
../.././gcc/gthr-posix.h:546: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:555: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:564: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:574: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:595: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:601: error: expected ‘)’ before ‘*’ token
../.././gcc/gthr-posix.h:607: error: expected ‘)’ before ‘*’ token
make[2]: *** [libgcc/./unwind-dw2.o] 오류 1
make[2]: Leaving directory `/root/arm-linux/src/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
make[1]: *** [libgcc.a] 오류 2
make[1]: Leaving directory `/root/arm-linux/src/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
make: *** [all-gcc] 오류 2
인터넷상의 소스와 설치과정은 동일하게 하였는데 왜 이런 에러가 뜨는지..
그래서 다른 일반적인 Cross-compiler 제작과정을 참고하여 gth-posix.h와 관련된 에러사항인가 생각이 들어
gcc-4.1.1/gcc/config/arm/t-linux 파일을 수정도 해보았지만
역시나 에러메세지 출력이 나옵니다.
컴파일상에 무슨 문제가 있는지 궁금하여 이렇게 글을 올리게 되었습니다.
자세하고 친절한 답변 해주신 분 정말 감사하겠습니다ㅠ_ㅠ
아참 그리고 glibc 컴파일 과정에서 계속 as 와 ld 가 손상되었다나 오래된 버전이라나 이러면서 에러가 나는데
혹시 이것에 관해서도 아시는 분 친절한 답변 부탁드립니다.
인터넷에서 찾아본 결과 잘되었다는 분이 계셔서 버전을 저렇게 맞춘것인데...
흠...
혹시 gcc-4.3 대에 툴체인 만드신분 버전 조합좀 알려주실분 안계신가요..ㅠ
cups를 컴파일 하려는데 버전이 낮아서 컴파일 에러가 발생하는거 같아서요..
꼭 부탁드립니다. 이메일 주소는 rudxo52@gmail.com 입니다.
아.. 과정은..
tar xvjf gcc-4.1.1.tar.bz2
tar xvzf newlib-1.14.0.tar.gz
cd gcc-4.1.1
ln -s ../newlib-1.14.0/newlib newlib
ln -s ../newlib-1.14.0/libgloss libgloss
./configure --target=arm-elf --prefix=/usr/local/arm-toolchain --enable-interwork \
--enable-multilib --enable-languages="c,c++" --with-newlib \
--with-headers=./newlib/libc/include
make all-gcc install-gcc
이렇게 입니다.