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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=I6Vsc/RnDk+Na/NvJCUs1rq/EyviwKiMIM3FU1LnPXa
	FrgoLnX6QBViKVdEaD9Roc5fFxkwAGy01gxNuIOpyTYxufwd4oRJloot1b9JVnYt
	KmS3u6CoyKNtVFpyWGQ0Utv5q5KX8psBTpj7rf+zDPnr4loN5/O6NB/HacDjl5Vg
	=
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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type:content-transfer-encoding;
	 s=default; bh=7yB1fpqPzKziUCpMUdpyK1DqR6E=; b=nwhb+LRld6EQVPZRH
	WokAdYfTekFfznNKIRCArrVbwEHltR5OH8cik7oqAuqr4mAxjIfU8RXOfYGuLUCF
	R8wzJ9qFCPrFvFomr7gMBrmoDawXyjCXMG51lbTQPt+vIjk1TdN9FiwiL0frS6Kl
	W1qRVcW8PKI+0rt8FevxTwrEp4=
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=1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=calgary, Calgary, *nix, DLLs
X-HELO: mail-qk0-f182.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:in-reply-to:references:from:date         :message-id:subject:to:content-transfer-encoding;        bh=N1+xIOB27KmDygmHWDJQR8cSEuLiLRY3z0JVflkIUJc=;        b=CB4dYgT+9fw5i3jmeUUlP/7HExjHmSzRhBw9zNH+xEVHKQnJsWkPXp5+TYtAu47CVh         qG3aiIRWsz3Wcf8zUcTUQtSGTpO9gHiWOlJUAXiX3EszOnZCts0T5VcY5vnp8+Tg4WTX         DrxeLT8mo7Knc/ZBN73QsKZj7A5UBXd3nZ/mkYrpr1ABnhI5AVPSjC72y9na4g6fZKBa         B9B5nO/NoxYUTfG8JxSWRxPtTM33PpJ/d4QhsaHB3XtYZbR8KjVL7f+2MXlL/0MIY7fQ         wik/6Kep072DN2UZOPRjUICHLo+Vc4wgLHHl4vMHmjia6zmJwYr8PDKdemVo603Ta5Q6         64PQ==
X-Gm-Message-State: AE9vXwNnzCcYeEQ9lG1UqIDYHnuID2NN4AWbzD/XAyESUM7D8b8Wi3U5pBjHjy3+BcujtnAmFSrIV8HHaoBKRw==
X-Received: by 10.55.200.9 with SMTP id c9mr24219811qkj.241.1473050990848; Sun, 04 Sep 2016 21:49:50 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <156f59f4272.c6a11ec33673.3924353846235894325@zoho.com>
References: <156f59f4272.c6a11ec33673.3924353846235894325@zoho.com>
From: Doug Henderson <djndnbvg@gmail.com>
Date: Sun, 4 Sep 2016 22:49:30 -0600
Message-ID: <CAJ1FpuMokTvt=K2fnn2oYuWVdu6+YgdtqmF1WuxjPVtJE1i4sg@mail.gmail.com>
Subject: Re: Problem with Python programs with binary components, who to blame?
To: cygwin <cygwin@cygwin.com>
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u854oEao005283

On 4 September 2016 at 08:34, Patrick Pief  wrote:
> Hi,
>
> Before writing any formal bug report I thought I might ask first whether the
> problem I am seeing is something that can be even fixed from Cygwin's side.
>
> The issue has to do with the compilation of Python binary packages for Python
> inside Cygwin (Python installed as a Cygwin package as opposed to Python for
> Windows).
> The problem starts to show as gcc warnings: "[…] redeclared without dllimport
> attribute: previous dllimport ignored", and ends with linkers errors such as:
> "relocation truncated to fit [...] against undefined symbol".
>
> I am guessing the problem might actually lie within the Python sources itself
> but I am not entirely sure.
>
> So is this some issue that is even worth further research and filing a bug
> report here?

Often the setup.py for the package will use windows build commands
when trying to build an extension for a python that runs under cygwin.
The setup.py needs to be changed so it uses the build instructions for
a *nix or Posix system to build the extension under cygwin. Typically
these kind of extensions may need to import cygwin DLLs that are
installed by another package. The change may be as simple as adding a
relation to an existing if statement to recognize cygwin as distinct
from windows.

If you have an extension that also needs to load windows DLL files,
you may need to add a section to the setup.py to support that kind of
hybrid situation. An example of this is cx_Oracle, which must use
windows DLL(s) supplied by Oracle. This is often easier t do with the
cooperation of the extension developer.

HTH
Doug

-- 
Doug Henderson, Calgary, Alberta, Canada

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


