Need help create SciDAVis flatpak

Hello,

I am trying to build Flatpak for SciDAVis, a scientific and data plotting software.

I failed to compile it.

In file included from src/ImageMarker.cpp:30:
src/ImageMarker.h:32:10: fatal error: qwt_plot.h: No such file or directory
32 | #include <qwt_plot.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:4234: …/tmp/libscidavis/ImageMarker.o] Error 1
make[1]: *** Waiting for unfinished jobs…
In file included from src/ArrowMarker.h:32,
from src/ArrowMarker.cpp:29:
src/PlotEnrichement.h:32:10: fatal error: qwt_plot.h: No such file or directory
32 | #include <qwt_plot.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:4230: …/tmp/libscidavis/ArrowMarker.o] Error 1
src/Cone3D.cpp:30:10: fatal error: qwt3d_color.h: No such file or directory
30 | #include <qwt3d_color.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:4339: …/tmp/libscidavis/Cone3D.o] Error 1
src/TitlePicker.cpp:31:10: fatal error: qwt_plot.h: No such file or directory
31 | #include <qwt_plot.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:3875: …/tmp/libscidavis/TitlePicker.o] Error 1
src/Bar.cpp:31:10: fatal error: qwt3d_color.h: No such file or directory
31 | #include <qwt3d_color.h>
| ^~~~~~~~~~~~~~~
compilation terminated.

This is because it cannot find qwt. However, SciDAVis already include this in their github 3rd party submodule.

How do I tell flatpak-builder to download git submodules for the source file? Because scidavis have 3rd party dependency link to it, and it need that to build.

This is my current io.github.highperformancecoder.SciDAVis.yaml file.

app-id: io.github.highperformancecoder.SciDAVis
runtime: org.kde.Platform
sdk: org.kde.Sdk
runtime-version: '5.15'
command: scidavis

finish-args:
  - --share=ipc
  - --socket=x11
  - --device=dri
  - --env=SESSION_MANAGER= # required to avoid Qt warning
  - --filesystem=home

modules:
  - name: gsl
    config-opts:
      - --disable-static
    cleanup:
      - /bin
    sources:
      - type: archive
        url: https://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz
        sha256: b782339fc7a38fe17689cb39966c4d821236c28018b6593ddb6fd59ee40786a8

  - shared-modules/glu/glu-9.json
  
  - name: scidavis
    buildsystem: "qmake"
    disable-submodules: OFF
    build-options:
      env:
        - QMAKEPATH=/app/lib
    sources:
      - type: git
        url: https://github.com/highperformancecoder/scidavis.git
        tag: "2.3.0"
        commit: aa0e5c0146846b82872d493053c6efb7d5709317
        sha256: 'cc54a8dafeb3dab432ff7a548171f6504038b9de2a07d396bdb604d9a2796f64'

Thank you.

I also asked SciDAVis here: https://sourceforge.net/p/scidavis/discussion/708155/thread/7e5e20d0c3/

This I see:

disable-submodules you only want to use that to disable them. Also it’s a boolean so OFF isn’t a proper value. Also it’s in the wrong place it should be in the ‘source’ section.

flatpak-build show these two warning errors:

(flatpak-builder:1667511): flatpak-builder-WARNING **: 10:44:59.265: Unknown property disable-submodules for type BuilderModule

(flatpak-builder:1667511): flatpak-builder-WARNING **: 10:44:59.265: Unknown property sha256 for type BuilderSourceGit

My experience with qmake in general is that I have to patch the .pro to work.

I think at that point I’d build Qwt part of the flatpak instead, like it recommended in the INSTALL.md file

Just to add it seems that the qmake file won’t try to build it, so that’s the right approach. Probably still need to patch it all, it seems to assume things are in /usr/lib

Thanks for reply.

SciDAVis is adding cmake support in master branch. I will use that instead, because it fix qwt build issue.
I will have to ask the dev to bundle the 3rdparty dependencies to github release. Hopefully, the next scidavis release will solved that.

There are other issue I encounter still. Like missing Python support even if I add Python dependencies. Can I make cmake output more verbose? I want to see if the flag I use is working.

https://sourceforge.net/p/scidavis/discussion/708155/thread/a41121371c/

The dev suggest that missing python support might cause by missing python development libraries. Is it bundled by default or do I have to add extra modules?

Dev also suggest add python interpreter with the PYTHON environment variable: “env
PYTHON=python3 cmake .” Is using build-options and env: the correct way to use it?

  - name: scidavis
    buildsystem: cmake
    build-options:
      cflags: -DSCRIPTING_PYTHON:BOOL=ON -DORIGIN_IMPORT:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
      env:
        PYTHON: python3
    sources:
      - type: dir
        path: scidavis

Or maybe add this?
finish-args:
- --env=PYTHONPATH=/app/packages/python

Both option does not work. No clue.

Hi, do you know how do I pass export PYTHON=python3 just before scidavis start building?
I think I use this wrong.

  - name: scidavis        
    buildsystem: cmake
    build-options:
      env:
         - export PYTHON=python3
         - CONFIG+=liborigin
      cflags: -DSCRIPTING_PYTHON:BOOL=ON -DORIGIN_IMPORT:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DVERBOSE=1 
    sources:
      - type: git
        url: https://github.com/highperformancecoder/scidavis

This topic was automatically closed after 6 days. New replies are no longer allowed.