delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/07/16:33:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 7 Aug 2001 16:32:59 -0400
From: Jason Tishler <jason AT tishler DOT net>
To: Peter Bienstman <Peter DOT Bienstman AT rug DOT ac DOT be>
Cc: nhv AT cape DOT com, cygwin AT cygwin DOT com
Subject: Re: building Python extension modules - crash on import
Message-ID: <20010807163259.D576@dothill.com>
Mail-Followup-To: Peter Bienstman <Peter DOT Bienstman AT rug DOT ac DOT be>, nhv AT cape DOT com,
cygwin AT cygwin DOT com
Mime-Version: 1.0
In-Reply-To: <001001c11f24$7a67a0e0$0454c19d@intec.rug.ac.be>
User-Agent: Mutt/1.3.18i
Organization: Dot Hill Systems Corp.

Peter,

On Tue, Aug 07, 2001 at 11:36:46AM +0200, Peter Bienstman wrote:
> > BTW, the USE_DL_IMPORT macro, etc. is set automatically if the Cygwin
> > Python extension is built via the Distutils or Misc/Makefile.pre.in
> > method.  My recommendation is to try to use Distutils, if possible,
> > when building Python extensions.
> 
> Actually, now that you bring this up, here are my unsuccessful experiences
> with cygwin python distutils. (Not sure if this is going off-topic here,
> might be better suited for a distutils mailing list.)

You are correct that this is more appropriate for the Distutils list...

> $python setup.py -build --compiler-cygwin
>
> [snip]
> Weird, especially since -L/usr/lib/python2.1/config -lpython2.1 is in the
> command line. Also note that gcc is used rather g++, although the extension
> is cpp. There is also no trace of USE_DL_IMPORT.

One should not specify --compiler=cygwin when building Cygwin Python
extensions.

> Now, if I omit --compiler=cygwin:
> 
> $ python setup.py build
> 
> [snip]
> 
> The macro USE_DL_IMPORT appears, and now the fact that we use gcc for
> linking bites us since it does not link in libstdc++. I'm sure this could
> probably be resolved by including libstdc++ in setup.py, but that's not
> really an out-of-the-box approach.

Sorry, but I'm not a Distutils expert.  Possibly, there is a way to tell
Distutils to using "g++" instead of "gcc"?  Otherwise, you can always
add libstdc++ to your setup.py.  Does your setup.py (without libstdc++)
work on other platforms?

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: jason AT tishler DOT net
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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