diet libc를 페도라11에 깔는 중 에러...

bakdorazi의 이미지

1. 하려고 하는 작업

가. Target Board용 작업

A. Target Board 의 OS가 uClinux를 사용.
B. Target Board에 SSHD를 올리려고 함.
C. uClinux 용 Small SSH 인 Dropbear를 올리려고 함.
D. dropbear의 최적화 위해서 uClibc와 diet libc를 올리려고 함

나. Host에서의 작업

A. 환경: Fedora 11
B. Dropbear 와 uClibc 와 diet libc를 cross-compile 하려고 함.

2. diet libc를 깔면서 생긴 작업.

A. diet libc 0.32 버젼을 다운받아 make 함.
B. diet libc를 Target에 올려야 할 것 같은데 make 한 후 폴더에 현재 시스템에 최적화한 bin-x86-64 가 생김.
C. 찜찜하지만 진행함.
D. 처음 make 시에는 별다른 에러 없이 폴더(bin-x86-64)가 생김
E. diet gcc -s -Os -pipe -o t t.c 하는 순간 에러 뿜어냄 (에러는 vprintf 가 어쩌고 하는 거임. 잘 생각이 안남. 재현할 수 없음. make시에 에러가 나기 때문임)
F. make clean 하고 다시 make 함
G. 그러자 다음과 같은 에러 뿜어냄

 
bin-x86_64/dyn_stop.o -DDIETHOME=\"/home/test/dietlibc-0.32\" -DVERSION=\"dietlibc-0.32\" -lgcc
strip -R .comment -R .note bin-x86_64/diet
gcc -D__dietlibc__ -isystem include -Os -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls -nostdlib -o bin-x86_64/diet-i bin-x86_64/start.o bin-x86_64/dyn_start.o diet.c bin-x86_64/dietlibc.a bin-x86_64/dyn_stop.o -DDIETHOME=\"/opt/diet\" -DVERSION=\"dietlibc-0.32\" -DINSTALLVERSION -lgcc
strip -R .comment -R .note bin-x86_64/diet-i
bin-x86_64/diet gcc -D__dietlibc__ -Os -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls -o bin-x86_64/elftrunc contrib/elftrunc.c
bin-x86_64/diet gcc -D__dietlibc__ -Os -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls -o bin-x86_64/dnsd contrib/dnsd.c
contrib/dnsd.c: In function ‘recv6’:
contrib/dnsd.c:235: warning: dereferencing type-punned pointer will break strict-aliasing rules

H. 아래는 contrib/dnsd.c :235 줄입니다.

 
    235: if (IN6_IS_ADDR_V4MAPPED(sa6.sin6_addr.s6_addr)) {
    236: interface=v4if();

I. IN6_IS_ADDR_V4MAPPED 매크로를 찾아보겠습니다.

#define IN6_IS_ADDR_V4MAPPED(a) \
        ((((__const uint32_t *) (a))[0] == 0)                                 \
         && (((__const uint32_t *) (a))[1] == 0)                              \
         && (((__const uint32_t *) (a))[2] == htonl (0xffff)))

J. sa6.sin6_addr.s6_addr 는 정의된 곳이 없더군요. 사용하는 곳도 dnsd.c에서만 사용하고 sa6 구조체 인가 싶어서 검색해봐도 나오는 건 없구요. 단지 이 변수가 주소 같은 것을 받는 것 같아요... 비슷한 것으로 이런 것을 찾았거든요..

  mysa6.sin6_addr.s6_addr[i]=(a<<4)+b;
      if (!IN6_IS_ADDR_UNSPECIFIED(mysa6.sin6_addr.s6_addr32)) {
  if (IN6_IS_ADDR_V4MAPPED(sa6.sin6_addr.s6_addr)) {
    inet_ntop(AF_INET,(char*)(sa6.sin6_addr.s6_addr)+12,addrbuf,sizeof addrbuf);
    inet_ntop(AF_INET6,sa6.sin6_addr.s6_addr,addrbuf,sizeof addrbuf);
./dietlibc-0.32/contrib/dnsd.c

3. 저의 질문

1. diet libc를 make할 때 발생하는 위의 에러를 픽스할 방법이 없는 건지.. 다른 버젼을 깔아봤지만 역시나 같은 부분에서 에러가 났습니다. 혹시나 시스템이 안맞아서 그런건 아닐까요? diet libc 같은 건 임베디드용으로 만든 건데 x86-64 같은 것에 깔리니 사용하는 함수나 라이브러리가 너무 커서 에러가 나던지... 저는 이것을 Target 보드에 올려야 하는데요. target board에 다가 diet libc를 직접 깔아야 하나요? 아니면 크로스 컴파일 해야 하나요? diet libc의 경우 크로스 컴파일 하는 방법이 없던데요. 무조건 make만 하라고 되어 있던데.. 그렇게 하면 시스템에 맞게 설치가 되는가 보더라구요..

2. uClibc 나 diet libc나 glibc가 임베디드용으로는 너무 커서 이런 걸 사용하는 걸로 아는데요. 둘 중에 하나만 깔아도 되는 것 아닌가요? 결국 둘다 libc 니까요... 혹시 두 개가 깔려고 해서 에러가 생기는 건 아닌가요? uClinux에서 dropbear가 잘 돌게 하려면 uClibc, diet libc를 깔아야 된다고 되어 있어서 하긴 하는데 약간의 의문이 드네요. uClibc는 크로스 컴파일 방법을 어떻게든 찾겠는데.. 사실은 찾아서 해봤는데 에러나더라구요...ㅠㅠ.. 그래서 그만 뒀고.. diet libc는 크로스 컴파일 하는 방법이 메뉴얼에는 없던데요....

질문이 중구난방인데 처음 해보는 거라.. 모르는 게 너무 많습니다. 일단 파일들은 다 받아놨는데 깔려고 하니 make에서 에러는 기본이네요. uClibc도 그렇고 diet libc도 그렇고 dropbear는 에러는 안났는데 dropbear 하나 만 올리니까 동작을 안하네요...ㅠㅠ

갈팡질팡 하고 있습니다. 도움을 주십시요.

댓글 달기

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