Octave fails with "cannot open shared object file"

I’m trying to use the early-access Travis Windows environment to build and test packages for GNU Octave. I can install Octave but can’t get it to run.

I’m installing Octave with choco install octave.portable and the installation seems to succeed. But whenever I call the octave command from my script, it fails with the following error:

$ $OCTAVE --version
The command "$OCTAVE --version" exited with 127.
$ $OCTAVE --eval "ver"
The command "$OCTAVE --eval "ver"" exited with 127.
$ $OCTAVE --eval 'disp("Hello, world!")'
The command "$OCTAVE --eval 'disp("Hello, world!")'" exited with 127.
Done. Your build exited with 1.
C:/ProgramData/chocolatey/bin/octave.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/ProgramData/chocolatey/bin/octave.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/ProgramData/chocolatey/bin/octave.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

I’m unable to reproduce this issue on my local Windows 10 machine: I stripped it down by uninstalling pretty much everything but Git for Windows, Chocolatey, and a choco-installed Octave. And the octave command works fine there when I call it from a Git bash shell.

Anybody know what might be going on, or how to diagnose this? Especially, any ideas on finding out what libraries it’s failing to load?

Example build: https://travis-ci.com/apjanke/travis-octave-windows/builds/98761722
My repo: https://github.com/apjanke/travis-octave-windows

1 Like

@apjanke: Interesting that almost one year later I come across the same issue with one of my projects with Octave 5.1.0:

Example build: https://travis-ci.org/sqlp/sedumi/jobs/634843403
“My” repo: https://github.com/sqlp/sedumi

Did you report a bug at https://github.com/travis-ci/travis-ci/issues?utf8=✓&q=is%3Aissue+octave? I did not find any.

The error 127 seems like a “program not found” (in the $PATH) to me. Chocolatey’s installer would update the system PATH in the registry, but you need to apply it in the current shell/subprocesses yourself with RefreshEnv.cmd like I did here: