From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31116 invoked by alias); 20 Mar 2004 00:51:06 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31088 invoked from network); 20 Mar 2004 00:51:03 -0000 Received: from unknown (HELO outgoing-mail.its.caltech.edu) (131.215.49.69) by sources.redhat.com with SMTP; 20 Mar 2004 00:51:03 -0000 Received: from fire-dog (fire-dog [192.168.1.4]) by water-ox-postvirus (Postfix) with ESMTP id 9EB8226ADD6 for ; Fri, 19 Mar 2004 16:51:02 -0800 (PST) Received: from water-ox ([192.168.1.10]) by fire-dog (MailMonitor for SMTP v1.2.2 ) ; Fri, 19 Mar 2004 16:51:01 -0800 (PST) Received: from northwood (northwood.caltech.edu [131.215.159.60]) by water-ox.its.caltech.edu (Postfix) with ESMTP id BE3E826ADD6 for ; Fri, 19 Mar 2004 16:51:01 -0800 (PST) Reply-To: From: "Stephan T. Lavavej" To: "GCC" Subject: Failure crossing gcc 3.3.3 from GNU/Linux to MinGW Date: Sat, 20 Mar 2004 03:46:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <20040320005101.BE3E826ADD6@water-ox.its.caltech.edu> X-Spam-Status: No, hits=0.0 tagged_above=-100000.0 required=5.0 X-Spam-Level: X-SW-Source: 2004-03/txt/msg01190.txt.bz2 I am working on GNU/Linux, building cross binutils, cross gcc, and then crossed-native gcc. Making the cross gcc fails with: /home/stl/cross/xgcc-build/gcc/xgcc -shared-libgcc -B/home/stl/cross/xgcc-build/gcc/ -nost dinc++ -L/home/stl/cross/xgcc-build/mingw32/libstdc++-v3/src dinc++ -L/home/stl/cross/xgcc-build/ mingw32/libstdc++-v3/src/.libs -B/home/stl/cross/xgcc-dest/mingw32/bin/ -B/home/stl/cross/ xgcc-dest/mingw32/lib/ -isystem /home/stl/cross/xgcc-dest/mingw32/include -nostdinc++ -I/h ome/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/mingw32 -I/home/stl/cross/xgcc-build /mingw32/libstdc++-v3/include -I/home/stl/cross/xgcc-src/libstdc++-v3/libsupc++ -I/home/st l/cross/xgcc-src/libstdc++-v3/libmath -O3 -fomit-frame-pointer -ffast-math -fno-implicit-t emplates -Wall -Wno-format -W -Wwrite-strings -fdiagnostics-show-location=once -c /home/st l/cross/xgcc-src/libstdc++-v3/src/bitset.cc -o bitset.o In file included from /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/string:47, from /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bitset:55, from /home/stl/cross/xgcc-src/libstdc++-v3/src/bitset.cc:43: /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static int std::char_traits::compare(const wchar_t*, const wchar_t*, unsigned int)': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 11: error: ` wmemcmp' undeclared (first use this function) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 11: error: (Ea ch undeclared identifier is reported only once for each function it appears in.) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static const wchar_t* std::char_traits::find(const wchar_t*, unsigned int, const wchar_t&)': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 19: error: ` wmemchr' undeclared (first use this function) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static wchar_t* std::char_traits::move(wchar_t*, const wchar_t*, short unsigned int)': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 23: error: ` wmemmove' undeclared (first use this function) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static wchar_t* std::char_traits::copy(wchar_t*, const wchar_t*, unsigned int)': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 27: error: ` wmemcpy' undeclared (first use this function) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static wchar_t* std::char_traits::assign(wchar_t*, unsigned int, wchar_t)': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 31: error: ` wmemset' undeclared (first use this function) /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h: In static member function `static wint_t std::char_traits::eof()': /home/stl/cross/xgcc-build/mingw32/libstdc++-v3/include/bits/char_traits.h:2 44: error: ` WEOF' undeclared (first use this function) make[3]: *** [bitset.lo] Error 1 make[3]: Leaving directory `/home/stl/cross/xgcc-build/mingw32/libstdc++-v3/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/stl/cross/xgcc-build/mingw32/libstdc++-v3' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/home/stl/cross/xgcc-build/mingw32/libstdc++-v3' make: *** [all-target-libstdc++-v3] Error 2 This is my build script, based off of Ranjit Mathew's at http://ranjitmathew.tripod.com/phartz/gcj/bldgcj.html : #!/bin/sh echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Setting internal variables. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ CROSS_ROOT=/home/stl/cross BU_SRC=$CROSS_ROOT/binutils-src BU_BUILD=$CROSS_ROOT/binutils-build XGCC_SRC=$CROSS_ROOT/xgcc-src XGCC_BUILD=$CROSS_ROOT/xgcc-build XGCC_DEST=$CROSS_ROOT/xgcc-dest WINGCC_SRC=$CROSS_ROOT/wingcc-src WINGCC_BUILD=$CROSS_ROOT/wingcc-build WINGCC_DEST=$CROSS_ROOT/wingcc-dest echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Creating CROSS_ROOT. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ mkdir -p $CROSS_ROOT echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Dump mingw-runtime-3.2.tar and w32api-2.5.tar into CROSS_ROOT. echo @ They must be binaries that extract to bin, include, lib. echo @ echo @ Dump gcc-3.3.3-truemingw.tar into CROSS_ROOT. echo @ It must be source that extracts to gcc-3.3.3-truemingw. echo @ echo @ Dump binutils-2.15.90-20040222-1-src.tar into CROSS_ROOT. echo @ It must be source that extracts to binutils-2.15.90-20040222-1. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Making directories. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ mkdir -p $BU_BUILD $XGCC_BUILD $XGCC_DEST/mingw32 $WINGCC_BUILD $WINGCC_DEST/mingw32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting mingw-runtime to XGCC_DEST. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf mingw-runtime-3.2.tar -C $XGCC_DEST/mingw32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting w32api to XGCC_DEST. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf w32api-2.5.tar -C $XGCC_DEST/mingw32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting mingw-runtime to WINGCC_DEST. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf mingw-runtime-3.2.tar -C $WINGCC_DEST/mingw32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting w32api to WINGCC_DEST. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf w32api-2.5.tar -C $WINGCC_DEST/mingw32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting gcc... echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf gcc-3.3.3-truemingw.tar echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ ...and applying hack... echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ mkdir -p /home/stl/cross/gcc-3.3.3-truemingw/libstdc++-v3/config/config/os/newlib cp /home/stl/cross/gcc-3.3.3-truemingw/libstdc++-v3/config/os/mingw32/* \ /home/stl/cross/gcc-3.3.3-truemingw/libstdc++-v3/config/config/os/newlib echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ ...to XGCC_SRC... echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ cp -r gcc-3.3.3-truemingw $XGCC_SRC echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ ...and WINGCC_SRC. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ mv gcc-3.3.3-truemingw $WINGCC_SRC echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Extracting binutils... echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tar xf binutils-2.15.90-20040222-1-src.tar echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ ...to BU_SRC. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ mv binutils-2.15.90-20040222-1 $BU_SRC echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Frobbing permissions. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ chmod 700 $BU_SRC/configure $XGCC_SRC/configure $WINGCC_SRC/configure echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Exporting variables. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ export CC=gcc export CXX=g++ export AS=as export LD=ld export AR=ar export BOOT_CFLAGS='-O3 -fomit-frame-pointer -ffast-math' export CFLAGS='-O3 -fomit-frame-pointer -ffast-math' export CXXFLAGS='-O3 -fomit-frame-pointer -ffast-math' export LIBCFLAGS='-O3 -fomit-frame-pointer -ffast-math' export LIBCXXFLAGS='-O3 -fomit-frame-pointer -ffast-math' export LDFLAGS='-s' echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Going into BU_BUILD. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ cd $BU_BUILD echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Configuring binutils. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $BU_SRC/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu \ --target=mingw32 --prefix=$XGCC_DEST --disable-nls --disable-shared \ --disable-debug --enable-threads=win32 echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Making binutils. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Installing binutils. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make install echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Exporting variables. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ export PATH=$XGCC_DEST/bin:$PATH echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Going into XGCC_BUILD. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ cd $XGCC_BUILD echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Configuring xgcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $XGCC_SRC/configure --prefix=$XGCC_DEST --build=i686-pc-linux-gnu \ --host=i686-pc-linux-gnu --target=mingw32 --enable-languages=c,c++ \ --disable-nls --disable-debug --without-newlib --disable-win32-registry \ --disable-shared --enable-threads=win32 --enable-sjlj-exceptions \ --with-gcc --with-gnu-as --with-gnu-ld echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Making xgcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Installing xgcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy make install echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Exporting variables. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy export CC=$XGCC_DEST/bin/mingw32-gcc export CXX=$XGCC_DEST/bin/mingw32-g++ export AS=$XGCC_DEST/bin/mingw32-as export LD=$XGCC_DEST/bin/mingw32-ld export AR=$XGCC_DEST/bin/mingw32-ar export LDFLAGS='-s -Wl,--stack=0x00800000' echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Going into WINGCC_BUILD. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy cd $WINGCC_BUILD echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Configuring wingcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy $WINGCC_SRC/configure --prefix=$WINGCC_DEST --build=i686-pc-linux-gnu \ --host=mingw32 --target=mingw32 --with-as=$AS --with-ld=$LD \ --enable-languages=c,c++ --disable-debug --without-newlib \ --disable-shared --disable-win32-registry --disable-nls \ --enable-threads=win32 --enable-sjlj-exceptions \ --with-gcc --with-gnu-as --with-gnu-ld echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Making wingcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy make echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Installing wingcc. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read dummy make install echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ Finished! The finished compiler now lives in WINGCC_DEST. echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ --- mingw-runtime-3.2.tar and w32api-2.5.tar are tarred binaries produced by myself on MinGW. gcc-3.3.3-truemingw.tar is 3.3.3 gcc and g++ sources from the MinGW website fused together. binutils-2.15.90-20040222-1-src.tar is straight from the MinGW website. 1. I had to insert the hack in the script due to an earlier error. Don't know why that was necessary. 2. I have no clue why the build is failing. I previously used Ranjit Mathew's build scripts before to cross over my current 3.3, but I didn't write down what I did, and I want something reproducible. Can anyone help? Stephan T. Lavavej http://nuwen.net