|
From: | Julius Smith |
Subject: | Re: Error when installing control package |
Date: | Wed, 21 Jan 2015 20:25:07 -0800 |
I cannot do "pkg install -forge control" either (and haven't for many months), but it fails earlier in the make. I tracked it down to an apparent bug in GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14). The patch below works around it, but how do we make local versions of octave-forge stuff, since Octave's pkg downloads directly from SourceForge? I suppose at the moment I have to hack pkg.m as well.
diff -rcb control/src/Makefile control-jos/src/Makefile
*** control/src/Makefile2014-06-16 11:26:55.000000000 -0700
--- control-jos/src/Makefile2014-09-16 23:48:12.000000000 -0700
***************
*** 31,37 ****
mv slicot/src/*.f ./sltmp
mv slicot/src_aux/*.f ./sltmp
cp TG04BX.fortran ./sltmp/TG04BX.f
!cd sltmp; $(MKOCTFILE) -c *.f
ar -rc slicotlibrary.a ./sltmp/*.o
rm -rf sltmp slicot
--- 31,37 ----
mv slicot/src/*.f ./sltmp
mv slicot/src_aux/*.f ./sltmp
cp TG04BX.fortran ./sltmp/TG04BX.f
!(cd ./sltmp; $(MKOCTFILE) -c *.f)
ar -rc slicotlibrary.a ./sltmp/*.o
rm -rf sltmp slicot
Direct illustration of the sh problem on my Macbook:
bash-4.3$ sh --version
GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
bash-4.3$ sh
sh-3.2$ mkdir /tmp/shtest
sh-3.2$ cd shtest && pwd
sh: cd: shtest: No such file or directory
sh-3.2$ cd ./shtest && pwd
/tmp/shtest
sh-3.2$ exit
exit
bash-4.3$ cd /tmp
bash-4.3$ cd shtest && pwd
/tmp/shtest
Because Makefiles use sh, paths relative to . must apparently now be written as './path'.
The bigger question however is how to use patched Octave Forge packages with the pkg command?
Incidentally, I am running Octave as installed by Homebrew (on my up-to-date Macbook Pro), and "help pkg" fails while "help" is ok (I'll guess this is a problem with the Homebrew installation, but thought I should mention it).
octave:1> help
;; (works)
octave:2> which pkg
'pkg' is a function from the file /usr/local/Cellar/octave/3.8.1_1/share/octave/3.8.1/m/pkg/pkg.m
octave:2> type pkg
;; (works)
Also, while I'm talking about pkg, it would be nice to have a -debug option (or whatever) that would suppress removal of all the temporary directories. A -forge_from_path option could take an explicit path to the package (for local debugging and retention).
Finally, an install should do a complimentary load, in my opinion.
Thanks for considering,
Julius
At 12:54 PM 1/21/2015, Avinoam Kalma wrote:
Hi,
>> pkg install -forge control
in Octave 4.1.0+ changeset 19602:f3ac54ac2c6a
I get the following error messages:
In file included from __control_slicot_functions__.cc:1:0:
sl_ab08nd.cc: In function octave_value_list F__sl_ab08nd__(const octave_value_list&, int):
sl_ab08nd.cc:202:26: error: ambiguous overload for operator* (operand types are const Matrix and octave_value)
gain = c * xpow (a, double (n-1-nu)) * b;
^
sl_ab08nd.cc:202:26: note: candidates are:
In file included from /usr/local/include/octave-4.1.0+/octave/../octave/oct-obj.h:34:0,
from /usr/local/include/octave-4.1.0+/octave/../octave/ov-fcn.h:32,
from /usr/local/include/octave-4.1.0+/octave/../octave/ov-builtin.h:28,
from /usr/local/include/octave-4.1.0+/octave/../octave/defun-int.h:28,
from /usr/local/include/octave-4.1.0+/octave/../octave/defun-dld.h:30,
from /usr/local/include/octave-4.1.0+/octave/../octave/oct.h:36,
from sl_ab08nd.cc:30,
from __control_slicot_functions__.cc:1:
Etc .
Thanks,
Avinoam
Julius O. Smith III <address@hidden>
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/
[Prev in Thread] | Current Thread | [Next in Thread] |