On Mon, May 28, 2012 at 12:37:24PM +0200, Lukas Reichlin wrote: > ... > > Hello, > > Could someone please tell me what I should change in the makefile [1] for the > control package? I think I should release control-2.3.51 in the next few > weeks. > > Thanks for any hints and best regards > Lukas > > [1] > http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/src/Makefile?revision=10163&view=markup
Something like the attached, for now? (It is against current version, which is not identical to the version your link points to.) The development version of the package (more exactly, the included slicotlibrary) does not seem to compile currently, however: octave:1> pkg install control-2.3.50.tar.gz lapacklibrary.a(tstiee.o): In function `ilaenv_': tstiee.f:(.text+0xfe): multiple definition of `ilaenv_' lapacklibrary.a(ilaenv.o):ilaenv.f:(.text+0x0): first defined here collect2: ld returned 1 exit status make: *** [control_slicot_functions.oct] Error 1 'make' returned the following error: make: Entering directory `/tmp/oct-Cu9Lkw/control-2.3.50/src' tar -xzf slicot.tar.gz mv slicot/src/*.f . mv slicot/src_aux/*.f . cp TG04BX.fortran TG04BX.f /usr/nfs/bin/mkoctfile-3.6.1 -c *.f ar -rc slicotlibrary.a *.o rm -rf *.o *.f slicot tar -xzf lapack-3.4.1.tgz mv lapack-3.4.1/BLAS/SRC/*.f . mv lapack-3.4.1/INSTALL/*.f . mv lapack-3.4.1/SRC/*.f . /usr/nfs/bin/mkoctfile-3.6.1 -c *.f ar -rc lapacklibrary.a *.o rm -rf *.o *.f lapack-3.4.1 /usr/nfs/bin/mkoctfile-3.6.1 control_slicot_functions.cc common.cc slicotlibrary.a lapacklibrary.a \ -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -lgfortranbegin -lgfortran -lm make: Leaving directory `/tmp/oct-Cu9Lkw/control-2.3.50/src' error: called from `pkg>configure_make' in file /usr/nfs/share/octave/3.6.1/m/pkg/pkg.m near line 1385, column 9 error: called from: error: /usr/nfs/share/octave/3.6.1/m/pkg/pkg.m at line 827, column 5 error: /usr/nfs/share/octave/3.6.1/m/pkg/pkg.m at line 383, column 9 octave:1> It would probably be nice to test for an already installed slicotlibrary in a configure script and make static linking against the package-internal slicotlibrary version only a fallback. Would you be interested in such a change? The same could be done for lapacklibrary, but here I do not see why the systems library which Octave depends on should not be used unconditionally ... ? Olaf -- public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
Index: Makefile =================================================================== --- Makefile (revision 10531) +++ Makefile (working copy) @@ -1,7 +1,9 @@ -# LAPACK_LIBS := $(shell mkoctfile -p LAPACK_LIBS) -# BLAS_LIBS := $(shell mkoctfile -p BLAS_LIBS) -FLIBS := $(shell mkoctfile -p FLIBS) +MKOCTFILE ?= mkoctfile +# LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS) +# BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS) +FLIBS := $(shell $(MKOCTFILE) -p FLIBS) + all: control_slicot_functions.oct \ is_real_scalar.oct \ is_real_vector.oct \ @@ -20,7 +22,7 @@ mv slicot/src/*.f . mv slicot/src_aux/*.f . cp TG04BX.fortran TG04BX.f - mkoctfile -c *.f + $(MKOCTFILE) -c *.f ar -rc slicotlibrary.a *.o rm -rf *.o *.f slicot @@ -29,27 +31,27 @@ mv lapack-3.4.1/BLAS/SRC/*.f . mv lapack-3.4.1/INSTALL/*.f . mv lapack-3.4.1/SRC/*.f . - mkoctfile -c *.f + $(MKOCTFILE) -c *.f ar -rc lapacklibrary.a *.o rm -rf *.o *.f lapack-3.4.1 # slicot functions control_slicot_functions.oct: control_slicot_functions.cc slicotlibrary.a lapacklibrary.a - mkoctfile control_slicot_functions.cc common.cc slicotlibrary.a lapacklibrary.a \ + $(MKOCTFILE) control_slicot_functions.cc common.cc slicotlibrary.a lapacklibrary.a \ ${FLIBS} # helpers is_real_scalar.oct: is_real_scalar.cc - mkoctfile is_real_scalar.cc + $(MKOCTFILE) is_real_scalar.cc is_real_vector.oct: is_real_vector.cc - mkoctfile is_real_vector.cc + $(MKOCTFILE) is_real_vector.cc is_real_matrix.oct: is_real_matrix.cc - mkoctfile is_real_matrix.cc + $(MKOCTFILE) is_real_matrix.cc is_real_square_matrix.oct: is_real_square_matrix.cc - mkoctfile is_real_square_matrix.cc + $(MKOCTFILE) is_real_square_matrix.cc clean: rm -rf *.o core octave-core *.oct *~ *.f slicot lapack-3.4.1
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev