[Distutils] Help building module on cygwin

Warnes, Gregory R gregory_r_warnes@groton.pfizer.com
Sat Mar 29 16:22:01 2003


Hi, I'm working to port a python module from Unix to Windows under cygwin.
I've made enough changes that there are no compilation errors and the DLLl
file gets built, but python generates an error message when loading it:

$ python
Python 2.2.2 (#1, Mar  9 2003, 08:18:26) 
[GCC 3.2 20020927 (prerelease)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _rpy.dll
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: dlopen: Win32 error 193

I built the package under

$ uname -a
CYGWIN_NT-5.0 GRDGROL780DCZZ 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown
unknown Cygwin

using

$ python setup.py build

running build
running build_py
creating build
creating build/lib.cygwin-1.3.22-i686-2.2
copying rpy.py -> build/lib.cygwin-1.3.22-i686-2.2
copying io.py -> build/lib.cygwin-1.3.22-i686-2.2
running build_ext
building '_rpy' extension
creating build/temp.cygwin-1.3.22-i686-2.2
gcc -DNDEBUG -DUSE_DL_IMPORT -UPRE_2_2 -UWITH_NUMERIC
-IC:/Progra~1/R/rw1062/src/include -I/home/warneg/src/R-1.6.2/src/include
-Isrc -I/usr/include/python2.2 -c src/rpymodule.c -o
build/temp.cygwin-1.3.22-i686-2.2/rpymodule.o
[.. more compilation lines ommitted ..]
gcc -shared -Wl,--enable-auto-image-base
build/temp.cygwin-1.3.22-i686-2.2/rpymodule.o
build/temp.cygwin-1.3.22-i686-2.2/R_eval.o
build/temp.cygwin-1.3.22-i686-2.2/io.o
build/temp.cygwin-1.3.22-i686-2.2/setenv.o -LC:/Progra~1/R/rw1062/bin
-LC:/rpy/bin -L/usr/lib/python2.2/config -lR -lpython2.2 -o
build/lib.cygwin-1.3.22-i686-2.2/_rpy.dll
Info: resolving _R_NilValue by linking to __imp__R_NilValue (auto-import)
Info: resolving _R_NamesSymbol by linking to __imp__R_NamesSymbol
(auto-import)
Info: resolving _R_LevelsSymbol by linking to __imp__R_LevelsSymbol
(auto-import)
Info: resolving _R_DimSymbol by linking to __imp__R_DimSymbol (auto-import)
Info: resolving _R_ClassSymbol by linking to __imp__R_ClassSymbol
(auto-import)
Info: resolving _R_GlobalEnv by linking to __imp__R_GlobalEnv (auto-import)
Info: resolving _R_UnboundValue by linking to __imp__R_UnboundValue
(auto-import)


I'm not very familiar with programming under Cygwin.  Can someone suggest
how to determine exactly what the problem is?

Thanks,

-Greg


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.