X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=Pa40Cg5WFZO6kfto
	GlSARHBPBzQJgvZ45sSWSb0lS7hgkbBUM2vY1lEpQxUGXL628PeygRdgaVKLpiZ0
	wSnPreruUBMh00K5c24S2sLPMLguJAO2TTpdZbMSk+A1YUr80EUeEi6nuCHpfbGb
	kWkxnUrnFLulFDRggXuNFLyPRLk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; s=default; bh=LTIy+IvA2sczGUjD9cTYMc
	FYuMg=; b=AQXQ+dTeV7RCTSZV0rwk0BEh5FXz+0TER0Nwfapt5St6Cjo7+NYriG
	xWWgsmSbnQVDYCBOTzvEvVtKVnuZ8Q64jU4Zvn0iD9pDDWG/rI6YEK5KmznVg4/6
	nx+NUe12hOHcTcpS5R/jQlAFRmfWyCnvhm8ibLaEc9QejQqJx+fyA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtp.ht-systems.ru
Date: Thu, 10 Dec 2015 16:14:22 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <685348492.20151210161422@yandex.ru>
To: Martin Landa <landa.martin@gmail.com>, cygwin@cygwin.com
Subject: Re: direct.h
In-Reply-To: <CA+Ei1Oeiiu=qAjzup15C=8f1XR5PAD2CCEDX7wE3afZs41Az6Q@mail.gmail.com>
References: <CA+Ei1OcnP5GHCz3=cHKd9AK71O25F0BgvjGanVJ5VQNpzUEfPQ@mail.gmail.com>   <566886B5.7010008@redhat.com>  <CA+Ei1Oeiiu=qAjzup15C=8f1XR5PAD2CCEDX7wE3afZs41Az6Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Greetings, Martin Landa!

> 2015-12-09 20:53 GMT+01:00 Eric Blake <eblake@redhat.com>:
>> That's because <direct.h> is an old, non-standard header not present on
>> modern POSIX-y machines.  You want <dirent.h> instead, when targetting
>> cygwin.  Or else your project is truly tied to Windows, and you should
>> be targetting mingw, in which case the question is semi-off-topic here
>> (other than how to properly use the mingw cross-compilers available from
>> a cygwin installation).

> the project is Unix-based, I am just trying to create the both 32bit
> and 64bit binaries for Windows users... I modified GDAL lib dependency
> to include dirent.h instead of direct.h. The configure doesn't fails,
> good. Unfortunately several compiled GRASS tools fails to run when
> building:

>       1 [main] g.proj (2604)
> C:\cygwin64\home\landa\grass_trunk\dist.x86_64-w64-mingw32\bin\g.proj.exe:
> *** fatal error - cygheap base mismatch detected -
> 0x180321400/0x901400.
> This problem is probably due to using incompatible versions of the cygwin DLL.
> Search for cygwin1.dll using the Windows Start->Find/Search facility
> and delete all but the most recent version.  The most recent version *should*
> reside in x:\cygwin\bin, where 'x' is the drive on which you have
> installed the cygwin distribution.  Rebooting is also suggested if you
> are unable to find another cygwin DLL.

> I do not have any other cygwin1.dll in path. Other GRASS tools are
> compiled successfully, so the issue is probably related to linked
> libraries or?

Seems like a (sadly) typical issue.
https://cygwin.com/faq.html#faq.using.fixing-fork-failures
Try rebasing your newly built libraries.
If that does not help, see if you can get better results in an isolated
environment (i.e. VM). Overly zealous AV software could interfere with Cygwin
DLL mapping semantics required by POSIX.

>> That depends on whether your code is POSIX-y and targetting cygwin, or
>> is tied to Windows APIs and should be targetting mingw.
>>
>>>
>>> I am also not sure what will be difference between binaries compiled
>>> using cygwin and mingw32-w64 toolchain except of dependencies (like
>>> cygwin1.dll). MinGW32-w64 should produce native windows application,
>>> but what does it mean exactly?
>>
>> A native app doesn't depend on cygwin, but that also means it can't use
>> the POSIX-y interface provided by cygwin.

> OK, thanks for explanation! Martin



-- 
With best regards,
Andrey Repin
Thursday, December 10, 2015 16:11:04

Sorry for my terrible english...


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

