[완료]xgrafix를 설치하는데 발생한 에러, 어떻게 해야 할까요?

injh97의 이미지

윈도우즈에서 VMware로 fedora11을 설치해서 사용하고 있습니다.

필요한 프로그램이 있어서 다운받아서 설치를 하는데 다음과 같은 에러가 생겼습니다.

# make

make all-recursive
make[1]: Entering directory `/home/junghwan/Download/xgrafix'
Making all in config
make[2]: Entering directory `/home/junghwan/Download/xgrafix/config'
make[2]: `all'를 위해 할 일이 없습니다
make[2]: Leaving directory `/home/junghwan/Download/xgrafix/config'
Making all in src
make[2]: Entering directory `/home/junghwan/Download/xgrafix/src'
gcc -DHAVE_CONFIG_H -I. -I../. -I/usr/local/include -I/usr/local/include -DXGTCL=\"/usr/local/xgrafix/lib\" -I/usr/include -Wall -Wno-unused -Wno-uninitialized -O2 -g -pipe -O2 -g -pipe -DXPMENABLED -DTcl75_Tk41 -DHAVE_CONVERT -c xgprintgif.c
xgprintgif.c:99: error: conflicting types for ‘getline’
/usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here
xgprintgif.c: In function ‘my_realloc’:
xgprintgif.c:156: warning: implicit declaration of function ‘realloc’
xgprintgif.c:156: warning: incompatible implicit declaration of built-in function ‘realloc’
xgprintgif.c: In function ‘ppm_freecolorhist’:
xgprintgif.c:165: warning: implicit declaration of function ‘free’
xgprintgif.c:165: warning: incompatible implicit declaration of built-in function ‘free’
xgprintgif.c: In function ‘ppm_freecolorhash’:
xgprintgif.c:177: warning: incompatible implicit declaration of built-in function ‘free’
xgprintgif.c:179: warning: incompatible implicit declaration of built-in function ‘free’
xgprintgif.c: In function ‘XpmToGif’:
xgprintgif.c:652: warning: incompatible implicit declaration of built-in function ‘free’
xgprintgif.c: At top level:
xgprintgif.c:748: error: conflicting types for ‘getline’
/usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here
make[2]: *** [xgprintgif.o] 오류 1
make[2]: Leaving directory `/home/junghwan/Download/xgrafix/src'
make[1]: *** [all-recursive] 오류 1
make[1]: Leaving directory `/home/junghwan/Download/xgrafix'
make: *** [all] 오류 2

아시는 분 답변 부탁드립니다.

feanor의 이미지

bushi의 이미지

fedora 의 glibc 패키지는 2.9.3 버전까지도 getline() 을 extension 으로 다룹니다.
_GNU_SOURCE 등에 의해 __USE_GNU 가 참이 되지 않으면 무효입니다.

fedora11 의 glibc 패지키는 2.10 입니다.

[bushi@rose diplomovka]$ w3m -dump <a href="http://download.fedoraproject.org/pub/fedora/linux/releases/11/Everything/i386/os/Packages" rel="nofollow">http://download.fedoraproject.org/pub/fedora/linux/releases/11/Everything/i386/os/Packages</a> | grep glibc
[ ]   arm-gp2x-linux-glibc-2.3.6-6.fc11.noarch.rpm                               10-Mar-2009  12M  
[ ]   glibc-2.10.1-2.i586.rpm                                                    23-May-2009 4.9M  
[ ]   glibc-2.10.1-2.i686.rpm                                                    23-May-2009 5.8M  
[ ]   glibc-common-2.10.1-2.i586.rpm                                             23-May-2009  23M  
[ ]   glibc-devel-2.10.1-2.i586.rpm                                              23-May-2009 1.0M  
[ ]   glibc-headers-2.10.1-2.i586.rpm                                            23-May-2009 638K  
[ ]   glibc-static-2.10.1-2.i586.rpm                                             23-May-2009 1.3M  
[ ]   glibc-utils-2.10.1-2.i586.rpm                                              23-May-2009 145K  
[bushi@rose diplomovka]$

http://udrepper.livejournal.com/20948.html 를 보면 POSIX 2008 의 대부분을 포함한 것 같습니다.
getline() 도 표준함수로 되어 있을테죠.

http://platon.sk/cvs/cvs.php/dead/diplomovka/xgrafix/src/xgprintgif.c?rev=1.3&content-type=text/x-cvsweb-markup

src/xgprintgif.c 는 자체적으로 getline() 을 구현해서 사용하고 있는데,
xgprintgif.c 의 getline 을 모두 다른 이름으로 고쳐 사용하는 게 바람직합니다.
예전엔 glibc extension 에 불과했지만, 지금은 POSIX C 표준함수입니다.
http://www.opengroup.org/onlinepubs/9699919799/functions/getline.html

OTL

injh97의 이미지

감사합니다. 수정하니까 잘 됩니다.

댓글 달기

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