[해결] GCC crossed-native 빌드 질문

whiteblue3의 이미지

GCC 4.4.2를 portable ubuntu release dos 4 (9.04) 시스템에서 빌드하고있습니다.
이 시스템에서 windows용 gcc를 crossed-native 빌드를 하려고 하는데요.
cross 빌드까지는 성공했지만 갑자기 crossed-native를 빌드하려고 하니 에러가 튀어나옵니다.

libstdc++-v3에서 에러가 튀어나오는데 도대체 이유를 모르겠습니다.
--with-gcc 옵션도 사라진건지 gnu gcc 홈페이지의 매뉴얼에는 나와있지도 않습니다.
4.2 에서는 있다가 4.4로 넘어오면서 삭제된건지 당췌 알수가 없구요.

처음엔 mingw32 에서 빌드를 했다가 리눅스에서 윈도우용 gcc를 crossed-native 빌드가 가능하다는 문서를 보고 시도해보려고 했지만 crossed-native는 실패하더군요.
제가 찾은 문서에는 crossed-native 빌드가 빠르고 안정적이라고 나와있긴 합니다만 정말 가능하긴 한겁니까?
주변에 잘 아는 분에게 물어봐도 가능하긴 한거냐는 대답이 올뿐이었습니다.
설마지만 버젼이 올라가면서 불가능해진건 아니겠죠?

혹시 모르니 저의 빌드오더를 첨부합니다.

pubuntu@pubuntu:~/cwork/hello$ i586-mingw32msvc-cc -v
Using built-in specs.
Target: i586-mingw32msvc
Configured with: /build/buildd/mingw32-4.2.1.dfsg/build_dir/src/gcc-4.2.1-2-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.2.1-sjlj (mingw32-2)
 
pubuntu@pubuntu:~/cwork/hello$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) 
 
 
 
 
gcc-4.4.2 built-in info
system: portable ubuntu release dos 4 (9.04)
 
required package
- bison
- flex
- autoconf
- automake
- libtool
 
update pagkage
- mingw (cross for win32)
- mingw-binutils
- mingw-runtime
 
required for gcc built-in order
- gmp 4.2.3
- mpfr 2.4.2
- mpc 0.8.1
 
 
<native>
native built-in order
- binutils 2.20
- mingwrt 3.17 (binary)
- w32api 3.14 (binary)
- gcc 4.4.2
 
configure for binutils
../binutils-2.20/configure --prefix=/home/pubuntu/native-binutils --enable-nls --enable-shared
 
native built-in spec
root@pubuntu:/home/pubuntu/gcc-install/native-gcc-out# /home/pubuntu/native-gcc/bin/i686-pc-linux-gnu-gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.2/configure --prefix=/home/pubuntu/native-gcc --enable-languages=c,c++,objc,obj-c++ --enable-threads=posix --enable-nls --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release -v --with-pkgversion=Ubuntu4.3.3-5ubuntu4 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 4.4.2 (Ubuntu4.3.3-5ubuntu4)
 
gcc-4.4.2 native symbolic-link info
file: /usr/bin/gcc
using command:
- rm /usr/bin/gcc
- ln -s /home/pubuntu/native-gcc/bin/gcc /usr/bin/gcc
 
 
<win32-cross>
win32-cross built-in order
- binutils 2.20
- mingwrt 3.17 (binary)
- w32api 3.14 (binary)
- export PATH to /home/pubuntu/win32-cross-gcc/bin:$PATH (PREFIX path)
- gcc 4.4.2
 
configure for binutils
../binutils-2.20/configure --prefix=/home/pubuntu/win32-cross-binutils --with-sysroot=/home/pubuntu/win32-cross-gcc/sys-root --target=i686-pc-mingw32 
 
win32-cross built-in spec
root@pubuntu:/home/pubuntu/cwork/hello# i686-pc-mingw32-gcc -v
Using built-in specs.
Target: i686-pc-mingw32
Configured with: /home/pubuntu/gcc-install/gcc-4.4.2/configure --prefix=/home/pubuntu/win32-cross-gcc --with-sysroot=/home/pubuntu/win32-cross-gcc/sys-root --with-build-sysroot=/home/pubuntu/win32-cross-gcc/sys-root --target=i686-pc-mingw32 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --enable-languages=c,c++,objc,obj-c++ --with-gnu-as --with-gnu-ld --enable-shared --enable-nls --disable-multilib --enable-threads=win32 --enable-multilib --disable-libssp --with-headers=/home/pubuntu/win32-cross-gcc/sys-root/mingw/include --enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.4.2 (GCC) 
 
gcc-4.4.2 win32-cross symbolic-link info
file: /usr/bin/gcc
using command:
- ln -s /home/pubuntu/win32-cross-gcc/bin/i686-pc-mingw32-gcc /usr/bin/i686-pc-mingw32-gcc
 
 
 
 
<win32-crossed-native>
win32-crossed-native built-in order
- binutils 2.20
- mingwrt 3.17 (binary)
- w32api 3.14 (binary)
- set env (below)
- gmp 4.2.3 for i686-pc-mingw32
- mpfr 2.4.2 for i686-pc-mingw32 (specify gmp installation manually)
- mpc 0.8.1 for i686-pc-mingw32 (specify gmp, mpfr installation manually)
- gcc 4.4.2
 
set env
CC=i686-pc-mingw32-gcc
export CC
CXX=i686-pc-mingw32-c++
export CXX
AS=i686-pc-mingw32-as
export AS
LD=i686-pc-mingw32-ld
export LD
AR=i686-pc-mingw32-ar
export AR
PATH=/home/pubuntu/win32-cross-gcc/bin:$PATH
export PATH
 
configure for binutils and order
../binutils-2.20/configure --prefix=/home/pubuntu/win32-crossed-native-binutils --with-sysroot=/home/pubuntu/win32-crossed-native-gcc/sys-root --build=`/home/pubuntu/gcc-install/binutils-2.20/config.guess` --host=`/home/pubuntu/gcc-install/binutils-2.20/config.guess` --target=i686-pc-mingw32 --enable-threads=win32
 
win32-cross built-in spec
report some errors. 
hys545의 이미지

즐린

configure과정에서 난거면
config.log파일을 올려주시고
make과정에서 난거면 그 에러 메세지 올려주세여

즐린

whiteblue3의 이미지

mkdir -p ./i686-pc-mingw32/bits/stdtr1c++.h.gch
i686-pc-mingw32-c++ -L/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/winsup/mingw -L/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/winsup/w32api/lib -isystem /home/pubuntu/gcc-install/gcc-4.4.2/winsup/mingw/include -isystem /home/pubuntu/gcc-install/gcc-4.4.2/winsup/w32api/include -x c++-header -g -O2 --sysroot=/home/pubuntu/win32-crossed-native-gcc/sys-root  -I/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/i686-pc-mingw32 -I/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include -I/home/pubuntu/gcc-install/gcc-4.4.2/libstdc++-v3/libsupc++ -O2 -g /home/pubuntu/gcc-install/gcc-4.4.2/libstdc++-v3/include/precompiled/stdtr1c++.h -o i686-pc-mingw32/bits/stdtr1c++.h.gch/O2g.gch
In file included from /home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1/cfenv:46,
                 from /home/pubuntu/gcc-install/gcc-4.4.2/libstdc++-v3/include/precompiled/stdtr1c++.h:33:
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:49: error: ‘::fenv_t’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:50: error: ‘::fexcept_t’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:53: error: ‘::feclearexcept’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:54: error: ‘::fegetexceptflag’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:55: error: ‘::feraiseexcept’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:56: error: ‘::fesetexceptflag’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:57: error: ‘::fetestexcept’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:59: error: ‘::fegetround’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:60: error: ‘::fesetround’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:62: error: ‘::fegetenv’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:63: error: ‘::feholdexcept’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:64: error: ‘::fesetenv’ has not been declared
/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include/tr1_impl/cfenv:65: error: ‘::feupdateenv’ has not been declared
make[4]: *** [i686-pc-mingw32/bits/stdtr1c++.h.gch/O2g.gch] Error 1
make[4]: Leaving directory `/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3/include'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/pubuntu/gcc-install/win32-crossed-native-gcc-out/i686-pc-mingw32/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/pubuntu/gcc-install/win32-crossed-native-gcc-out'
make: *** [all] Error 2

에러내용은 이러합니다. 아무리 옵션을 건드려봐도 이러한 에러만 반복될뿐이었습니다.
libstdc++-v3 관련 빌드에러 같은데 glibc나 libstdc++6는 설치가 되어있습니다만 뭐가 잘못된건지 모르겠습니다.

whiteblue3의 이미지

configure시에 --disable-libstdcxx-pch을 넣어주니까 잘 되는군요.

댓글 달기

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