* Compiling the latest GDB on cygwin @ 2005-08-16 6:39 Jingzhao Ou 2005-08-16 12:03 ` Dave Korn 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-16 6:39 UTC (permalink / raw) To: insight Dear all, I downloaded the latest Insight source and tried to compile it on cygwin. However, I encountered quite some errors during the compilation process. I wonder if there is any one who has a compilable version of GDB and is willing to share his\her copy of the code. Thanks a lot! Best regards, Jingzhao ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Compiling the latest GDB on cygwin 2005-08-16 6:39 Compiling the latest GDB on cygwin Jingzhao Ou @ 2005-08-16 12:03 ` Dave Korn 2005-08-16 20:48 ` Jingzhao Ou 0 siblings, 1 reply; 11+ messages in thread From: Dave Korn @ 2005-08-16 12:03 UTC (permalink / raw) To: 'Jingzhao Ou', insight ----Original Message---- >From: Jingzhao Ou >Sent: 16 August 2005 07:39 > Dear all, > > I downloaded the latest Insight source and tried to compile it on > cygwin. However, I encountered quite some errors during the > compilation process. I wonder if there is any one who has a compilable > version of GDB and is willing to share his\her copy of the code. > It should build under cygwin already, more-or-less. Which version of the source? What errors? cheers, DaveK -- Can't think of a witty .sigline today.... ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-16 12:03 ` Dave Korn @ 2005-08-16 20:48 ` Jingzhao Ou 2005-08-17 15:48 ` Dave Korn 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-16 20:48 UTC (permalink / raw) To: Dave Korn; +Cc: insight Hi, Dave, I downloaded the following version of Insight from the ftp website: ftp://sources.redhat.com:/pub/insight/snapshots/current/insight-weekly-6.30.50.20050808.tar.bz2 When I tried to compile the source in cygwin on a WinXP box, I got the following error message: gcc -shared -g -O2 -o tcl84.dll -mwin32 -Wl,--out-implib,libtcl84.a regcomp.o regexec.o regfree.o regerror.o tclAlloc.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o tclCompile.o tclDate.o tclEncoding.o tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclLiteral.o tclListObj.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o tclObj.o tclPanic.o tclParse.o tclParseExpr.o tclPipe.o tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o tclResolve.o tclResult.o tclScan.o tclStringObj.o tclStubInit.o tclStubLib.o tclThread.o tclThreadAlloc.o tclThreadJoin.o tclTimer.o tclUtf.o tclUtil.o tclVar.o tclWin32Dll.o tclWinChan.o tclWinConsole.o tclWinSerial.o tclWinError.o tclWinFCmd.o tclWinFile.o tclWinInit.o tclWinLoad.o tclWinMtherr.o tclWinNotify.o tclWinPipe.o tclWinSock.o tclWinThrd.o tclWinTime.o strftime.o strtoll.o strtoull.o tcl.res.o Creating library file: libtcl84.a tclWin32Dll.o: In function `TclpCheckStackSpace': /cygdrive/d/src/tcl/win/tclWin32Dll.c:364: undefined reference to `__except_checkstackspace_handler' tclWinChan.o: In function `Tcl_MakeFileChannel': /cygdrive/d/src/tcl/win/tclWinChan.c:1056: undefined reference to `__except_makefilechannel_handler' tclWinFCmd.o: In function `DoCopyFile': /cygdrive/d/src/tcl/win/tclWinFCmd.c:558: undefined reference to `__except_docopyfile_handler' tclWinFCmd.o: In function `TclpObjRenameFile': /cygdrive/d/src/tcl/win/tclWinFCmd.c:204: undefined reference to `__except_dorenamefile_handler' collect2: ld returned 1 exit status make[2]: *** [tcl84.dll] Error 1 make[2]: Leaving directory `/cygdrive/d/src/tcl/win' make[1]: *** [all] Error 2 make[1]: Leaving directory `/cygdrive/d/src/tcl' make: *** [all-tcl] Error 2 I changed tcl/win/Makefile and undefined "-DHAVE_NO_SEH=1". Then I got errors reporting that "__try" are undefined, etc. I commented out all the "__try" and "__except" and get tcl compiled without further complaints. After that, I still encountered the following errors in the "gdb" directory: libgdb.a(solib.o): In function `solib_address': /cygdrive/d/src/gdb/solib.c:771: multiple definition of `_solib_address' libgdb.a(win32-nat.o):/cygdrive/d/src/gdb/win32-nat.c:728: first defined here libgdb.a(jv-lang.o): In function `free_class_block': /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_parse' /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_error' libgdb.a(f-lang.o): In function `f_emit_char': /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_parse' /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_error' libgdb.a(cp-support.o): In function `cp_canonicalize_string': /cygdrive/d/src/gdb/cp-support.c:90: undefined reference to `_cp_demangled_name_to_comp ' /cygdrive/d/src/gdb/cp-support.c:94: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `mangled_name_to_comp': /cygdrive/d/src/gdb/cp-support.c:133: undefined reference to `_cp_demangled_name_to_com p' libgdb.a(cp-support.o): In function `cp_class_name_from_physname': /cygdrive/d/src/gdb/cp-support.c:223: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `method_name_from_physname': /cygdrive/d/src/gdb/cp-support.c:309: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `cp_func_name': /cygdrive/d/src/gdb/cp-support.c:331: undefined reference to `_cp_demangled_name_to_com p' /cygdrive/d/src/gdb/cp-support.c:339: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `overload_list_add_symbol': /cygdrive/d/src/gdb/cp-support.c:360: undefined reference to `_cp_demangled_name_to_com p' /cygdrive/d/src/gdb/cp-support.c:384: undefined reference to `_cp_comp_to_string' libgdb.a(scm-lang.o): In function `scm_printstr': /cygdrive/d/src/gdb/scm-lang.c:56: undefined reference to `_c_error' libgdb.a(p-lang.o): In function `is_pascal_string_type': /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_parse' /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_error' libgdb.a(m2-lang.o): In function `m2_emit_char': /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_parse' /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_error' libgdb.a(objc-lang.o): In function `lookup_struct_typedef': /cygdrive/d/src/gdb/objc-lang.c:99: undefined reference to `_objc_parse' /cygdrive/d/src/gdb/objc-lang.c:102: undefined reference to `_objc_error' libgdb.a(c-lang.o): In function `c_preprocess_and_parse': /cygdrive/d/src/gdb/c-lang.c:472: undefined reference to `_c_parse' libgdb.a(c-lang.o): In function `c_emit_char': libgdb.a(c-lang.o): In function `c_emit_char': /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' libgdb.a(c-lang.o): In function `c_printchar': /cygdrive/d/src/gdb/c-lang.c:79: undefined reference to `_c_error' libgdb.a(c-lang.o): In function `c_printstr': /cygdrive/d/src/gdb/c-lang.c:132: undefined reference to `_c_error' libgdb.a(ada-lang.o): In function `parse': /cygdrive/d/src/gdb/ada-lang.c:8726: undefined reference to `_ada_parse' libgdb.a(ada-lang.o): In function `grow_vect': /cygdrive/d/src/gdb/ada-lang.c:340: undefined reference to `_ada_error' collect2: ld returned 1 exit status make: *** [gdb.exe] Error 1 I got lost here and don't know how I should proceed. Can any one kindly tell me what I am missing in the compilation process? I am only interested in using gdb to debug C/C++ code. I don't need the Java or Fortran stuffs if they are giving me trouble. Thanks a lot! Best regards, Jingzhao ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Compiling the latest GDB on cygwin 2005-08-16 20:48 ` Jingzhao Ou @ 2005-08-17 15:48 ` Dave Korn 2005-08-17 22:21 ` Jingzhao Ou 0 siblings, 1 reply; 11+ messages in thread From: Dave Korn @ 2005-08-17 15:48 UTC (permalink / raw) To: 'Jingzhao Ou'; +Cc: insight [-- Attachment #1: Type: text/plain, Size: 2844 bytes --] ----Original Message---- >From: Jingzhao Ou >Sent: 16 August 2005 21:49 > Hi, Dave, > > I downloaded the following version of Insight from the ftp website: > > ftp://sources.redhat.com:/pub/insight/snapshots/current/insight-weekly-6.30. 50.20050808.tar.bz2 > > When I tried to compile the source in cygwin on a WinXP box, I got the > following error message: > tclWin32Dll.o: In function `TclpCheckStackSpace': > /cygdrive/d/src/tcl/win/tclWin32Dll.c:364: undefined reference to > `__except_checkstackspace_handler' [ ... snip several similar ... ] > collect2: ld returned 1 exit status > I changed tcl/win/Makefile and undefined "-DHAVE_NO_SEH=1". Then I got > errors reporting that "__try" are undefined, etc. I commented out all > the "__try" and "__except" and get tcl compiled without further > complaints. This is a known problem, but the solution isn't to change the HAVE_NO_SEH flag. The functions are being compiled but they're only referenced from asm (...) statements and the optimiser thinks they're unused. (The optimiser has become more aggressive in more recent versions of gcc, which is why this problem didn't show up before; it's only started happening recently because cygwin went from a 3.3.x series compiler to a 3.4.x series compiler a few months back). It's fixed in CVS, or you could apply the patch at http://sourceware.org/ml/insight/2005-q3/msg00021.html > After that, I still encountered the following errors in the "gdb" > directory: > > libgdb.a(solib.o): In function `solib_address': > /cygdrive/d/src/gdb/solib.c:771: multiple definition of `_solib_address' > libgdb.a(win32-nat.o):/cygdrive/d/src/gdb/win32-nat.c:728: first defined > here Ah, this is a new one on me too. It seems that the win32 native version of solib_address is now clashing with the generic version from solib.c; I don't know why this shouldn't have always been the case, perhaps the visibility of one of the symbols has changed recently, maybe it's a side-effect of some of the multi-arch work. ISTM that the correct thing to do is use the win32 native version of the functions, which seems to override the generic solib functionality with dll-related functionality. Which makes sense. > I got lost here and don't know how I should proceed. Can any one kindly > tell me what I am missing in the compilation process? I am only > interested in using gdb to debug C/C++ code. I don't need the Java or > Fortran stuffs if they are giving me trouble. You're doing fine so far. Attached is my current patchset; this fixes both problems and results in a working gdb, but I've not looked to thoroughly at it for correctness. Apply it to the snapshout you're working with and have another go, and let me know if it works/doesn't work for you. cheers, DaveK -- Can't think of a witty .sigline today.... [-- Attachment #2: gdb-cygwin-patches.diff --] [-- Type: application/octet-stream, Size: 6576 bytes --] Index: gdb/win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.112 diff -p -u -r1.112 win32-nat.c --- gdb/win32-nat.c 6 Jul 2005 14:54:34 -0000 1.112 +++ gdb/win32-nat.c 17 Aug 2005 15:21:12 -0000 @@ -724,7 +724,7 @@ handle_unload_dll (void *dummy) } char * -solib_address (CORE_ADDR address) +win32_nat_solib_address (CORE_ADDR address) { struct so_stuff *so; for (so = &solib_start; so->next != NULL; so = so->next) @@ -735,14 +735,14 @@ solib_address (CORE_ADDR address) /* Return name of last loaded DLL. */ char * -child_solib_loaded_library_pathname (int pid) +win32_nat_child_solib_loaded_library_pathname (int pid) { return !solib_end || !solib_end->name[0] ? NULL : solib_end->name; } /* Clear list of loaded DLLs. */ void -child_clear_solibs (void) +win32_nat_child_clear_solibs (void) { struct so_stuff *so, *so1 = solib_start.next; @@ -868,7 +868,7 @@ solib_symbols_add (char *name, int from_ /* Load DLL symbol info. */ void -dll_symbol_command (char *args, int from_tty) +win32_nat_dll_symbol_command (char *args, int from_tty) { int n; dont_repeat (); @@ -1453,7 +1453,7 @@ do_initial_child_stuff (DWORD pid) memset (¤t_event, 0, sizeof (current_event)); push_target (&deprecated_child_ops); disable_breakpoints_in_shlibs (1); - child_clear_solibs (); + win32_nat_child_clear_solibs (); clear_proceed_status (); init_wait_for_inferior (); @@ -2129,7 +2129,7 @@ _initialize_win32_nat (void) init_child_ops (); - c = add_com ("dll-symbols", class_files, dll_symbol_command, + c = add_com ("dll-symbols", class_files, win32_nat_dll_symbol_command, _("Load dll library symbols from FILE.")); set_cmd_completer (c, filename_completer); @@ -2429,14 +2429,14 @@ out: } void -child_solib_add (char *filename, int from_tty, struct target_ops *target, +win32_nat_child_solib_add (char *filename, int from_tty, struct target_ops *target, int readsyms) { if (!readsyms) return; if (core_bfd) { - child_clear_solibs (); + win32_nat_child_clear_solibs (); bfd_map_over_sections (core_bfd, &core_section_load_dll_symbols, target); } else Index: gdb/config/i386/tm-cygwin.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/tm-cygwin.h,v retrieving revision 1.18 diff -p -u -r1.18 tm-cygwin.h --- gdb/config/i386/tm-cygwin.h 6 Apr 2004 01:53:51 -0000 1.18 +++ gdb/config/i386/tm-cygwin.h 17 Aug 2005 15:21:12 -0000 @@ -21,16 +21,16 @@ Boston, MA 02111-1307, USA. */ #define ATTACH_NO_WAIT -#define SOLIB_ADD(filename, from_tty, targ, readsyms) child_solib_add(filename, from_tty, targ, readsyms) -#define PC_SOLIB(addr) solib_address (addr) -#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) child_solib_loaded_library_pathname(pid) -#define CLEAR_SOLIB child_clear_solibs -#define ADD_SHARED_SYMBOL_FILES dll_symbol_command +#define SOLIB_ADD(filename, from_tty, targ, readsyms) win32_nat_child_solib_add(filename, from_tty, targ, readsyms) +#define PC_SOLIB(addr) win32_nat_solib_address (addr) +#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) win32_nat_child_solib_loaded_library_pathname(pid) +#define CLEAR_SOLIB win32_nat_child_clear_solibs +#define ADD_SHARED_SYMBOL_FILES win32_nat_dll_symbol_command struct target_ops; char *cygwin_pid_to_str (ptid_t ptid); -void child_solib_add (char *, int, struct target_ops *, int); -char *solib_address (CORE_ADDR); -char *child_solib_loaded_library_pathname(int); -void child_clear_solibs (void); -void dll_symbol_command (char *, int); +void win32_nat_child_solib_add (char *, int, struct target_ops *, int); +char *win32_nat_solib_address (CORE_ADDR); +char *win32_nat_child_solib_loaded_library_pathname(int); +void win32_nat_child_clear_solibs (void); +void win32_nat_dll_symbol_command (char *, int); Index: tcl/win/tclWin32Dll.c =================================================================== RCS file: /cvs/src/src/tcl/win/tclWin32Dll.c,v retrieving revision 1.9 diff -p -u -r1.9 tclWin32Dll.c --- tcl/win/tclWin32Dll.c 21 Jan 2003 19:40:22 -0000 1.9 +++ tcl/win/tclWin32Dll.c 17 Aug 2005 15:21:16 -0000 @@ -38,8 +38,8 @@ static HINSTANCE hInstance; /* HINSTANCE static int platformId; /* Running under NT, or 95/98? */ #ifdef HAVE_NO_SEH -static void *ESP; -static void *EBP; +static void *ESP __attribute__ ((used)); +static void *EBP __attribute__ ((used)); #endif /* HAVE_NO_SEH */ /* @@ -393,7 +393,7 @@ TclpCheckStackSpace() } #ifdef HAVE_NO_SEH static -__attribute__ ((cdecl)) +__attribute__ ((cdecl)) __attribute__ ((used)) EXCEPTION_DISPOSITION _except_checkstackspace_handler( struct _EXCEPTION_RECORD *ExceptionRecord, Index: tcl/win/tclWinChan.c =================================================================== RCS file: /cvs/src/src/tcl/win/tclWinChan.c,v retrieving revision 1.5 diff -p -u -r1.5 tclWinChan.c --- tcl/win/tclWinChan.c 21 Jan 2003 19:40:22 -0000 1.5 +++ tcl/win/tclWinChan.c 17 Aug 2005 15:21:18 -0000 @@ -122,8 +122,8 @@ static Tcl_ChannelType fileChannelType = }; #ifdef HAVE_NO_SEH -static void *ESP; -static void *EBP; +static void *ESP __attribute__ ((used)); +static void *EBP __attribute__ ((used)); #endif /* HAVE_NO_SEH */ \f @@ -1106,7 +1106,7 @@ Tcl_MakeFileChannel(rawHandle, mode) } #ifdef HAVE_NO_SEH static -__attribute__ ((cdecl)) +__attribute__ ((cdecl)) __attribute__ ((used)) EXCEPTION_DISPOSITION _except_makefilechannel_handler( struct _EXCEPTION_RECORD *ExceptionRecord, Index: tcl/win/tclWinFCmd.c =================================================================== RCS file: /cvs/src/src/tcl/win/tclWinFCmd.c,v retrieving revision 1.6 diff -p -u -r1.6 tclWinFCmd.c --- tcl/win/tclWinFCmd.c 7 Feb 2003 19:52:00 -0000 1.6 +++ tcl/win/tclWinFCmd.c 17 Aug 2005 15:21:19 -0000 @@ -469,7 +469,7 @@ DoRenameFile( } #ifdef HAVE_NO_SEH static -__attribute__ ((cdecl)) +__attribute__ ((cdecl)) __attribute__ ((used)) EXCEPTION_DISPOSITION _except_dorenamefile_handler( struct _EXCEPTION_RECORD *ExceptionRecord, @@ -651,7 +651,7 @@ DoCopyFile( } #ifdef HAVE_NO_SEH static -__attribute__ ((cdecl)) +__attribute__ ((cdecl)) __attribute__ ((used)) EXCEPTION_DISPOSITION _except_docopyfile_handler( struct _EXCEPTION_RECORD *ExceptionRecord, ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-17 15:48 ` Dave Korn @ 2005-08-17 22:21 ` Jingzhao Ou 2005-08-17 23:34 ` Jingzhao Ou 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-17 22:21 UTC (permalink / raw) To: Dave Korn; +Cc: insight Hi, Dave, Thanks a lot for your patch. It does resolve the two problem I reported in the previous email. However, I encountered new problems. Please see the new error message at the end of this email. I check out the source code under the gdb directory. It seems that the undefined symbols, such as "_java_parse" are actually defined in the *.y files. For example, I found the following using grep: jv-exp.y:61:#define yyparse java_parse "yacc" is actually installed. See ================================ $ yacc -V bison (GNU Bison) 1.875b Written by Robert Corbett and Richard Stallman. Copyright (C) 2003 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. ================================ Am I still missing any thing? Would you please kindly give me some more clues/helps? I feel that I am very close this time. Thanks a lot! Best regards, Jingzhao ==================================================== rm -f gdb.exe gcc -g -O2 -Wl,--subsystem,console \ -o gdb.exe gdb.o libgdb.a \ ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libgui/src/libgui.a -L/cygdrive/d/src/itcl/itcl -litcl32 -L/cygdrive/d/src/itcl/itk -litk32 -L/cygdrive/d/src/tk/win -ltk84 -L/cygdrive/d/src/tcl/win -ltcl84 -lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -ltermcap -lm -liconv ../libiberty/libiberty.a -luser32 -limagehlp -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 libgdb.a(jv-lang.o): In function `free_class_block': /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_parse' /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_error' libgdb.a(f-lang.o): In function `f_emit_char': /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_parse' /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_error' libgdb.a(cp-support.o): In function `cp_canonicalize_string': /cygdrive/d/src/gdb/cp-support.c:90: undefined reference to `_cp_demangled_name_to_comp' /cygdrive/d/src/gdb/cp-support.c:94: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `mangled_name_to_comp': /cygdrive/d/src/gdb/cp-support.c:133: undefined reference to `_cp_demangled_name_to_comp' libgdb.a(cp-support.o): In function `cp_class_name_from_physname': /cygdrive/d/src/gdb/cp-support.c:223: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `method_name_from_physname': /cygdrive/d/src/gdb/cp-support.c:309: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `cp_func_name': /cygdrive/d/src/gdb/cp-support.c:331: undefined reference to `_cp_demangled_name_to_comp' /cygdrive/d/src/gdb/cp-support.c:339: undefined reference to `_cp_comp_to_string' libgdb.a(cp-support.o): In function `overload_list_add_symbol': /cygdrive/d/src/gdb/cp-support.c:360: undefined reference to `_cp_demangled_name_to_comp' /cygdrive/d/src/gdb/cp-support.c:384: undefined reference to `_cp_comp_to_string' libgdb.a(scm-lang.o): In function `scm_printstr': /cygdrive/d/src/gdb/scm-lang.c:56: undefined reference to `_c_error' libgdb.a(p-lang.o): In function `is_pascal_string_type': /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_parse' /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_error' libgdb.a(m2-lang.o): In function `m2_emit_char': /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_parse' /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_error' libgdb.a(objc-lang.o): In function `lookup_struct_typedef': /cygdrive/d/src/gdb/objc-lang.c:99: undefined reference to `_objc_parse' /cygdrive/d/src/gdb/objc-lang.c:102: undefined reference to `_objc_error' libgdb.a(c-lang.o): In function `c_preprocess_and_parse': /cygdrive/d/src/gdb/c-lang.c:472: undefined reference to `_c_parse' libgdb.a(c-lang.o): In function `c_emit_char': /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' libgdb.a(c-lang.o): In function `c_printchar': /cygdrive/d/src/gdb/c-lang.c:79: undefined reference to `_c_error' libgdb.a(c-lang.o): In function `c_printstr': /cygdrive/d/src/gdb/c-lang.c:132: undefined reference to `_c_error' libgdb.a(ada-lang.o): In function `parse': /cygdrive/d/src/gdb/ada-lang.c:8726: undefined reference to `_ada_parse' libgdb.a(ada-lang.o): In function `grow_vect': /cygdrive/d/src/gdb/ada-lang.c:340: undefined reference to `_ada_error' collect2: ld returned 1 exit status make: *** [gdb.exe] Error 1 ==================================================== ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-17 22:21 ` Jingzhao Ou @ 2005-08-17 23:34 ` Jingzhao Ou 2005-08-17 23:43 ` Keith Seitz 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-17 23:34 UTC (permalink / raw) To: Dave Korn; +Cc: insight Hi, Dave, I got GDB compiled successfully! The problems for the undefined symbols are because I do not have yacc installed the first time I tried to compile GDB. I removed all the source files, make sure that yacc is installed, and compiled from the scratch. Then, things work properly from there. However, I would suggest the "configure" script be improved to detect "yacc" properly. It is kind of tricky for the current version. I want to make some contribution. Currently, Insight ships with its own version of tcl/tk. Also, it still relies on libgui. Could you comment on the possibilities and the amount of work required if I want Insight to build based on the official tcl/tk and to remove its dependence of libgui? Thanks a lot for your wonderful help! Best regards, Jingzhao On 8/17/05, Jingzhao Ou <jingzhao.ou@gmail.com> wrote: > Hi, Dave, > > Thanks a lot for your patch. It does resolve the two problem I > reported in the previous email. However, I encountered new problems. > Please see the new error message at the end of this email. > > I check out the source code under the gdb directory. It seems that the > undefined symbols, such as "_java_parse" are actually defined in the > *.y files. For example, I found the following using grep: > > jv-exp.y:61:#define yyparse java_parse > > "yacc" is actually installed. See > > ================================ > $ yacc -V > bison (GNU Bison) 1.875b > Written by Robert Corbett and Richard Stallman. > > Copyright (C) 2003 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. > ================================ > > Am I still missing any thing? Would you please kindly give me some > more clues/helps? I feel that I am very close this time. > > Thanks a lot! > > Best regards, > Jingzhao > > ==================================================== > rm -f gdb.exe > gcc -g -O2 -Wl,--subsystem,console \ > -o gdb.exe gdb.o libgdb.a \ > ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a > ../libiberty/libiberty.a ../libgui/src/libgui.a > -L/cygdrive/d/src/itcl/itcl -litcl32 -L/cygdrive/d/src/itcl/itk > -litk32 -L/cygdrive/d/src/tk/win -ltk84 -L/cygdrive/d/src/tcl/win > -ltcl84 -lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -ltermcap > -lm -liconv ../libiberty/libiberty.a -luser32 -limagehlp -lshell32 > -lgdi32 -lcomdlg32 -ladvapi32 > libgdb.a(jv-lang.o): In function `free_class_block': > /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_parse' > /cygdrive/d/src/gdb/jv-lang.c:165: undefined reference to `_java_error' > libgdb.a(f-lang.o): In function `f_emit_char': > /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_parse' > /cygdrive/d/src/gdb/f-lang.c:108: undefined reference to `_f_error' > libgdb.a(cp-support.o): In function `cp_canonicalize_string': > /cygdrive/d/src/gdb/cp-support.c:90: undefined reference to > `_cp_demangled_name_to_comp' > /cygdrive/d/src/gdb/cp-support.c:94: undefined reference to `_cp_comp_to_string' > libgdb.a(cp-support.o): In function `mangled_name_to_comp': > /cygdrive/d/src/gdb/cp-support.c:133: undefined reference to > `_cp_demangled_name_to_comp' > libgdb.a(cp-support.o): In function `cp_class_name_from_physname': > /cygdrive/d/src/gdb/cp-support.c:223: undefined reference to > `_cp_comp_to_string' > libgdb.a(cp-support.o): In function `method_name_from_physname': > /cygdrive/d/src/gdb/cp-support.c:309: undefined reference to > `_cp_comp_to_string' > libgdb.a(cp-support.o): In function `cp_func_name': > /cygdrive/d/src/gdb/cp-support.c:331: undefined reference to > `_cp_demangled_name_to_comp' > /cygdrive/d/src/gdb/cp-support.c:339: undefined reference to > `_cp_comp_to_string' > libgdb.a(cp-support.o): In function `overload_list_add_symbol': > /cygdrive/d/src/gdb/cp-support.c:360: undefined reference to > `_cp_demangled_name_to_comp' > /cygdrive/d/src/gdb/cp-support.c:384: undefined reference to > `_cp_comp_to_string' > libgdb.a(scm-lang.o): In function `scm_printstr': > /cygdrive/d/src/gdb/scm-lang.c:56: undefined reference to `_c_error' > libgdb.a(p-lang.o): In function `is_pascal_string_type': > /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_parse' > /cygdrive/d/src/gdb/p-lang.c:76: undefined reference to `_pascal_error' > libgdb.a(m2-lang.o): In function `m2_emit_char': > /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_parse' > /cygdrive/d/src/gdb/m2-lang.c:53: undefined reference to `_m2_error' > libgdb.a(objc-lang.o): In function `lookup_struct_typedef': > /cygdrive/d/src/gdb/objc-lang.c:99: undefined reference to `_objc_parse' > /cygdrive/d/src/gdb/objc-lang.c:102: undefined reference to `_objc_error' > libgdb.a(c-lang.o): In function `c_preprocess_and_parse': > /cygdrive/d/src/gdb/c-lang.c:472: undefined reference to `_c_parse' > libgdb.a(c-lang.o): In function `c_emit_char': > /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' > /cygdrive/d/src/gdb/c-lang.c:71: undefined reference to `_c_error' > libgdb.a(c-lang.o): In function `c_printchar': > /cygdrive/d/src/gdb/c-lang.c:79: undefined reference to `_c_error' > libgdb.a(c-lang.o): In function `c_printstr': > /cygdrive/d/src/gdb/c-lang.c:132: undefined reference to `_c_error' > libgdb.a(ada-lang.o): In function `parse': > /cygdrive/d/src/gdb/ada-lang.c:8726: undefined reference to `_ada_parse' > libgdb.a(ada-lang.o): In function `grow_vect': > /cygdrive/d/src/gdb/ada-lang.c:340: undefined reference to `_ada_error' > collect2: ld returned 1 exit status > make: *** [gdb.exe] Error 1 > ==================================================== > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-17 23:34 ` Jingzhao Ou @ 2005-08-17 23:43 ` Keith Seitz 2005-08-18 5:35 ` Jingzhao Ou 0 siblings, 1 reply; 11+ messages in thread From: Keith Seitz @ 2005-08-17 23:43 UTC (permalink / raw) To: Jingzhao Ou; +Cc: insight Jingzhao Ou wrote: > I want to make some contribution. Currently, Insight ships with its > own version of tcl/tk. Also, it still relies on libgui. Could you > comment on the possibilities and the amount of work required if I want > Insight to build based on the official tcl/tk and to remove its > dependence of libgui? We ship insight with standard tcl/tk/itcl. All that is really required is updating the configure scripts to check for a system version and use it instead of the supplied ones. As for libgui, what we need to do is steal whatever we need from that and dump the rest. I haven't a clue how much insight actually uses, but it would be an interesting exercise to figure this out, and see what we can do to stop using whatever remains. I any case, I don't see a compelling reason to dump whatever is in libgui unless someone really has some time on his hands. Insight is currently the only consumer of libgui, and I'm the maintainer, so we can do whatever we want (or don't want with it). Keith ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-17 23:43 ` Keith Seitz @ 2005-08-18 5:35 ` Jingzhao Ou 2005-08-18 17:41 ` Keith Seitz 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-18 5:35 UTC (permalink / raw) To: Keith Seitz; +Cc: insight Dear Keith, First of all, I am a newbie to GDB and am now seeking advice, suggestions and, if possible, discussions. I may ask some very silly questions as a newbie. But please be understanding that I have NO in tension to offend any one on this mailing list. I just want to enjoy the fun and freedom offered by a great piece of open source program. The reason why I raised the libgui question is because I suspect that due to libgui, the compilation of Insight requires the source code of Tcl and Tk. That might be the reason Insight ships with its own version of Tcl/Tk. Maintaining such piece of software along with the standard Tcl/Tk distribution may be quite time consuming. Also, it may complicate the compilation process. I am hoping that there can be a better solution to resolve this problem. For example, if Insight is written based on WxWidget, I think compiling Insight requires the source code of WxWidget, rather than the APIs provided by it, may turn out to be inconvenient for its developers. I am assuming a similar case for Tcl/Tk here. However, as I has mentioned, my thinking can be very silly. Please do NOT hesitate to correct my stupid errors. Finally, wish all of the people on the mailing list have a great day! I am very happy today because I have a working Insight to play with from now on. :-) Best regards, Jingzhao On 8/17/05, Keith Seitz <keiths@redhat.com> wrote: > Jingzhao Ou wrote: > > > I want to make some contribution. Currently, Insight ships with its > > own version of tcl/tk. Also, it still relies on libgui. Could you > > comment on the possibilities and the amount of work required if I want > > Insight to build based on the official tcl/tk and to remove its > > dependence of libgui? > > We ship insight with standard tcl/tk/itcl. All that is really required > is updating the configure scripts to check for a system version and use > it instead of the supplied ones. > > As for libgui, what we need to do is steal whatever we need from that > and dump the rest. I haven't a clue how much insight actually uses, but > it would be an interesting exercise to figure this out, and see what we > can do to stop using whatever remains. > > I any case, I don't see a compelling reason to dump whatever is in > libgui unless someone really has some time on his hands. Insight is > currently the only consumer of libgui, and I'm the maintainer, so we can > do whatever we want (or don't want with it). > > Keith ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-18 5:35 ` Jingzhao Ou @ 2005-08-18 17:41 ` Keith Seitz 2005-08-18 18:04 ` Jingzhao Ou 0 siblings, 1 reply; 11+ messages in thread From: Keith Seitz @ 2005-08-18 17:41 UTC (permalink / raw) To: Jingzhao Ou; +Cc: insight Jingzhao Ou wrote: > First of all, I am a newbie to GDB and am now seeking advice, > suggestions and, if possible, discussions. I may ask some very silly > questions as a newbie. But please be understanding that I have NO in > tension to offend any one on this mailing list. I just want to enjoy > the fun and freedom offered by a great piece of open source program. No offense taken -- and I certainly hope that my reply didn't come off that way, either. Anyway, we all agree not to be offended, so let's move on! :-) > The reason why I raised the libgui question is because I suspect that > due to libgui, the compilation of Insight requires the source code of > Tcl and Tk. That might be the reason Insight ships with its own > version of Tcl/Tk. libgui only requires the Tcl/Tk headers and library -- no source files. The reason insight ships with its own version of Tcl and Tk (and Itcl/Iwidgets) is largely arcane. Back many, many years ago, Tcl/Tk didn't do a few of the things we wanted, so we hacked it to do it. Of course, it was a big mistake, and insight has been dragging it around ever since. However, a year or two (or three) ago, all that changed. The standard Tcl/Tk/Itcl sources were imported, removing our dependency on a non-standard/hacked Tcl/Tk. As a result, we should be able to move away from the built-in versions to standard, net-released versions. To the best of my understanding, libgui should not interfere with this goal. The big thing to try is to hack the configure scripts for libgui, gdb, and gdb/gdbtk and see how painful this transistion will be. I admit, I have been hesitant to do it (or any insight work for that matter): I believe insight has outlived its usefulness, and most people are moving onto other gdb front-ends. Keith ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Compiling the latest GDB on cygwin 2005-08-18 17:41 ` Keith Seitz @ 2005-08-18 18:04 ` Jingzhao Ou 2005-08-19 9:22 ` Dave Korn 0 siblings, 1 reply; 11+ messages in thread From: Jingzhao Ou @ 2005-08-18 18:04 UTC (permalink / raw) To: Keith Seitz; +Cc: insight Dear Keith, Thanks a lot for your information. I will be looking at the source code carefully recently and see how much I can be of help. Regarding the usefulness of Insight, there is some good news. The Embedded Development Kit (EDK) from Xilinx (the largest company in reconfigurable hardware, http://www.xilinx.com/) uses Insight. I believe quite some researchers and engineers in the reconfigurable computing area are using Insight for embedded system development. Also, if you know about ModelSim from Mentor Graphics (http://www.model.com/), you will see that Tcl/Tk is very important in the EDA (Electronic Design Automation) world. Based on Tcl/Tk, I believe that Insight makes a lot of sense in EDA. For example, it is very suitable for tool integration issues. Best regards, Jingzhao Keith Seitz wrote: > The big thing to try is to hack the configure scripts for libgui, gdb, > and gdb/gdbtk and see how painful this transistion will be. I admit, I > have been hesitant to do it (or any insight work for that matter): I > believe insight has outlived its usefulness, and most people are moving > onto other gdb front-ends. > > Keith > ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Compiling the latest GDB on cygwin 2005-08-18 18:04 ` Jingzhao Ou @ 2005-08-19 9:22 ` Dave Korn 0 siblings, 0 replies; 11+ messages in thread From: Dave Korn @ 2005-08-19 9:22 UTC (permalink / raw) To: 'Jingzhao Ou', 'Keith Seitz'; +Cc: insight ----Original Message---- >From: Jingzhao Ou >Sent: 18 August 2005 19:04 > Keith Seitz wrote: >> I >> believe insight has outlived its usefulness, and most people are moving >> onto other gdb front-ends. > Regarding the usefulness of Insight, there is some good news. The > Embedded Development Kit (EDK) from Xilinx (the largest company in > reconfigurable hardware, http://www.xilinx.com/) uses Insight. I believe > quite some researchers and engineers in the reconfigurable computing > area are using Insight for embedded system development. > > Also, if you know about ModelSim from Mentor Graphics > (http://www.model.com/), you will see that Tcl/Tk is very important in > the EDA (Electronic Design Automation) world. Based on Tcl/Tk, I believe > that Insight makes a lot of sense in EDA. For example, it is very > suitable for tool integration issues. Let me second that! I quite *like* the insight gui, and we also use modelsim tcl/tk at my workplace! cheers, DaveK -- Can't think of a witty .sigline today.... ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-08-19 9:22 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-08-16 6:39 Compiling the latest GDB on cygwin Jingzhao Ou 2005-08-16 12:03 ` Dave Korn 2005-08-16 20:48 ` Jingzhao Ou 2005-08-17 15:48 ` Dave Korn 2005-08-17 22:21 ` Jingzhao Ou 2005-08-17 23:34 ` Jingzhao Ou 2005-08-17 23:43 ` Keith Seitz 2005-08-18 5:35 ` Jingzhao Ou 2005-08-18 17:41 ` Keith Seitz 2005-08-18 18:04 ` Jingzhao Ou 2005-08-19 9:22 ` Dave Korn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).