2008년 8월 8일 금요일

libstdc++.so: undefined reference to 불라불라

/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__towupper_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__freelocale'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__wcscoll_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__strcoll_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__wcsftime_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__strxfrm_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__wctype_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__iswctype_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__nl_langinfo_l'
/opt/TMO-Linux/buildroot/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/3.4.6/../../../../i386-linux-uclibc/lib/libstdc++.so: undefined reference to `__strtold_l'


요딴 식의 에러 해결법

GCC버전 upgrade. 4.2.X로

근데, GCC를 업그레이드 하면 옛날 소스가 안돌아 간다. 니미.ㅠ

2008년 8월 5일 화요일

grub login


오류라고 말하긴 뭐하지만,
무슨파일이 어떻게 바뀐건지 부팅이 되고난 후 login을 하는 부분에서 자꾸 password를 물어본다.
난 비밀번호 지정해 준적도 없고;ㅁ; 비밀번호가 뭔지도 모른단 말이다;ㅁ;

이를 해결하는 방법은 두 가지가 있다.


grub 명령어 kernel에 옵션으로 "single"을 주는 방법.
그러면 login없이 바로 부팅된다.

kernel /bzImage ... 어쩌고 저쩌고..... single


/etc/passwd 파일 수정.
이 파일을 열어보면, 맨 첫 번째 줄에
root:x:0:0:root:/root:/bin/sh 이라고 되있는 것이 보일 것이다.

여기서 'X'라는 것은 비밀번호가 어딘가 있다는 뜻이므로 이걸 삭제해 버리면 된다.
root::0:0:root:/root:/bin/sh

그럼 비밀번호 없이 login가능-_+)b

2008년 8월 4일 월요일

filesystem type is tftp, using whole disk


나를 몇 주간을 괴롭히고 몇 일간을 밤을 새우게 하고, 담배 무는 시간을 늘렸던 골칫덩이 에러-_-)!
filesystem type is tftp, using whole disk!!

.... 5분도 안되서 에러를 잡아주셔서 감사합니다만, 제가 너무 비참해지는군요.ㅠㅜ

원인은 방화벽이었다.
tftp에 방화벽이 설정되어 있어서 booting image를 받지 못했던 것.

실로 나를 좌절하게 만드는 에러가 아닐 수 없다.ㅠㅜ

한고비 넘겼다 싶었더니만, 이번엔 kernel panic이구나... 닝기미...



리눅스에서 윈도우 원격접속

리눅스에서 윈도우로 원격접속을 하려면 여러가지 방법이 있지만, 그 중에 rdesktop을 이용하는 것이 가장 일반적이다.

rdesktop으로 원격접속을 해보자.


1. install

rdesktop 다운로드
다운로드를 받고 압축을 푼다.

압축을 푼 디렉토리로 이동하여 다음 명령어를 수행한다.
$ ./configure (몇몇 패키지가 설치되어 있지 않다고 투덜대면 패키지를 설치하고 다시 한다.)
$ make
$ make install


2. 사용하기

위와 같은 방법으로 rdesktop을 설치하였다면 이제 사용하면 된다
$ rdesktop -a 16 -f  ipaddr

-a는 해상도 옵션(16bit을 의미)
-f는 fullscreen이다.

윈도우 화면이 뜰 것이다+_+!
와우.

2008년 8월 1일 금요일

파일 업로드 에러!


보드로 실행파일을 업로드하여 에러가 생기는 걸로 삽질 3일째-_-.
tftp로 올려도 안되고, nfs로 올려도 안된다-_-);;;
자꾸 이 놈시끼가
-sh : ./a.out: not found 를 연발한다;

파일이 있는데도 not found를 연발하는 것은 무슨 문제일까... 싶어 여러분의 조언을 구했다.

그래서 나온 결론은 파일은 있지만 library가 없다!!! 라는 것.

실제 실행파일은 library를 포인터로 가리키고 있다. 필요할 때마다 가져다 쓸 수 있도록.
그러나 보드에 library가 올라가 있지 않을 경우에는 library를 찾지 못한다는 거다.
(그럼 library를 못찾겠다고 하든가-_-; 다짜고짜 not found라니, 건방진 자식)

해결책은 컴파일을 할 때 "library를 포함시켜 컴파일 한다" 는 것이다.

내가 사용한 파일은 C++파일이므로, 다음과 같이 컴파일 하였다.

$ g++ -static test.cpp

이 때 생성되는 a.out파일은 용량이 무지하게 커져버린다-_-);
그러나 보드에서 실행이 된다-_-)b


덧, 파일용량이 너무 커진다 싶으면 strip옵션을 준다.
실행과 관련없는 내용을 지워버리는 옵션이다.

ifconfig: command not found


root 권한을 주었는데도 ifconfig명령어가 계속 실행되지 않는다-_-)!!!!
봐야될거 아니야!!!!

일반유저가 "su" 명령을 사용해 root권한을 받게 되면, 슈퍼유저의 command를 사용할 수 있다.

내가 지금 사용하고 있는 것은 centoOS 5로 페도라와 같은 기반이지만, 요게 안되는 거다-_-

그래서 좀 알아봤더니, 제대로 root권한을 주기 위해서는
"su - root" 라고 해야 지대로 된 root권한을 받게 된다는 거다.ㅎ

이걸로 했더니 ifconfig 등의 명령어가 드디어 동작한다-_ㅠ 흑...

nfs 설치

1. install
  우선, nfs 패키지를 인스톨 해야한다.

  $ yum install nfs-util (맞나? 암튼 비슷한 이름의 패키지이다;;)


2. 설정
  /etc에 가보면 exports라는 파일이 있다.
  그 파일을 열어보면 아무것도 없을 수도 있고, default로 뭔가 저장되어 있을 수도 있다.
  이 파일을 수정하여 nfs를 동작하게 한다.

  /nfsroot localhost(rw,insecure,root_squash)
  /nfsroot 192.168.11.*(rw,insecure,root_squash)

  이런식으로 설정해 줄 수 있다.
  /nfsroot는 서버의 nfs directory이며 localhost라든가 192.168.11.* 등의 address는 이 폴더(nfs directory)에 접근할 수 있는 권한을 줄 client를 말한다. 그리고 괄호안에 들어가있는 내용은 권한에 관련된 것이다.


3. 재시작
   $ /etc/init.d/nfs restart

  설정을 변경해주었으므로 재시작 한다.


4. 테스트 하기
   잘 설치되었는지 보려면 테스트를 해본다.
   $ mount -t nfs localhost:/nfsroot /temp
   라고 입력하면 자기 컴퓨터의 /temp와 /nfsroot가 연결된다.

  /nfsroot에 파일을 생성하거나 수정을 하면 /temp에도 똑같이 적용된다.