Fotran modules not found VS Command not found ?!

Dear all,
hope this is the right place to ask for help, if not please just direct me to the appropriate one and I will delete this topic.

Trying to build a Flatpak for my program Atomes: https://atomes.ipcms.fr/

I am having some issue(s), the issue depending on the method I use to build the Flatpak, with the following command:

$ flatpak-builder atomes org.flatpak.atomes.yml
  1. I use the autotools buildsystem:
app-id: org.flatpak.atomes
runtime: org.freedesktop.Platform.GL.default
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
command: atomes
modules:
  - shared-modules/glu/glu-9.json
  - name: atomes 
    buildsystem: autotools
    no-autogen: true
    config-opts:
      - --enable-flatpak
    sources:
      - type: archive
        url: https://raw.githubusercontent.com/Slookeur/Atomes-flatpak-build/main/atomes-1.1.0.tar.gz
        sha256: 5be58a89f03775f22612b09199b355dd081e9ad1df4ce9f7454fffac211573e9

Then I cannot build the Flatpak, during the compilation gfortran is yelling at me that he cannot find the fortran modules (that were compiled previously, and are located in the appropriate place … go figure).
I tried to used all the related gfortran options here (-I, -J, -fintrinsic-modules-path) to try to correct this issue … nothing works, and gfortran remains unhappy, so I decided to try something else …

  1. Using the simple buildsystem
app-id: org.flatpak.atomes
runtime: org.freedesktop.Platform.GL.default
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
command: atomes
modules:
  - shared-modules/glu/glu-9.json
  - name: atomes 
    buildsystem: simple
    build-commands:
      - ./configure --prefix=/app --enable-flatpak
      - make
      - make install
    sources:
      - type: archive
        url: https://raw.githubusercontent.com/Slookeur/Atomes-flatpak-build/main/atomes-1.1.0.tar.gz
        sha256: 5be58a89f03775f22612b09199b355dd081e9ad1df4ce9f7454fffac211573e9

Then no problem to build the Flatpak !
For some reason here, gfortran is perfectly happy, no issue what so ever … but when I test it, using:

$ flatpak-builder --user --install --force-clean build-dir org.flatpak.atomes.yml
$ flatpak run org.flatpak.atomes

Then Flatpak is trying to launch the app but fails saying that it cannot find the ‘atomes’ command:

bwrap: execvp /app/bin/atomes: No such file or directory

I would really appreciate your ideas/help on the matter.
Thanks in advance.

Sébastien Le Roux

1 Like