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: SIGSEGV in _size_of_stack_reserve__ ()


tjoen@dds.nl writes:
> 
> NT4 SP4 B20.1 egcs-2.91.57
> 
> Attempting to run ace-tests (it compiles and links clean now):
> Program received signal SIGSEGV ... in _size_of_stack_reserve__ ()
> Increasing stacksize results in SIGSEGV in _libwsock32_a_iname()
> 
> The SIGSEGV in _size_of_stack_reserve__ () was only 12 gdb-steps
> from MainCRTStartup
> 
> Compile flags were:
> -fno-implicit-templates -mno-cygwin
> 
> Linked libraries:
> -lc -lg -lcygwin -lmsvcrt -lwsock32
> 
> I guess that my mistake is linking the wrong libraries, but
> other combinations gave unresolved symbols.
> What to do?

Blindly adding libraries without having any understanding of the
implications is not the right approach when porting software (even
worse when implementing it ;-)

You're mixing 3 different runtimes -- Cygwin and MSVC because you've
added both runtime libraries, and CRTDLL because you've added -mno-
cygwin compile flag -- and the fact that you've gotten as far as 
you have shows how lucky you are.

The combination of your compile flags and your libraries make absolutely
no sense whatsoever. I and others have written regarding the issues here 
many times in the past, and I am not going to repeat myself. It's there 
in the mailing list archives.

NEVER mix cygwin and any combination of (msvcrt, wsock32, crtdll). 
NEVER mix cygwin or any other Cygwin library with -mno-cygwin. 

Also, due to unfortunate naming scheme, -lc is NOT to be used for Cygwin
apps. There is no need to explicitly add -lcygwin either.

Regards,
Mumit


--
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]