Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

builder request: Octave

Open Krastanov opened this issue 1 year ago • 1 comments

Having Octave available in Yggdrasil will make the creation of simple matlab-translation tools a bit easier (OctaveCall.jl akin to PythonCall.jl and MATLAB.jl). Creating this issue here to track potential progress.

Krastanov avatar Apr 01 '24 04:04 Krastanov

I suppose this should be straightforward to build, but may need a bit of work to use all the dependencies from Ygg itself.

ViralBShah avatar Apr 19 '24 14:04 ViralBShah

I believe this is not straightforward because the Octave build process did not support cross-compilation. This was a while ago, and perhaps things have changed.

ViralBShah avatar Oct 02 '24 18:10 ViralBShah

We do have an interface package, but it will need a significant refresh since it uses Cxx.jl. https://github.com/JuliaInterop/OctCall.jl

ViralBShah avatar Oct 02 '24 18:10 ViralBShah

Octave was added inhttps://github.com/JuliaPackaging/Yggdrasil/pull/9729, so closing this.

imciner2 avatar Dec 26 '24 16:12 imciner2

The produced binaries have some issues - but yes at lesat we have the builder.

https://github.com/JuliaPackaging/Yggdrasil/issues/9887

ViralBShah avatar Dec 26 '24 17:12 ViralBShah

Works:

julia> using Octave_jll, OpenBLAS32_jll

julia>  withenv("LBT_DEFAULT_LIBS"=>OpenBLAS32_jll.libopenblas_path, "OCTAVE_HOME"=>Octave_jll.artifact_dir) do
           run(Octave_jll.octave_cli())
       end
GNU Octave, version 9.3.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "aarch64-apple-darwin20".

Home page:            https://octave.org
Support resources:    https://octave.org/support
Improve Octave:       https://octave.org/get-involved

For changes from previous versions, type 'news'.

octave:1> rand(2)+rand(2)
ans =

   1.7363   1.2488
   1.1367   1.1966

octave:2> 

ViralBShah avatar Jan 31 '25 22:01 ViralBShah

Minor nitpick: I warmly recommend using addenv over withenv, the former is thread-safe, the latter isn't. I personally had bad experiences with withenv, if the process dies unexpectedly, you can end up with a broken ENV which breaks everything.

giordano avatar Jan 31 '25 22:01 giordano