gcc 컴파일 error

babomose의 이미지

안녕하세요. Linux 환경에서 개발한 소스가 리눅스 환경에서는 컴파일이 되는데 AIX에서는 컴파일이 안됩니다.

다음과 같은 error가 뿌려지는데 마땅히 테스트할 AIX 서버가 없고 개발 지식이 부족하여 이렇게 질문을 드립니다.

질문은 다음과 같습니다.

1. AIX gcc를 버전 upgrade 하면 컴파일이 되는지?
2. 그렇다면 gcc 버전 upgrade 외에 다른 방법은 없는지?
(예를들어 필요한 헤더파일만 따로 복사해 놓아도 되는지)
3. 상위버전의 gcc가 설치된 aix에서 컴파일된 실행파일을 낮은버전(2.95.2.1)의 gcc가 설치된 AIX에서 실행이 되는지?
4. gcc가 설치되지 않은 AIX 서버에서는 컴파일된 실행파일의 실행이 불가능한지?

NOTE : 현재 이용중인 AIX서버가 운영중이라 test서버가 없어 -_ㅠ 변경을 못해 이렇게 자잘한 것 까지 질문을 드립니다. 죄송합니다.

* Linux 환경
fedora 9, Linux 2.6.25-14.fc9.i686
gcc version 4.3.0

* AIX 환경
AIX 5.3
gcc version 2.95.2.1

* Error 화면

# gcc -o ftpcomm ftpcomm.c
In file included from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.2.1/include/sys/signal.h:340,
from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.2.1/include/sys/wait.h:53,
from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.2.1/include/stdlib.h:227,
from ftpcomm.c:1:
/usr/include/sys/context.h:175: parse error before `sigset64_t'
/usr/include/sys/context.h:175: warning: no semicolon at end of struct or union
/usr/include/sys/context.h:178: parse error before `}'

jachin의 이미지

AIX 환경에 이미 기존 gcc 컴파일러가 있다면, 상위 버전의 GCC 컴파일러를 컴파일 할 수 있습니다.
GCC 버전이 낮아서 생기는 문제라고 생각하신다면, 문제가 되는 부분의 소스코드를 살짝 수정하는 것으로 문제가 해결될 수 있습니다.
상위 버전의 GCC 로 컴파일을 하고 나면, ABI 문제가 없을 경우, 다른 AIX 머신에서도 작동합니다. (컴파일러와는 상관이 없습니다.)
GCC가 설치되어 있지 않은 AIX 서버라도, 다른 AIX 서버 환경에서 컴파일 한 응용프로그램을 복사하여 쓸 수 있습니다.

문제는 '커널'과 'CPU'이지, 컴파일러가 아닙니다.

에러메시지는 sigset64_t 로 설정한 데이터 형의 선언 부분에서 생긴 문제입니다.
sigset64_t 데이터 형을 types.h 에서 선언하였을 것입니다.
소스코드에 #include 을 추가하시는 것도 방법입니다만,
기존 ftp 소스코드를 사용하시는 것이라면, 분명 proc.h 부분에서도 에러가 날겁니다.

댓글 달기

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