$ flatpak run org.freedesktop.Sdk//1.6
sh-4.3$ source /usr/lib/sdk/gfortran-62/use.sh
sh-4.3$ cat >/tmp/main.f95
program main
implicit none
write(*,*) "Hello World!"
end
sh-4.3$ gfortran -o /tmp/main /tmp/main.f95
sh-4.3$ LD_LIBRARY_PATH=/usr/lib/sdk/gfortran-62/lib /tmp/main
Hello World!
As per the Octave flatpak bug linked above, things don’t necessarily work as one might hope, as the LD_LIBRARY_PATH
bit might suggest!