Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 To: Peter Bienstman 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 , nhv AT cape DOT com, cygwin AT cygwin DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/