octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error when installing control package


From: Julius Smith
Subject: Re: Error when installing control package
Date: Wed, 21 Jan 2015 20:25:07 -0800

I did some further digging and discovered that my make problem was due to having a $CDPATH without '.' in it.  (It is interesting that sh and bash behave differently on the Mac.  Only sh seems to support $CDPATH.)

Now I don't need the Makefile workaround (though I would still commit it), and the install makes it to another point of failure that is obviously a problem with Homebrew (resulting in /usr/local/Cellar/octave/3.8.1_1/share/octave/3.8.1/etc/macros.texi not existing).  I have reported this as a Homebrew issue.

I'm now trying to compile the latest Octave hg clone from source on Mac OS X, and the only configure warning is that Java is too old, even after downloading and installing the latest package for the Mac from Oracle, but presumably that only affects the GUI.

The make failed with many errors such as the following:

In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:624:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:1169:21: error:
      call to '__test' is ambiguous
   typedef decltype(__test(declval<_Tp>())) type;
                    ^~~~~~

From searching on this, it appears it is due to clang was being used. I changed my configure to avoid this:

./configure CC="gcc-4.9 -arch x86_64" CXX="g++-4.9 -arch x86_64" CPP="gcc-4.9 -E" CXXCPP="g++-4.9 -E" --prefix=/usr/local --enable-shared --includedir /opt/local/include --libdir /opt/local/include --with-qhull-includedir=/opt/local/include --with-qhull-libdir=/opt/local/lib

It compiles a lot of files until dying here:

Making all in liboctave
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
/bin/sh ../libtool  --tag=CXX   --mode=compile g++-4.9 -arch x86_64 -DHAVE_CONFIG_H -I. -I..  -I./array -I./cruft/misc -Inumeric -I./numeric -Ioperators -I./operators -I./system -I./util -I../libgnu -I../libgnu   -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -D_THREAD_SAFE -pthread -MT system/system_libsystem_la-oct-time.lo -MD -MP -MF system/.deps/system_libsystem_la-oct-time.Tpo -c -o system/system_libsystem_la-oct-time.lo `test -f 'system/oct-time.cc' || echo './'`system/oct-time.cc
libtool: compile:  g++-4.9 -arch x86_64 -DHAVE_CONFIG_H -I. -I.. -I./array -I./cruft/misc -Inumeric -I./numeric -Ioperators -I./operators -I./system -I./util -I../libgnu -I../libgnu -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -D_THREAD_SAFE -pthread -MT system/system_libsystem_la-oct-time.lo -MD -MP -MF system/.deps/system_libsystem_la-oct-time.Tpo -c system/oct-time.cc  -fno-common -DPIC -o system/.libs/system_libsystem_la-oct-time.o
system/oct-time.cc: In member function 'void octave_localtime::init(const octave_time&)':
system/oct-time.cc:238:25: error: 'localtime' is not a member of 'gnulib'
   octave_base_tm::init (gnulib::localtime (&t));
                        ^

Did I miss anything obvious?

Thanks for any leads,
Julius

At 04:12 PM 1/21/2015, Julius Smith wrote:
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/Makefile         2014-06-16 11:26:55.000000000 -0700
--- control-jos/src/Makefile    2014-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/


Julius O. Smith III <address@hidden>
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]