This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What to include when creating a distribution using cygwin?


Earnie Boyd <earnie_boyd@yahoo.com> writes:
> > To simulate this, I copied these four files into the same directory as the
> > executable, and ran it. Unfortunately this causes "invalid page fault in
> > module <unknown> at 0000:cc267bb8. Running it under gdb is slightly more
> > illuminating - I include the output with backtrace below. It all seems to
> > fall over in something called from cygwin_crt0 somewhere.
> > 
> > What am I missing?
> 
> Firstly, you can't have more than one copy of the cygwin dll in the
> executable path.  Multiple instances of the dll can cause this problem.

Ah - OK. I've experimented with this however (setting 'export PATH=.' for
example), and still had the same problem. :(.

> Secondly, I wouldn't be distributing the kernel32.dll as it could lead
> you down the road to a law suit.  Besides, every win32 system comes with
> it's own kernel32.dll as it is the core of Win32.

Thanks - actually I only copied three of the files into the directory, not
kernel32 as I guessed as much.

> Is there some reason to still be with the b19 distribution?  It is a bit old
> now and a lot of bugs fixed and new enhancements with b20 and b21 is looming
> around the corner.

I used the B19 initially because I was initially replicating the work of a
colleague who used this version. I've upgraded to B20 and tried that
today. Unfortunately this causes more problems.

I now get a SIGSEGV somewhere in my code when it runs (actually in a
"schedule_parents_of" function). However, gdb seems unable to tell me where
in the function it failed, and is also unable to single step into the
function, displaying the source lines. I don't understand this as all the
code has been compiled (and linked) with -g. The gdb output is included
below - both the change and schedule_parents_of functions are from my code,
but the reference back to the source code is missing.

Under B19 I was able to compile and run, and had problems with packaging
the thing for use on other peoples PCs without the full cygwin
environment. Now under B20 (with the same source code) it will not run, and
debugging is made hard by this problem with gdb.

Thanks for the help - does anybody know 1) which files to include and where
to put them in a package for distributing software using cygwin, Tcl and Tk
to a more "virgin" PC? or 2) what might be causing gdb to loose debugging
symbols in some parts of gcc-compiled software?

Gdb output follows: -------------------------------------------------------

BASH.EXE-2.02$ gdb --nw tkeden.exe
GNU gdb 4.17.1
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-cygwin32"...
(gdb) run
Starting program: /Ash/PhD/Tkeden/pctkeden/tkeden.exe
7fce0000:/WINDOWS/SYSTEM/SHELL32.DLL
bfb70000:/WINDOWS/SYSTEM/COMCTL32.DLL
70bd0000:/WINDOWS/SYSTEM/SHLWAPI.DLL

[failed reading symbols from DLL]
"/WINDOWS/SYSTEM/COMDLG32.DLL": error reading line numbers

66300000:/CYGNUS/CYGWIN-B20/H-I586-CYGWIN32/BIN/CYGTK80.DLL
bff20000:/WINDOWS/SYSTEM/GDI32.DLL
bff50000:/WINDOWS/SYSTEM/USER32.DLL
bff70000:/WINDOWS/SYSTEM/KERNEL32.DLL
bfea0000:/WINDOWS/SYSTEM/ADVAPI32.DLL
61000000:/CYGNUS/CYGWIN-B20/H-I586-CYGWIN32/BIN/CYGWIN1.DLL
66000000:/CYGNUS/CYGWIN-B20/H-I586-CYGWIN32/BIN/CYGTCL80.DLL
DoNaLD init file is - /Ash/PhD/Tkeden/lib/tkeden/donald.init.e.

Program received signal SIGSEGV, Segmentation fault.
0x414202 in schedule_parents_of ()
(gdb) bt
#0  0x414202 in schedule_parents_of ()
#1  0x41440d in change ()
#2  0x412341 in assign () at machine.c:876
#3  0x403ab0 in execute (p=0x443370) at code.c:131
#4  0x401b09 in run (type=1, ptr=0x2740974,
    name=0x42681c "/lib/tkeden/donald.init.e") at main.c:576
#5  0x426967 in init_donald () at dd_lex.c:842
#6  0x401df1 in main (argc=1, argv=0x2740ad8) at main.c:710
#7  0x61004402 in _size_of_stack_reserve__ ()
#8  0x61004420 in _size_of_stack_reserve__ ()
#9  0x436dfa in cygwin_crt0 (f=0x401d34 <main>)
    at /home/noer/src/b20/comp-tools/devo/winsup/libccrt0.cc:81
(gdb)

Gdb output ends: -------------------------------------------------------

Many thanks.

Ash.

-- 
         Ashley Ward - Graduate Teaching Assistant - PhD year 1
    ashley@dcs.warwick.ac.uk - http://www.dcs.warwick.ac.uk/~ashley/
Room 102, Department of Computer Science, University of Warwick, Coventry

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]