Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: "Raoul Gough" Subject: Re: Please help. gcc 3.2.2 configure problem or what? Date: Fri, 28 Mar 2003 21:58:11 -0000 Lines: 145 Message-ID: References: <007801c2f4ae$e65fa570$5510690a AT jhopii400mhz> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT main DOT gmane DOT org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 "Joakim Olsson" wrote in message news:007801c2f4ae$e65fa570$5510690a AT jhopii400mhz... > Hi > > I've tried to configure and build gcc 3.2.2 under cygwin. > > the compiler builds fine but then the problem starts: > > I've tried to build fltk-1.1.3 (a gui toolkit) when I saw the problem. > > It seems that there are several unresolved in my new gcc. > I looked around and found the actual symbols in libgcc.a in the old gcc that > came with cygwin. > > What have I done wrong? > > following are output from linking and gcc -v etc: > > Linking fluid.exe... > /usr/lib/mingw/libsupc++.a(new_op.o)(.text$_Znwj+0x98): undefined reference > to ` > __Unwind_Resume' > /usr/lib/mingw/libsupc++.a(new_opv.o)(.text$_Znaj+0x1b): undefined reference > to > `__Unwind_Resume' > /usr/lib/mingw/libsupc++.a(eh_personality.o)(.text$__cxa_call_unexpect ed+0xe > 8): > undefined reference to `__Unwind_Resume' > /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x1b): undefined > reference to `___w32_sharedptr_unexpected' > /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x25): undefined > reference to `___w32_sharedptr_terminate' > /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x54): undefined > reference to `__Unwind_RaiseException' > /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_rethrow+0x1b): undefined > reference to `__Unwind_RaiseException' > /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt9terminatev+0x7): > undefined reference to `___w32_sharedptr_terminate' > /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt10unexpectedv+0x7 ): > undefined reference to ___w32_sharedptr_unexpected' > /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt13set_terminatePF vvE+0x > 3): undefined reference to `___w32_sharedptr_terminate' > /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt14set_unexpectedP FvvE+0 > x3): undefined reference to `___w32_sharedptr_unexpected' > collect2: ld returned 1 exit status > make[1]: *** [fluid.exe] Error 1 > > > $ gcc -v > Reading specs from > /usr/local/gcc-3.2.2/lib/gcc-lib/i686-pc-cygwin/3.2.2/specs > Configured with: > ../gcc-3.2.2/configure --prefix=/usr/local/gcc-3.2.2 --enable-language s=ada, > c,c++,f77,java,objc > Thread model: single > gcc version 3.2.2 Looks like your link command is mixing libraries from different versions of the compiler (why would i686-pc-cygwin gcc be looking in /usr/lib/mingw - maybe you're using -mno-cygwin and need a newer mingw library?). How about posting the output from your failing link command with a -v option to list the exact commands that gcc is issuing during the link process. Having multiple versions of the compiler installed can be a bit treacherous, and -v will show you exactly what it's doing and where it's looking. > > $ gcc --version > gcc (GCC) 3.2.2 > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > > I also tried to configure and build gcc-mingw-20020817-5 but it allways > fails: > > ./xgcc -B./ -B/usr/local/gcc-mingw-3.2/mingw32/bin/ -isystem > /usr/local/gcc-ming > w-3.2/mingw32/include -isystem > /usr/local/gcc-mingw-3.2/mingw32/sys-include -O2 > -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-p rototype > s -i > system > ./include -I. -I. -I../../gcc-3.2-20020817-1/gcc -I../../gcc-3.2-2002 081 > 7-1/gcc/. -I../../gcc-3.2-20020817-1/gcc/config -I../../gcc-3.2-200208 17-1/g > cc/. > ./include -g0 -finhibit-size-directive -fno-inline-functions -fno-exc eption > s \ > > -c ../../gcc-3.2-20020817-1/gcc/crtstuff.c -DCRT_BEGIN \ > -o crtbegin.o > In file included from tconfig.h:16, > from ../../gcc-3.2-20020817-1/gcc/crtstuff.c:61: > ../../gcc-3.2-20020817-1/gcc/config/i386/cygming.h:31:19: stdio.h: No such > file > or directory > In file included from tconfig.h:16, > from ../../gcc-3.2-20020817-1/gcc/crtstuff.c:61: Are you attempting to use the cygwin compiler to build a mingw compiler? This is a cross-compile and I seem to remember it was pretty hard to get it working this way. I found it much easier to use a native mingw compiler to build gcc 3.2 mingw - from my experience the most important thing is to ensure you know what compiler is being used during the build process. I just renamed all the cygwin compiler binaries to prevent the wrong versions being accessible during the build. -- Raoul Gough see http://home.clara.net/raoulgough/ for my work availability -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/