Hi,
I would like to use the modified version of the Python Control Systems
Library (python-control), "control-0.5b", that has been modified by
Roberto Bucher "
http://www.dti.supsi.ch/~bucher/python/index.html" to
allow for MIMO systems.
The run-up to the problem:
1.In order to use the modified control package, I need SLYCOT, which I
can't seem to get to install. Slycot is dependent on BLAS/LAPACK. I
have followed the instructions on "
http://icl.cs.utk.edu/lapack-for-
windows/lapack/" and built my own libraries for BLAS/LAPACK using
MingW32 in Windows 7.
2.I have copied the freshly build libraries, liblapack.lib and
libblas.lib, to c:\Python27\libs and c:\MinGW32-xy\mingw32\lib
3.I have aslo copied the DLL files, liblapack.dll and libblas.dll, to
c:\Python27\DLLs.
4. I have additionally added c:\Python27\DLLs, c:\Python27\libs and c:
\MinGW32-xy\BIN to the system path and restated the Win7 to make sure
they are included.
5. I checked whether lapack was linked in Python by using the
following test:
import numpy.distutils.system_info as sysinfo
sysinfo.get_info('lapack')
which gave a positive indication that python sees the lapack library:
{'language': 'f77',
'libraries': ['lapack'],
'library_dirs': ['C:\\Python27\\libs']}.
6. From the slycot folder I executed in the command window: "python
setup.py build --compiler=mingw32"
*Note: Using the "build --compiler=mingw32" instead of the "install"
suffix, fixes the problem of "cannot find vccvarsall.bat" by
indicating that mingw32 should be used.
7. After running for a while the following error jumps up:
.......
build\temp.win32-2.7\Release\slycot\src\TD03AY.o:TD03AY.f:(.text
+0x537): undefined reference to `dcopy_'
build\temp.win32-2.7\Release\slycot\src\TD03AY.o:TD03AY.f:(.text
+0x55f): undefined reference to `daxpy_'
........
build\temp.win32-2.7\Release\slycot\src\TG01WD.o:TG01WD.f:(.text
+0xa9c): undefined reference to `dgemm_'
collect2: ld returned 1 exit status
error: Command "C:\MinGW32-xy\bin\gfortran.exe -Wall -Wall -shared
build\temp.wi
n32-2.7\Release\build\src.win32-2.7\slycot\src\_wrappermodule.o build
\temp.win32
-2.7\Release\build\src.win32-2.7\fortranobject.o build
\temp.win32-2.7\Release\sl
........
.o build\temp.win32-2.7\Release\slycot\src\UD01ND.o build
\temp.win32-2.7\Release
\slycot\src\UE01MD.o -Lc:\mingw32-xy\lib\gcc\mingw32\4.5.2 -LC:
\Python27\libs -L
C:\Python27\PCbuild -llapack -lpython27 -lgfortran -o build
\lib.win32-2.7\slycot
\_wrapper.pyd" failed with exit status 1
Questions:
Q1. Is this a problem with the slycot installation script under
Windows or am I missing some libraries or paths somewhere?
Q1a. From other forums that discussed similar errors, "http://
software.intel.com/en-us/forums/showthread.php?t=54946" advice was
given that "You should link *.o before the libraries, so that all
unreferenced symbols are seen before libraries are searched.". Problem
with the script or include paths or missing libs?
Q1b. However, from discussion forum "
http://icl.cs.utk.edu/lapack-
forum/viewtopic.php?f=2&t=1564", it was suggested that the
installation of slycot runs fine under linux. Which points back to my
initial question Q1.