jamoma / jamoma2

A header-only C++ library for building dynamic and reflexive systems with an emphasis on audio and media.
MIT License
30 stars 6 forks source link

Octave instructions snag at package installation #51

Closed nwolek closed 9 years ago

nwolek commented 9 years ago

I spent this morning reviewing the readme to make sure that they work for new contributors. Made some corrections, but the steps hit a snag during package installation. This step:

pkg install ~/Downloads/control-2.8.4.tar.gz

Creates the following report that the make fails:

...
f951: Warning: Nonexistent include directory '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/include/darwin' [-Wmissing-include-dirs]
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/5.2.0/lib/gcc/5/gcc/x86_64-apple-darwin14.4.0/5.2.0'
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/5.2.0/lib/gcc/5/gcc/x86_64-apple-darwin14.4.0/5.2.0/../../..'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [__control_slicot_functions__.oct] Error 1
tar -xzf slicot.tar.gz
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 is_real_scalar.cc
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 is_real_vector.cc
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 is_real_matrix.cc
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 is_real_square_matrix.cc
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 is_matrix.cc
/usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 nfields2.cc
mkdir sltmp
mv slicot/src/*.f ./sltmp
mv slicot/src_aux/*.f ./sltmp
cp TG04BX.fortran ./sltmp/TG04BX.f
cp TB01ZD.fortran ./sltmp/TB01ZD.f
cd sltmp; /usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 -c *.f
ar -rc slicotlibrary.a ./sltmp/*.o
rm -rf sltmp slicot
LFLAGS="-L/usr/local/Cellar/octave/4.0.0_1/lib/octave/4.0.0 -L/usr/local/Cellar/octave/4.0.0_1/lib -llapack -lblas -L/usr/local/opt/readline/lib -L/usr/local/Cellar/gcc/5.2.0/lib/gcc/5/gcc/x86_64-apple-darwin14.4.0/5.2.0 -L/usr/local/Cellar/gcc/5.2.0/lib/gcc/5/gcc/x86_64-apple-darwin14.4.0/5.2.0/../../.. -lreadline -lgfortran -lquadmath -lm" \
    /usr/local/Cellar/octave/4.0.0_1/bin/mkoctfile-4.0.0 __control_slicot_functions__.cc common.cc slicotlibrary.a

pkg: error running `make' for the control package.
error: called from 'configure_make' in file /usr/local/Cellar/octave/4.0.0_1/share/octave/4.0.0/m/pkg/private/configure_make.m near line 96, column 9

There are more warnings before that. @tap included a comment that warnings can be ignored, but it seems that something related to Java is not installed on my machine.

Any suggestion?

tap commented 9 years ago

I have Java installed because of my C74 work, so it makes sense that I didn't have this problem. Thanks for catching it, @nwolek.

According to http://wiki.octave.org/Octave_for_MacOS_X you can avoid the Java dependency when you install octave:

brew install octave --without-java

Not sure if there is any special cleanup or uninstall procedure you need to do before running that if you've already done the with-java install.

lossius commented 9 years ago

Do we really need to provide instructions on how to install Octave in order to work with Jamoma2? Isn't it only used every now and then by a few of us to calculate some values for unit tests? To present Octave as a necessary dependency sounds like quite an overkill to me.

Anyway, I have always had problems installing Osctave using MacPorts or Homebrew. This has been the case with all OSX versions from 10.6 through 10.10. It ends up as a venture down the rabbit hole of endless dependencies on compilers etc. There's also a binary distribution of Octave, why not just suggest that one if it is really needed at all?

http://wiki.octave.org/Octave_for_MacOS_X#Binary_installer_for_OSX_10.9.1

lossius commented 9 years ago

Looking at the unit testing part of the readme my humble iopinion is that we should remove all instructions regarding how to install Octave. It is not DRY that we try to maintain instructions on this, this is not the scope or obligation of the Jamoma project. Instead we should simply provide a link to a proper place where this info is maintained and kept up to date.

tap commented 9 years ago

You can't use the binary distro of Octave because package installation is broken and in order to do anything DSP related you need to install the DSP (and Control) packages.

nwolek commented 9 years ago

I was hoping to avoid reinstalling the gcc, since it took me 40 minutes this morning. In essence, I did the following:

brew uninstall octave 
brew untap homebrew/science

Then I went through the steps and skipped the gcc line. But the results are are as follows:

lowkeymacbookpro:~ nathanwolek$ brew install octave --without-java
==> Installing octave from homebrew/homebrew-science
Error: You must `brew link ghostscript gnuplot' before homebrew/science/octave can be installed
lowkeymacbookpro:~ nathanwolek$ brew link ghostscript gnuplot
Linking /usr/local/Cellar/ghostscript/9.16... 
Error: Could not symlink share/ghostscript/Resource
/usr/local/share/ghostscript is not writable.
lowkeymacbookpro:~ nathanwolek$

I am going to keep messing with it between stuff today.

tap commented 9 years ago

The other option is that you could just install java, though I don't really recall what that means or how it is done. Maybe it's done through some Apple magic ?

Tim

On Wed, Sep 30, 2015 at 11:34 AM, Nathan Wolek notifications@github.com wrote:

I was hoping to avoid reinstalling the gcc, since it took me 40 minutes this morning. In essence, I did the following:

brew uninstall octave brew untap homebrew/science

Then I went through the steps and skipped the gcc line. But the results are are as follows:

lowkeymacbookpro:~ nathanwolek$ brew install octave --without-java ==> Installing octave from homebrew/homebrew-science Error: You must `brew link ghostscript gnuplot' before homebrew/science/octave can be installed lowkeymacbookpro:~ nathanwolek$ brew link ghostscript gnuplot Linking /usr/local/Cellar/ghostscript/9.16... Error: Could not symlink share/ghostscript/Resource /usr/local/share/ghostscript is not writable. lowkeymacbookpro:~ nathanwolek$

I am going to keep messing with it between stuff today.

— Reply to this email directly or view it on GitHub https://github.com/jamoma/jamoma2/issues/51#issuecomment-144469079.

nwolek commented 9 years ago

The weird thing is that installed Java last week for something. I have a control panel for it in my System Preferences. Is this just a runtime environment and not the developer tools?

I have made progress by changing the permissions on ghostscript from 755 to 777 for the linking step.

nwolek commented 9 years ago

While I agree with @lossius in principle, we need some targeted directions for this. I believe I have ironed them out now, plus I added a reference to the Octave wiki were people can get more information. Closing the issue via commit 5475358.