Vigra update

Vigra needs updating. It has been patched for Fedora, but I am not able to patch it to make it usable in my application. My app’s Flatpak won’t run on org.gnome.Platform runtime-version: “41” until that happens.

Is there an archive of a patched version of Vigra anywhere? I have seen a link to a patch but wouldn’t have a clue what to do with it. https://github.com/ukoethe/vigra/issues/496

Dependencies:
App currently depends on ilmbase which needs update as C++ version it runs on is 10 years old, but it appears to have been abandoned. I could instead use a later version of OpenEXR - OpenEXR3 which doesn’t need ilmbase, but that needs an update to Vigra.

You can find the Fedora package, with the patches, here: Tree - rpms/vigra - src.fedoraproject.org

But you can also do this (as a regular user, not root, in a working directory):

sudo dnf -y install fedpkg
fedpkg clone --anonymous vigra
cd vigra
fedpkg prep

This will create a vigra-1.11.1 sub-directory which will have all of the Fedora patches applied.

3 Likes

You can find…

I think that needs me to apply patches or something, which I don’t want to tackle.

you can also do this (as a regular user

This looks like worth trying, but fails on the first command, telling me I need superuser privileges, as I would expect. Perhaps some of these commands should use su and some must not. I’ll take a chance and run them as myself first then if it fails try su.

It’s created a sub-directory of my work directory called vigra-1.11.1. I’ll make an archive of the contents of that.

Sorry, yes – that first command (dnf install) needs root. I’ve edited it to add sudo to make that clear. Confession: I already have that tool installed, so I added that to the post at the last minute and clearly was a bit hasty.

Nothing else needs to run as root.

And actually, I could have left that out — if you don’t have a command installed on Fedora Workstation and type it anyway, you should get a prompt to install it. But I figured installing it explicitly was more deterministic. Sorry about the confusion.

Yep, that should be exactly what you want — a snapshot of the Fedora source with the patches applied.

1 Like

Thanks, it’s good to get it exactly right for the next person to try this.

The compilation fails

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Building module vigra in /home/chris/.flatpak-builder/build/vigra-2
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Error: module: vigra: Can’t find CMakeLists.txt

I can see it in the archive at the top level though.

When compiling code, sometimes the process can fail due to permission issues.

Thus in addition to check the existence of the file, please also check permissions.

The error in post 5 was caused by me doing something wrong which I’ve fixed. (I can’t remember what - I’ve had to fixi problems with two related modules.)

I’m out of my depth now, I have tried this with cmake and cmake-ninja:

  - name: vigra
    buildsystem: cmake-ninja
    config-opts:
       - -DWITH_OPENEXR=ON
    sources:
      - type: archive
        path: /home/vigra-1.11.1.tar.gz
    cleanup:
      - /bin
      - /doc
      - /lib/vigra/
      - /share

In both cases it fails with errors starting with:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().

and ending with:

-- Build files have been written to: /run/build/vigra
[1/22] Building CXX object impex/CMakeFiles/vigraimpex.dir/bmp.o
FAILED: impex/CMakeFiles/vigraimpex.dir/bmp.o 
/usr/bin/c++   -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -MD -MT impex/CMakeFiles/vigraimpex.dir/bmp.o -MF impex/CMakeFiles/vigraimpex.dir/bmp.o.d -o impex/CMakeFiles/vigraimpex.dir/bmp.o -c /run/build/vigra/impex/bmp.cxx
/run/build/vigra/impex/bmp.cxx:38:10: fatal error: vigra/config.hxx: No such file or directory
   38 | #include "vigra/config.hxx"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Error: module vigra: Child process exited with code 1
1 Like