Octave 3.8.0 - package installation error in Mac OS X - macos

I am trying to install some packages in Octave however, I am getting errors. Any help will be much appreciated. I tried this from Octave home directory. (I have also tried: pkg install general-1.3.4.tar.gz)
octave:1> 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

Running the following command on a new terminal window solved it for me on the command line and gui based versions:
xcode-select --install

I have found a workaround from other sites on the web:
I was having the same issue when trying to install the Octave Signal Package without success. The following finally appears to be working.
code-select --install from the Terminal window to install the command line tools
Install MacPorts for Mac. This is a standard installer that you can download from Macports.
sudo port install gcc48 --> This is a Fortran compiler, which is necessary for installing octave-general
sudo port install octave-general [NOTE: THIS TOOK A VERY LONG TIME, and I had to disable Spotlight indexing...Hours on a Macbook Pro]
sudo port install octave-control
sudo port install octave-signal

I am having similar problems with octave 3.8.0 and Yosemite
pkg install /Users/Andrew/Downloads/odepkg-0.8.4.tar.gz
configure: error: in /var/tmp/oct-ZcfViL/odepkg/src':
configure: error: C compiler cannot create executables
Seeconfig.log' for more details
checking for gcc... /usr/local/octave/3.8.0/bin/gcc-mp-4.7
checking whether the C compiler works... no
pkg: error running the configure script for odepkg.
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 72, 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
I have the xcode command line tools installed.

Related

fatal error: 'dirent.h' file not found when trying to install gopls/Go tools via Visual Studio Code

I am trying to install the Go tools in Visual Studio Code and am getting the following error when installing gopls:
Tools environment: GOPATH=/Users/jal/go
Installing 1 tool at /Users/jal/go/bin in module mode.
gopls
Installing golang.org/x/tools/gopls#latest FAILED
{
"killed": false,
"code": 2,
"signal": null,
"cmd": "/opt/brew/bin/go install -v golang.org/x/tools/gopls#latest",
"stdout": "",
"stderr": "golang.org/x/tools/internal/fastwalk\n# golang.org/x/tools/internal/fastwalk\n../../go/pkg/mod/golang.org/x/tools#v0.2.1-0.20221101170700-b5bc717366b2/internal/fastwalk/fastwalk_darwin.go:11:10: fatal error: 'dirent.h' file not found\n#include <dirent.h>\n ^~~~~~~~~~\n1 error generated.\n"
}
1 tools failed to install.
gopls: failed to install gopls(golang.org/x/tools/gopls#latest): Error: Command failed: /opt/brew/bin/go install -v golang.org/x/tools/gopls#latest
golang.org/x/tools/internal/fastwalk
# golang.org/x/tools/internal/fastwalk
../../go/pkg/mod/golang.org/x/tools#v0.2.1-0.20221101170700-b5bc717366b2/internal/fastwalk/fastwalk_darwin.go:11:10: fatal error: 'dirent.h' file not found
#include <dirent.h>
^~~~~~~~~~
1 error generated.
I know I have dirent.h because I see results in my local Xcode SDKs when running find / -iregex ".*/dirent.h$" 2>/dev/null.
I am following the steps here: https://learn.microsoft.com/en-us/azure/developer/go/configure-visual-studio-code
My setup is:
Fresh install of go from Homebrew
Fresh install of VSCode macOS from go.dev/doc/install
Instal the Go plugin
In the Command Palette, search for and select "Go: Install/Update tools" and select all tools in the dropdown
All tools are installed successfully except for gopls. I have installed go via Homebrew and have also installed gopls via Homebrew but am not sure how to configure VSCode to point to this alternative gopls path.
The issue seemed to be due to a misconfigured or corrupted Xcode and command line tools.
I uninstalled and re-installed the latest version of Xcode, as well as the Command Line Tools package (this one is especially important) from here https://developer.apple.com/download/all/.
I had to do this despite xcode-select --install telling me everything was installed correctly and up to date.
Future issue discussion available here: https://github.com/golang/go/issues/56663

not able to compile wxpython-cffi on macOS with pypy3

I'm trying to follow/modify these instructions to get matplotlib compiled on pypy3, but when I try to compile wxpython-cffi with pypy3 build.py dox I get this error:
Traceback (most recent call last):
File "build.py", line 1650, in <module>
main(sys.argv[1:])
File "build.py", line 164, in main
function(options, args)
File "build.py", line 665, in cmd_dox
_doDox('xml')
File "build.py", line 657, in _doDox
pwd = pushDir(posixjoin(wxDir(), 'docs/doxygen'))
File "build.py", line 422, in __init__
os.chdir(newDir)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/user/tmp/docs/doxygen'
The steps I followed are:
installing pypy3 with brew: brew install pypy3
trying to install matplotlib with pip_pypy3 but getting this long error message
trying to install wxpython with pip_pypy3 install wxpython and getting another very long error message
Download wxpython-cffi: hg clone https://bitbucket.org/amauryfa/wxpython-cffi
installing wxWidgets with brew: brew install wxWidgets
which doxygen --> /usr/local/bin/doxygen
export DOXYGEN=/usr/local/bin/doxygen
and finally pypy3 build.py dox which results the error above
changing the line 657 of build.py from pwd = pushDir(posixjoin(wxDir(), 'docs/doxygen')) to pwd = pushDir('/usr/local/bin') results in a completely different error:
Running command: dox
./regen.sh xml
/bin/sh: ./regen.sh: No such file or directory
Command './regen.sh xml' failed with exit code 127.
I would appreciate if you could help me know what is the problem and how I can solve it. the final goal is to get the matplotlib installed on pypy3, so out of the box solutions also would do.
P.S. I'm not sure if my tags are appropriate. I would appreciate if the moderators could let me know if they need to be modified/removed
Matplotlib and PyPy is a known pain point on OSX, we have had multiple reporters but since the PyPy team does not have an OSX developer we cannot fix it on our own. See https://bitbucket.org/pypy/pypy/issues/2327 or any of the other matplotlib issues on the PyPy issue tracker.
It would be great if someone capable of working through this with us would step up and help us fix it, reach out with a response to any of the multiple issues or on IRC at #pypy

can not use help in octave 3.8.1 on mac

when i enter:
>> help help
i get error message:
error: unable to open /usr/local/Cellar/octave/3.8.1_1/share/octave/3.8.1/etc/macros.texi for reading
error: called from:
error: /usr/local/Cellar/octave/3.8.1_1/share/octave/3.8.1/m/help/__makeinfo__.m at line 103, column 5
error: /usr/local/Cellar/octave/3.8.1_1/share/octave/3.8.1/m/help/help.m at line 99, column 22
How could i solve it? I'm using this on MacOS 10.10.2.
Check if you have the documentations installed !
Depending on how you have to installed octave, you have to specify somehow to install also the documentations.
If you need more help, then provide more info, on how octave has been installed.
If you have installed through home-brew, try to reinstall it with with-docs option i.e.
brew reinstall octave --with-docs

Wordnet::Similarity installation issue

When I install Wordnet::Similarity on mac, the following error occur:
usr/local/bin/perl "-Iblib/arch" "-Iblib/lib" build/Depthfiles.PL blib/lib/WordNet/synsetdepths.dat
Generating default depth files.
Can't load '/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle' for module Digest::SHA1: dlopen(/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle, 1): no suitable image found. Did find:
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle: mach-o, but wrong architecture at /usr/local/lib/perl5/5.8.8/darwin-2level/DynaLoader.pm line 230.
at blib/lib/WordNet/Tools.pm line 76
Compilation failed in require at blib/lib/WordNet/Tools.pm line 76.
My attempt was to enter to the downloaded package directory from terminal and type:
perl Makefile.PL
make
make test
sudo make install
I made sure to have installed all prerequisite http://search.cpan.org/dist/WordNet-Similarity/doc/install.pod#Prerequisites. I suspect that this may be due to mac processor version with Perl interface. Any suggestion on how to fix this?
Install libdigest-sha-perl in Ubuntu 14.04 has solved this issue.
Download link:http://packages.ubuntu.com/trusty/amd64/perl/libdigest-sha-perl

Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk

I'm trying to install rpy2 for Python3 with the following command:
easy_install-3.2 rpy2
This gives a few warnings and an error:
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
The file /Developer/SDKs/MacOSX10.6.sdk seems to be missing even though I have xcode 4.5.1 installed.
There is no file called MacOSX10.6.sdk in the "Downloads for Apple Developers" on the Apple home page. What do I do?
Ps. It all works well if I do not specify python3.
What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.
I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.
Once you have installed macports, simply do:
$ sudo port install python33
There is also a good chance those python modules can be installed by simply doing:
$ sudo port install whizzopymod
EDIT: Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install I guess.

Resources