www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/06/23/14:43:48

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199906231730.MAA01075@mercury.xraylith.wisc.edu>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: SIGSEGV in _size_of_stack_reserve__ ()
In-Reply-To: Your message of "Wed, 23 Jun 1999 18:03:01 +0200."
<199906231603 DOT SAA07628 AT localhost DOT localdomain>
Date: Wed, 23 Jun 1999 12:30:06 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

tjoen AT dds DOT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019