user3748827
user3748827

Reputation: 61

Installing general package in octave has error

I have error in installing general package using the instruction.

pkg install -forge general

and get the message

octave:3> pkg install -forge general
In file included from /usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include/stdint.h:3:0,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/oct-conf-post.h:167,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/config.h:3351,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/../octave/oct.h:31,
                 from SHA1.cc:19:
/usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
make: *** [SHA1.oct] Error 1
/usr/local/octave/3.8.0/bin/mkoctfile-3.8.0 SHA1.cc

pkg: error running `make' for the general package.
error: called from 'configure_make' in file /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/configure_make.m near line 82, column 9
error: called from:
error:   /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m at line 199, column 5
error:   /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/pkg.m at line 394, column 9
octave:3> 

I have no idea to solve this problem. My computer OS is Mac 10.9.3 Mavericks. Octave version is 3.8.0

octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
no packages installed.

Does anyone have idea?

Upvotes: 3

Views: 10052

Answers (3)

S.R
S.R

Reputation: 2731

While looking at how to install the control package, I found this in the Arch Wiki:

Note: Some Octave's packages, like control, need the gcc-fortran ArchLinux's package in order to compile and install. (https://wiki.archlinux.org/index.php/Octave)

So you might have to install gcc-fortran first.

Upvotes: 0

Roy
Roy

Reputation: 41

I was having the same issue when trying to install the Octave Signal Package without success. The following finally appears to be working.

  1. code-select --install from the Terminal window to install the command line tools
  2. Install MacPorts for Mac. This is a standard installer that you can download from Macports.
  3. sudo port install gcc48 --> This is a Fortran compiler, which is necessary for installing octave-general
  4. sudo port install octave-general [NOTE: THIS TOOK A VERY LONG TIME, and I had to disable Spotlight indexing...Hours on a Macbook Pro]
  5. sudo port install octave-control
  6. sudo port install octave-signal

Upvotes: 1

user3748827
user3748827

Reputation: 61

I find the solution! Using this comment

xcode-select --install

and it's success!

octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
no packages installed.
octave:2> pkg install -forge general
For information about changes from previous versions of the general package, run 'news general'.
octave:3> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     general  |   1.3.4 | /Users/apple/octave/general-1.3.4

Upvotes: 3

Related Questions