Skip to content
This repository has been archived by the owner. It is now read-only.

Octave build error with texi2dvi #3669

Closed
thekoc opened this issue May 17, 2016 · 21 comments

Comments

Projects
None yet
6 participants
@thekoc
Copy link

commented May 17, 2016

I installed mactex through brew cask and /Library/TeX/texbin/ is in my PATH:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/usr/texbin/:/usr/local/sbin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
which tex
/Library/TeX/texbin/tex

But still it tell me:

==> ./configure --prefix=/usr/local/Cellar/octave/4.0.2 --enable-dependency-tracking --enable-link-al
==> make all DOC_TARGETS=
==> make check DOC_TARGETS=
Last 15 lines from /Users/koc/Library/Logs/Homebrew/octave/03.make:
TEXI2DVI octave.dvi
MAKEINFO octave.html
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one. If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.
For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
make[3]: *** [octave.dvi] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

My octave is installed via homebrew and when I upgrade it to 4.02 the error occurred.

@dpo

This comment has been minimized.

Copy link
Contributor

commented May 17, 2016

TeX shouldn't be required any more. Is texinfo installed? What does ls $(brew --prefix texinfo)/bin say?

@thekoc

This comment has been minimized.

Copy link
Author

commented May 17, 2016

ls $(brew --prefix texinfo)/bin
info makeinfo pod2texi texi2dvi texindex
install-info pdftexi2dvi texi2any texi2pdf

@dpo

This comment has been minimized.

Copy link
Contributor

commented May 17, 2016

Please post the output of brew doctor and brew gist-logs octave (a link).

@dpo dpo added the Mathematics label May 17, 2016

@thekoc

This comment has been minimized.

Copy link
Author

commented May 18, 2016

brew doctor said ready and git-log said this

@dpo

This comment has been minimized.

Copy link
Contributor

commented May 20, 2016

@thekoc Out of curiosity, does it work if you say brew install octave --without-test?

@schoeps Any idea why make all DOCTARGETS= succeeds but make check DOCTARGETS= fails because LaTeX can't be found?
https://gist.githubusercontent.com/thekoc/5f41c8a77d3de5b6c318d80d9453544d/raw/16e8aae56c8aa8662872648802a491de26c1007c/03.make

@schoeps

This comment has been minimized.

Copy link
Contributor

commented May 20, 2016

I think this also occured on Jenkins, right? I did not observe this locally and obviously it should not happen since doctargets='' surpresses building of the manual. Possibly it's an Octave bug.

One would have to dive into the makefiles and disable doctargets manually but this is not fun to debug.... let's see if we can get around it :)

@dpo

This comment has been minimized.

Copy link
Contributor

commented May 20, 2016

At least in the most recent update, I don't think Jenkins complained (and it doesn't have LaTeX installed). How can we work around it?

@schoeps

This comment has been minimized.

Copy link
Contributor

commented May 20, 2016

Let's try to help thekic and then let's try ignoring the issue :) My reasoning is as follows: standard users do not recompile and most advanced (scientific) users will have latex anyway....

@thekoc

This comment has been minimized.

Copy link
Author

commented May 20, 2016

brew upgrade octave --without-test
made no difference :(

Last 15 lines from /Users/koc/Library/Logs/Homebrew/octave/03.make:
TEXI2DVI octave.dvi
MAKEINFO octave.html
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one. If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
make[3]: *** [octave.dvi] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@thekoc

This comment has been minimized.

Copy link
Author

commented May 20, 2016

I uninstalled and installed again with no argument, then it turned out that the bug just disappeared = =

@dpo

This comment has been minimized.

Copy link
Contributor

commented May 20, 2016

Glad to hear you got it to work. Feel free to close the issue if all is well now, and don't hesitate to open a new one if anything else comes up.

@thekoc

This comment has been minimized.

Copy link
Author

commented May 22, 2016

Alright, thanks for your time.

@thekoc thekoc closed this May 22, 2016

@ashi009

This comment has been minimized.

Copy link

commented May 23, 2016

I still have the issue.

==> make all DOC_TARGETS=
==> make check DOC_TARGETS=
Last 15 lines from /Users/xshi/Library/Logs/Homebrew/octave/03.make:
TEXI2DVI octave.dvi
MAKEINFO octave.html
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one. If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
make[3]: *** [octave.dvi] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-science/issues

These open issues may also help:
Octave (--with-gui) failed to build on 10.11 #3387
Octave "pkg install -forge signal control" traverses nonexistent directory for -lgfortran #3167

@schoeps

This comment has been minimized.

Copy link
Contributor

commented May 23, 2016

please try this

brew uninstall octave 
brew install octave --without-test
@Dewdrops

This comment has been minimized.

Copy link

commented Aug 4, 2016

I still have the issue in OSX 10.11.5 when install octave 4.0.3 . (I've installed mactex via homebrew cask and /Library/TeX/texbin is in PATH)

The command I use is

brew install octave --with-openblas --without-test

Error output

==> make all DOC_TARGETS=
==> make install DOC_TARGETS=
Last 15 lines from /Users/dewdrops/Library/Logs/Homebrew/octave/03.make:
  TEXI2DVI octave.dvi
  MAKEINFO octave.html
You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one.  If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do).  See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
make[3]: *** [octave.dvi] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-science/issues

These open issues may also help:
Octave formula causes a deprecation warning https://github.com/Homebrew/homebrew-science/issues/3920
Trouble installing octave to mac os 10.11.5 https://github.com/Homebrew/homebrew-science/issues/3829
Octave (--with-gui) failed to build on 10.11 https://github.com/Homebrew/homebrew-science/issues/3387

Any Idea about solving this issue?

@schoeps

This comment has been minimized.

Copy link
Contributor

commented Aug 4, 2016

Actually Octave should not build the docs (DOC_TARGETS=). However, one could enforce the correct tex path in the formula by adding a line like ENV.prepend_path "PATH", "/Library/TeX/texbin",
see here. You can modify your local file accordingly or install the gist

brew install https://gist.githubusercontent.com/schoeps/21005e50dff49fdf31bd0b2fef85bc67/raw/9a1c06d6bada9c5a8a82eff21b93d6feaedc4c6a/octave.rb

Does this fix your problem?

@Dewdrops

This comment has been minimized.

Copy link

commented Aug 4, 2016

@schoeps
Thanks for the gist. Works great.

In fact this issue only happens to me when --with-openblas is specified. Don't know why though.

@schoeps

This comment has been minimized.

Copy link
Contributor

commented Aug 4, 2016

This can be explained: if you use no switches then homebrew will fetch a precompiled binary. Therefore the problem does not show up. This also means that installing --with-openblas should be significantly slower than without.

Regarding openblas: Actually I prefer it, too but recently, people have seen strange problems in Octave on various platforms due to openblas (e.g. unexpected crashes while plotting, ctrl+c does not work in the GUI etc). We do not know yet why. However, if you see this behavior, it might be an option to switch to Apple's blas implementation.

@filipefigcorreia

This comment has been minimized.

Copy link

commented Sep 2, 2016

I've faced this same issue today when trying to use the switches --with-gui --HEAD and, inspired by @schoeps' workaround, solved it by adding this to my formula:
ENV.prepend_path "PATH", "/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin"

It appears to have installed fine. I'm now facing another issue, but I'm assuming that it has more to do with this version of octave and not so much with homebrew.

@schoeps

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2016

Most users want the function help (to e.g. call help sin in Octave). Most users will probably not care to build the pdf documentation locally (since the pdf can be downloaded from the internet). In former times Octave <=4.3 this could not be achieved. However, in --HEAD and thus in the next release (4.2 is due in one week or so) --without-docs will only disable the pdf documentation. Therefore, the best way to get octave is:

brew install --HEAD --with-gui --without-docs

@schoeps

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2016

@filipefigcorreia: I suggest to post your question to the octave mailing list instead of stackoverflow (however, crossposting is not favoured...).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.