This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem with Python programs with binary components, who to blame?
- From: Doug Henderson <djndnbvg at gmail dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Sun, 4 Sep 2016 22:49:30 -0600
- Subject: Re: Problem with Python programs with binary components, who to blame?
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On 4 September 2016 at 08:34, Patrick Pief wrote:
> 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
> 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
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.
Doug Henderson, Calgary, Alberta, Canada
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple