Octave: Loaded package is not recognized - octave

I have installed package image via pkg install -forge image and after tons of warnings (I am using clang as a C compiler, yeah, I know...) it finished installing.
I then loaded the package with ordinary pkg load image and Octave did not complain. But when I typed help viscircles to get some help on the function, Octave behaved like there was no package image, meaning it returned
>> help viscircles
error: help: the 'viscircles' function belongs to the image package
from Octave Forge but has not yet been implemented.
Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
Now I executed the pkg list to see if the package was indeed installed and loaded and yes, it was (there was an asterisk next to image package, which indicates that the certain package is loaded).
I decided to unload all packages and so I did. Now, before loading image again, I executed help viscircles again, but this time I got the next error:
>> help viscircles
error: help: the 'viscircles' function belongs to the image package
from Octave Forge which you have installed but not loaded. To load the
package, run 'pkg load image' from the Octave prompt.
Interesting... I loaded the package again and same problem as before. I also downloaded the package manually and reinstalled it, same problems.
And yes, I have Octave 4.0.2, the requirements for image 2.6.2 is version 4.0.0+.

The function viscircles is on development versions of the image package only. It is not part of the current release, version 2.6.2 which you have installed.
The error message:
>> help viscircles
error: help: the 'viscircles' function belongs to the image package
from Octave Forge which you have installed but not loaded. To load the
package, run 'pkg load image' from the Octave prompt.
means that the function is not part of Octave and if it is to exist at all, it will be on the image package. It doesn't mean that the image package will actually have it, only that it belongs to it. The error message you get after loading the package:
>> help viscircles
error: help: the 'viscircles' function belongs to the image package
from Octave Forge but has not yet been implemented.
Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
tells you the issue. The function viscircles is not implemented on that version of the package.
You can get it from the mercurial repository of the image package though at 75df28049249. Not sure if it will work on Octave 4.0 though.

Related

Octave Psychtoolbox can't find Screen.mex despite being first directory in path

I have attempted to install Psychtoolbox for Octave on Windows 10, per the installation instructions. Before the installation completes, I get this warning:
Screen() failed to work for some reason:
Check the troubleshooting instructions on our Wiki (Download section
and FAQ section, maybe also the Bugs section).
You may need to delete (or rename) the following DLL files in your Octave-4.4.1 installations
bin folder to make this work, then restart Octave:
C:\Octave\4.4.1\bin\libglib-2.0.0.dll
C:\Octave\4.4.1\bin\libgmodule-2.0.0.dll
C:\Octave\4.4.1\bin\opengl32.dll
Once you manage to fix the problem (simply type 'AssertOpenGL' to verify
that stuff works now), you do not need to run the installation routine again,
but can start working immediately.
I had already deleted the named DLL files, which I confirmed. I then ran AssertOpenGL and received this error:
Last Error: could not find library or dependencies: D:\Coding\PTB\Psychtoolbox\PsychBasic\Octave4WindowsFiles64\Screen.mex
Simply calling Screen directly gives this error:
error: library open failed: D:\Coding\PTB\Psychtoolbox\PsychBasic\Octave4WindowsFiles64\Screen.mex
However, the directory containing Screen.mex is at the very top of my path:
Octave's search path contains the following directories:
.
D:\Coding\PTB\Psychtoolbox\PsychBasic\Octave4WindowsFiles64
D:\Coding\PTB\Psychtoolbox
<etc>
As such, the solution to this similar question is of no use. What might I be able to do to correctly configure PTB on Octave?
What version of gstreamer are you using? I had a similar problem recently and fixed it by installing gstreamer 1.14.4. The latest version of gstreamer will not work, nor will versions earlier than 1.14.4.

Octave - How to install packages on Windows

Question
Due to the issue in Fix for Octave urlread causing Peer certificate cannot be authenticated with given CA certificates, I cannot install Octave packages on Windows.
Please suggest other ways to install. Particularly I would like to go through Gradients, Gradient Plots and Tangent Planes which requires Symbolic package.
EDIT: this bug is no longer present in Octave v4.2.1, and the issue described in the Question should no longer occur.
Yes, there appears to be a known issue logged on the bug tracker with the current release version of Octave (4.2.0) on windows being unable to connect to https due to the curl issue you identified in the linked discussions/questions. That bug report and the original help list discussion summarize the certificate issue and problem verification. It should be fixed in the next Octave release.
This, however, does not prevent you from installing packages. It only prevents you from using the program to go fetch packages to be installed. You are still able to go to the Octave Forge package site, manually download a package file, and then as described in the Octave manual and help for pkg run the install command.
E.g., you could download symbolic-2.4.0.tar.gz and save it to your current working directory. Then within octave, issue the following from the command line:
pkg install symbolic-2.4.0.tar.gz
NOTE: symbolic currently requires Python and Sympy installed. If you don't already have this on your Windows machine, the package maintainer has a separate self-contained package for Windows that can be obtained from the author's github repository. In this case you would download the package and run the command:
pkg install symbolic-win-py-bundle-2.4.0.zip
Another more tedious option would be for you to compile your own copy from development sources, as the fix has supposedly been pushed to the mxe-octave repository.

Binary file refuses to run due to a missing shared library

I tried building recutils version 1.7 downloaded from the home page, using the standard configure, make, sudo make install sequence, but when trying to run the resulting binaries. like recinf, I get the error:
recinf: error while loading shared libraries: librec.so.1: cannot open shared object file: No such file or directory
Does this mean I made a mistake during the build or is the package itself in error?
As Etan Reisner said the problem was that the shared object libraries were installed but not loaded into the cache, hence the need to run ldconfig. After running
sudo ldconfig
the binaries ran properly. If I had looked in /usr/local/lib, I would have seen the libs there.

signal functions does not recognized by octave 3.6.1

I have installed Octave 3.6.1 along with packages including "signal 1.1.2" but when i run a simple example of "sigmoid_train" function an error appears "sigmoid_train function is undefined".
Can any body tell me what is the problem?
The problem is that you didn't load the signal package. When you type pkg list you can find which ones are loaded by an asterisk in front of their names. Load a package with pkg load signal.
Having to load a packages is that thing that many users coming from Matlab find strange but if you compare with other languages, such as Python, Perl, or C++, would you expect them to import, use, or #include every libraries available in the system by default? See Octave's FAQ for more details.
If you want a package to be loaded automatically by default, the recommended action is to add the line pkg load signal to your ~/.octaverc file.
Finally, you have just started with Octave, you should had installed Octave 3.8.1.

tcl error "can't find package struct::tree "

I tried to use the tree package for TCL but I'm unable to find any documentation at all. When trying to run the examples from http://tcllib.sourceforge.net/doc/struct_tree.html, i get the error
can't find package struct::tree
Can anyone tell me how to include it in tcl 8.5?
The struct::tree package is part of Tcllib.
If you are using ActiveTcl, doing a teacup update (possibly with elevated permissions, depending on how you installed) will download a copy. I don't know whether all Linuxes have Tcllib done as an appropriate system package, but Debian does. Otherwise, there's a download link in on the main Tcllib page; Tcllib works just fine as a bunch of .tcl files that you include with your application code.