From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6457 invoked by alias); 11 Apr 2011 17:45:07 -0000 Received: (qmail 6438 invoked by uid 22791); 11 Apr 2011 17:45:05 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GJ,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yx0-f171.google.com (HELO mail-yx0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Apr 2011 17:45:00 +0000 Received: by yxe42 with SMTP id 42so2785604yxe.2 for ; Mon, 11 Apr 2011 10:45:00 -0700 (PDT) Received: by 10.101.166.40 with SMTP id t40mr3692466ano.118.1302543900074; Mon, 11 Apr 2011 10:45:00 -0700 (PDT) Received: from [10.10.3.200] (nat-cc-inf.campus.utfsm.cl [200.1.20.190]) by mx.google.com with ESMTPS id d36sm4778639and.4.2011.04.11.10.44.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Apr 2011 10:44:58 -0700 (PDT) Message-ID: <4DA33E17.504@gmail.com> Date: Tue, 12 Apr 2011 07:52:00 -0000 From: Tomas Staig User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Windows7 STATUS_ACCESS_VIOLATION and gcc/g++ linking problems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-04/txt/msg00149.txt.bz2 Dear all, we have successfully ported an application framework (based on CORBA) to Windows using Cygwin last year. This porting works properly under Windows XP, but we ran into some problems when we tried to use it under Windows 7 (32-bits) not long ago. While compiling ACE/TAO (Initial parts of the compilation work ok), at some point it tries to execute the (compiled during the process) IDL compiler tao_idl.exe, which randomly (more often than not) ends up in an STATUS_ACCESS_VIOLATION message and, some of these times with an additional comment saying "preprocessor 'g++' returned with an error" which crashes the application. After this I ran tao_idl.exe by hand, receiving the same outcome. First I'll state that this is most probably not BLODA (unless some default program that comes with W7 provokes it), since I started with a fresh W7 installation made by myself on which I only installed Java JDK and Cygwin along with some of its packages. I've been looking around and found several supposed workaraounds to this issue: 1.- peflags --tsaware=true app_name.exe 2.- Disable DEP (Data Execution Prevention) 3.- rebaseall -v 4.- rebaseall -v -T list_of_compiled_dlls From this list only the last solution worked for me, but it is very uncomfortable to have to run this in the middle of a compilation process, since, first of all, we need to stop all the cygwin processes. For ACE/TAO for example this would mean to compile it by sections, maybe rebasing after each set of DLLs. This would require, for instance, a batch (.bat or other windows based) script and several bash scripts to be called by it. The thing is that later, when compiling Python (we use a specific version), a similar problem appeared (STATUS_ACCESS_VIOLATION messages that finish with a "fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 8800, errno 11", "error: Resource temporarily unavailable") when linking using gcc. Also I would think that the problem is gcc/g++ related due to both problems comming from it, but in this scenario I can't understand at the moment why the problem appears only when linking some libs and not others and why is it solved when using rebaseall providing the list of DLLs created during compilation time as opposed to doing this with the system DLLs only. Considering that the framework has a high number of modules(sets of libs and executables) I find a problem having to rebaseall after the compilation of each one. We use gcc/g++ version (GCC) 4.3.4 20090804 (release) 1 I have three questions that you might ignore if there is an answer for the underlying problem. 1.- For the external applications such as ACE/TAO or Python. What can we do to avoid running in the aformentioned problem without having to rebase in the middle of the compilation process? Looking at the linker flags of both ACE/TAO and Python, they already use the -Wl,--enable-auto-image-base linker flag. 2.- Is it enough for the DLLs if they are compiled using the -Wl,--enable-auto-image-base linker flag? From the outcome I see from ACE/TAO and Python it seems that it isn't enough. What else can we do? 3.- I know that WXP and W7 are very different, but is there something specific that causes these problem on W7 and not on WXP? I've been using Cygwin on WXP for some time and never had to rebase at all. I prefered to leave out the snippets of code and errors to keep the mail relatively short. If you want to have a look at any of them or want me to show the output of a specific command, please let me know. I appreciate your time reading this post and thank in advance any help or comment that you might share. Best regards, Tomás Staig. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple