Subject: bug#50897: Octave package installation

From: Guillaume Le Vaillant <[email-masked]>
Date: Sun, 10 Oct 2021 20:56:17 +0000

Zacchaeus Scheffer <[email-masked]> skribis:

> Hi Guix!
>
> After installing octave, I tried to install the image package in octave in
> two ways.  One by running:
>> pkg install image-<version#>.tar.gz
> where image-<version#>.tar.gz is in my cwd.  I also tried installing with:
>> pkg install -forge image
> In both cases, I had the same problem.  The first error I was getting was:
>>configure: error: in `/tmp/oct-6RV451/image-2.12.0/src':
>>configure: error: C++ compiler cannot create executables
>
> This error can be fixed by installing gcc-toolchain.  After doing so,
> attempting to install image gives:
>>ld: cannot find -loctinterp
>>ld: cannot find -loctave
> repeatedly (full output below).  These libraries seem like they should be
> included in the octave installation, and also like they should be absolute
> paths.  I looked for any instance of octinterp in filenames and found these
> in the octave install:
> ./include/octave-6.2.0/octave/liboctinterp-build-info.h
> ./lib/octave/6.2.0/liboctinterp.la
> ./lib/octave/6.2.0/liboctinterp.so.8.0.1
> ./lib/octave/6.2.0/liboctinterp.so
> ./lib/octave/6.2.0/liboctinterp.so.8
> ./lib/pkgconfig/octinterp.pc
> I tried installing image with these in my cwd, but no dice.  Even if these
> are the correct library files, octave is installing this in my user
> directory so the cwd won't be the same.
>
> I need this to work for a class, so I'm willing to put in some hours (days)
> to make this work, but I'm pretty lost if anyone has ideas on where to go
> next.
>
> Thanks,
> Zacchae

Hi,

I was able to build an octave package after specifying the location of
the required libraries using the LDFLAGS environment variable:

--8<---------------cut here---------------start------------->8---
export LDFLAGS=-L${GUIX_PROFILE}/lib/octave/6.2.0
octave
pkg install xyz.tar.gz
pkg load xyz
--8<---------------cut here---------------end--------------->8---

However, it would be better to have an octave-build-system making Guix
able to build, install and setup Octave packages (e.g. Octave Forge
packages).