SLICOT / SLICOT-Reference

SLICOT - A Fortran subroutines library for systems and control
BSD 3-Clause "New" or "Revised" License
47 stars 20 forks source link

Cannot build the makefile in Ubuntu (help wanted) #11

Open EveCharbie opened 12 months ago

EveCharbie commented 12 months ago

I an trying to compile SLICOT on Ubuntu. I deleted all the windows makefile and changed the name of all unix files from makefile_Unix to makefile. When I hit make, I get:

( cd src; make )
make[1]: Entering directory '/home/charbie/Documents/Programmation/SLICOT-Reference-main/src'
ifort /O2 /fp:source /4I8 -c AB01MD.f
make[1]: ifort: No such file or directory
make[1]: *** [makefile:139: AB01MD.o] Error 127
make[1]: Leaving directory '/home/charbie/Documents/Programmation/SLICOT-Reference-main/src'
make: *** [makefile:46: lib] Error 2

Could you help me please?

andreasvarga commented 11 months ago

Could you try to compile just one routine (e.g., AB01MD.f) to see if the path is correctly set and the object file can be generated?

EveCharbie commented 11 months ago

Thank you for your answer. I am sorry, I should have closed this issue. I found SLYCOT (https://anaconda.org/conda-forge/slycot) on conda-forge and it works as a charm for python.

andreasvarga commented 11 months ago

Yes, this is probably the best choice. For Julia, there are also ready to use libraries on many platforms compiled with various free compilers (see https://github.com/JuliaBinaryWrappers/SLICOT_jll.jl).

KybernetikJo commented 7 months ago

I an trying to compile SLICOT on Ubuntu. I deleted all the windows makefile and changed the name of all unix files from makefile_Unix to makefile. When I hit make, I get:

( cd src; make )
make[1]: Entering directory '/home/charbie/Documents/Programmation/SLICOT-Reference-main/src'
ifort /O2 /fp:source /4I8 -c AB01MD.f
make[1]: ifort: No such file or directory
make[1]: *** [makefile:139: AB01MD.o] Error 127
make[1]: Leaving directory '/home/charbie/Documents/Programmation/SLICOT-Reference-main/src'
make: *** [makefile:46: lib] Error 2

Could you help me please?

ifort must be called from a Windows Makefile.

One problem is that the include statement of the .inc file in src/makefile_Unix is wrong:

If the command make -f makefile_Unix MAKE="make -f makefile_Unix" is used, it is not necessary to delete or rename the makefiles.

Unfortunately, the makefile_Unix files contain other errors. See PR https://github.com/SLICOT/SLICOT-Reference/pull/14.

Here, the command make -f makefile_Unix is sufficient. The flags for Blas and Lapack still have to be set.

The debian pkg (https://salsa.debian.org/science-team/slicot/-/blob/master/debian/rules?ref_type=heads) could be useful, created by @svillemot.

I still have problems understanding the flags of make. At least I was able to compile something on Ubuntu22.04.

I would also like to see detailed installation instructions for Ubuntu/Debian.