building Python extension modules - crash on import

Jason Tishler jason@tishler.net
Tue Aug 7 13:32:00 GMT 2001


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@tishler.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/



More information about the Cygwin mailing list