Linking OpenGL apps

Alexander Larsson alexl at redhat.com
Wed Apr 3 11:44:52 UTC 2019


On Wed, Apr 3, 2019 at 12:58 PM Alec Leamas <leamas.alec at gmail.com> wrote:
>
> Dear list,
>
> Im probably missing something simple... that said, I'm trying to flatpak
> a somewhat large application opencpn which uses OpenGL. As I understand
> it, the flatpak sandbox should support this.
>
> Alas, when I try to locate the OpenGL headers and libraries my cmake
> configuration script cannot find it. I have tried to build both against
> the org.freedesktop.Platform and org.gnome.Platform with the same result.

I'm not sure how you're trying to locate the headers, but they are in
a pretty standard place in the sdk:

$ flatpak run org.freedesktop.Sdk//18.08
[📦 org.freedesktop.Sdk ~]$ ls /usr/include/GL/gl.h
/usr/include/GL/gl.h
[📦 org.freedesktop.Sdk ~]$ ls -l /usr/lib/x86_64-linux-gnu/libGL.so.1
lrwxrwxrwx 1 alex alex 14  1 apr 11.42
/usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.7.0

However, the headers are not in the platform, you're supposed to build
in the Sdk, and then the final app is run in the platform.

> Looking into the situation using a sandbox shell I indeed cannot find
> any relevant OpenGL files under /app/include and /app/lib.

/app is where your own files will end up, the runtime is visible in
/usr in the sandbox.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                Red Hat, Inc
       alexl at redhat.com         alexander.larsson at gmail.com


More information about the Flatpak mailing list