Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPUViewer built with flatpak #19

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

winehub
Copy link

@winehub winehub commented Jan 2, 2019

I found this tool usefull to see in graphical style the gpu information. So I made flatpak for it.

flatpak images needs a domain, that's why I put online.winehub into the front.
I'm the holder of this domain.

The "real code" is untouched and in the appdata you are the developer of that tool.

No GPL issue.

Only run "make"

then flatpak run flatpak run online.winehub.GPUViewer and you see the resources from freedesktop "flathub".

@arunsivaramanneo
Copy link
Owner

There's already a Flatpak App flathub/flathub#675 but it doesn't work fine.. let me check if yours is working fine

@arunsivaramanneo
Copy link
Owner

I tried running make but getting the below error
flatpak-builder build online.winehub.GPUViewer.yml --force-clean --user --install
Can't parse 'online.winehub.GPUViewer.yml': :1:6: Parse error: unexpected identifier `app-id', expected value
Makefile:6: recipe for target 'gpu-viewer' failed
make: *** [gpu-viewer] Error 1

@winehub
Copy link
Author

winehub commented Jan 3, 2019

revert everything back to json. Not matter you can try this one.

@winehub
Copy link
Author

winehub commented Jan 3, 2019

both are working for me. You need to install fdo sdk for that task.

@winehub
Copy link
Author

winehub commented Jan 3, 2019

There is a problem with vulkan and opencl in the next weeks this will be fixed. I did the nvidia/amd/intel vulkan fix. Opencl is on the way.

@winehub
Copy link
Author

winehub commented Jan 3, 2019

What does this mean is: icd from vulkan only found for nvidia and opencl was "dead".

@arunsivaramanneo
Copy link
Owner

Its working bit now .. but ran into this,

Downloading ftp://ftp.freedesktop.org/pub/mesa/demos/mesa-demos-8.4.0.tar.bz2
Failed to download sources: module mesa-demos: Unsupported URI scheme “ftp”
Makefile:6: recipe for target 'gpu-viewer' failed
make: *** [gpu-viewer] Error 1

the ftp url works just fine when we use it through browser, i will look into it today

@arunsivaramanneo
Copy link
Owner

Thanks , its amost there... looks like this is the last issue i am seeing

Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
[21/21] Linking target cairo/_cairo.cpython-37m-x86_64-linux-gnu.so.
[0/1] Installing files.
Installing cairo/_cairo.cpython-37m-x86_64-linux-gnu.so to /app/lib/python3.7/site-packages/cairo
Installing /run/build/pycairo/_flatpak_build/cairo/py3cairo.h to /app/lib/python3.7/site-packages/cairo/include
Installing /run/build/pycairo/_flatpak_build/cairo/py3cairo.h to /app/include/pycairo
Installing /run/build/pycairo/_flatpak_build/pycairo-1.18.0.egg-info to /app/lib/python3.7/site-packages
Installing /run/build/pycairo/cairo/init.py to /app/lib/python3.7/site-packages/cairo
Installing /run/build/pycairo/cairo/init.pyi to /app/lib/python3.7/site-packages/cairo
Installing /run/build/pycairo/cairo/py.typed to /app/lib/python3.7/site-packages/cairo
Installing /run/build/pycairo/_flatpak_build/meson-private/py3cairo.pc to /app/lib/pkgconfig
compressing debuginfo in: /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-mgBnd2/files/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so
Warning: eu-elfcompress not installed, will not compress debuginfo
stripping /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-mgBnd2/files/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so to /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-mgBnd2/files/lib/debug/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so.debug
Error: module pycairo: Failed to execute child process “eu-strip” (No such file or directory)
Makefile:6: recipe for target 'gpu-viewer' failed
make: *** [gpu-viewer] Error 1

@winehub
Copy link
Author

winehub commented Jan 5, 2019

Did you forgotten to update flatpak by:

flatpak update

the output confused me a little bit.

flatpak-builder --version
flatpak-builder 1.0.1

@arunsivaramanneo
Copy link
Owner

Ah ok .. I did Flatpak update .. but the version i am getting is flatpak-builder 0.10.9, looks like Linux Mint has older flatpak builder in repo's

@winehub
Copy link
Author

winehub commented Jan 5, 2019

I got no Mint here, but found a post with:

apt add-repository ppa:alexlarsson/flatpak
apt update
apt install flatpak

(https://forums.linuxmint.com/viewtopic.php?t=229637)

@arunsivaramanneo
Copy link
Owner

I already added that .. but they have issues with the GPG keys .. Have to report it and check... Will keep you updated... Thanks a lot

@arunsivaramanneo
Copy link
Owner

I got latest Flatpak builder version installed... Still getting the below error

flatpak-builder build online.winehub.GPUViewer.json --force-clean --user --install
Downloading sources
Downloading https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 611 0 611 0 0 36 0 --:--:-- 0:00:16 --:--:-- 145
100 197k 100 197k 0 0 5744 0 0:00:35 0:00:35 --:--:-- 51278
Downloading https://cairographics.org/releases/cairo-1.16.0.tar.xz
100 40.0M 100 40.0M 0 0 211k 0 0:03:13 0:03:13 --:--:-- 126k
Downloading https://download.gnome.org/sources/pygobject/3.30/pygobject-3.30.4.tar.xz
100 366 100 366 0 0 21 0 0:00:17 0:00:16 0:00:01 86
100 532k 100 532k 0 0 24644 0 0:00:22 0:00:22 --:--:-- 138k
Downloading https://mesa.freedesktop.org/archive/demos/mesa-demos-8.4.0.tar.bz2
100 9837k 100 9837k 0 0 173k 0 0:00:56 0:00:56 --:--:-- 191k
Initialized empty Git repository in /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/git/https_github.com_KhronosGroup_OpenCL-Headers-GB2MVZ/
Fetching git repo https://github.com/KhronosGroup/OpenCL-Headers, ref refs/heads/master
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 9), reused 6 (delta 2), pack-reused 0
Unpacking objects: 100% (20/20), done.
From https://github.com/KhronosGroup/OpenCL-Headers

  • [new branch] master -> master
    Downloading https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz
    100 128 0 128 0 0 7 0 --:--:-- 0:00:16 --:--:-- 31
    100 41459 0 41459 0 0 1221 0 --:--:-- 0:00:33 --:--:-- 11020
    Downloading https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/sdk-1.1.73.0.tar.gz
    100 159 0 159 0 0 584 0 --:--:-- --:--:-- --:--:-- 584
    100 3314k 0 3314k 0 0 460k 0 --:--:-- 0:00:07 --:--:-- 621k
    Downloading https://github.com/arunsivaramanneo/GPU-Viewer/archive/v1.15.tar.gz
    100 134 0 134 0 0 485 0 --:--:-- --:--:-- --:--:-- 130k
    100 579k 0 579k 0 0 475k 0 --:--:-- 0:00:01 --:--:-- 475k
    Initializing build dir
    Committing stage init to cache
    Starting build of online.winehub.GPUViewer
    ========================================================================
    Building module pycairo in /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/build/pycairo-1
    ========================================================================
    The Meson build system
    Version: 0.48.2
    Source dir: /run/build/pycairo
    Build dir: /run/build/pycairo/_flatpak_build
    Build type: native build
    Project name: pycairo
    Project version: 1.18.0
    Appending CFLAGS from environment: '-march=x86-64 -mtune=generic -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'
    Appending LDFLAGS from environment: '-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed'
    Native C compiler: ccache cc (gcc 8.2.0 "cc (GCC) 8.2.0")
    Build machine cpu family: x86_64
    Build machine cpu: x86_64
    Compiler for C supports arguments -Wall: YES
    Compiler for C supports arguments -Warray-bounds: YES
    Compiler for C supports arguments -Wcast-align: YES
    Compiler for C supports arguments -Wconversion: YES
    Compiler for C supports arguments -Wdeclaration-after-statement: YES
    Compiler for C supports arguments -Wextra: YES
    Compiler for C supports arguments -Wformat=2: YES
    Compiler for C supports arguments -Wformat-nonliteral: YES
    Compiler for C supports arguments -Wformat-security: YES
    Compiler for C supports arguments -Wimplicit-function-declaration: YES
    Compiler for C supports arguments -Winit-self: YES
    Compiler for C supports arguments -Winline: YES
    Compiler for C supports arguments -Wmissing-format-attribute: YES
    Compiler for C supports arguments -Wmissing-noreturn: YES
    Compiler for C supports arguments -Wnested-externs: YES
    Compiler for C supports arguments -Wold-style-definition: YES
    Compiler for C supports arguments -Wpacked: YES
    Compiler for C supports arguments -Wpointer-arith: YES
    Compiler for C supports arguments -Wreturn-type: YES
    Compiler for C supports arguments -Wshadow: YES
    Compiler for C supports arguments -Wsign-compare: YES
    Compiler for C supports arguments -Wstrict-aliasing: YES
    Compiler for C supports arguments -Wundef: YES
    Compiler for C supports arguments -Wunused-but-set-variable: YES
    Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
    Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
    Compiler for C supports arguments -fno-strict-aliasing: YES
    Compiler for C supports arguments -fvisibility=hidden: YES
    Compiler for C supports arguments -Wswitch-default: YES
    Configuring pycairo-1.18.0.egg-info using configuration
    Found pkg-config: /usr/bin/pkg-config (1.5.3)
    Dependency python found: YES (pkgconfig)
    Dependency cairo found: YES 1.16.0
    Build targets in project: 2
    Found ninja-1.8.2 at /usr/bin/ninja
    [0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[0/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[1/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[1/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[2/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[2/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[3/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[3/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[4/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[4/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[5/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[5/21] Compiling C object 'tests/tests@@cmod.cpython-37m-x86_64-linux-gnu@sha/cm[6/21] Compiling C object 'tests/tests@@cmod.cpython-37m-x86_64-linux-gnu@sha/cm[6/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[7/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[7/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[8/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[8/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[9/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[9/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha/[10/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[10/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[11/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[11/21] Compiling C object 'tests/tests@@cmod.cpython-37m-x86_64-linux-gnu@sha/c[12/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[13/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[14/21] Compiling C object 'tests/tests@@cmod.cpython-37m-x86_64-linux-gnu@sha/c[15/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[16/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[18/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[19/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[20/21] Compiling C object 'cairo/cairo@@_cairo.cpython-37m-x86_64-linux-gnu@sha[21/21] Linking target cairo/_cairo.cpython-37m-x86_64-linux-gnu.so.
    [0/1] Installing files.
    Installing cairo/_cairo.cpython-37m-x86_64-linux-gnu.so to /app/lib/python3.7/site-packages/cairo
    Installing /run/build/pycairo/_flatpak_build/cairo/py3cairo.h to /app/lib/python3.7/site-packages/cairo/include
    Installing /run/build/pycairo/_flatpak_build/cairo/py3cairo.h to /app/include/pycairo
    Installing /run/build/pycairo/_flatpak_build/pycairo-1.18.0.egg-info to /app/lib/python3.7/site-packages
    Installing /run/build/pycairo/cairo/init.py to /app/lib/python3.7/site-packages/cairo
    Installing /run/build/pycairo/cairo/init.pyi to /app/lib/python3.7/site-packages/cairo
    Installing /run/build/pycairo/cairo/py.typed to /app/lib/python3.7/site-packages/cairo
    Installing /run/build/pycairo/_flatpak_build/meson-private/py3cairo.pc to /app/lib/pkgconfig
    compressing debuginfo in: /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-F0XrRV/files/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so
    Warning: eu-elfcompress not installed, will not compress debuginfo
    stripping /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-F0XrRV/files/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so to /home/neothenoone/Downloads/GPU-Viewer-5086bfbaa5c372957fa1c80bf20a5b5f057e8220/.flatpak-builder/rofiles/rofiles-F0XrRV/files/lib/debug/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so.debug
    Error: module pycairo: Failed to execute child process “eu-strip” (No such file or directory)
    Makefile:6: recipe for target 'gpu-viewer' failed

@arunsivaramanneo
Copy link
Owner

I got the Installation to complete successfully , i just had to install elfutils to resolve the issue mentioned above... Now i need to test the application... only thing i have unable find where the application is installed

@winehub
Copy link
Author

winehub commented Jan 6, 2019 via email

@arunsivaramanneo
Copy link
Owner

That Worked .. However, still has the same issue as the other Flatpak, it shows the driver information of the drivers installed in Flatpak environment which seems expected for a flatpak application, not the one installed by the user.

flatpak run online.winehub.GPUViewer
flatpak

Installing through PPA

installation through ppa

Also it does not work correctly on Nvidia Prime Systems.

@winehub
Copy link
Author

winehub commented Jan 6, 2019

Yes for intel and amd those are the drivers from mesa inside fdo. You have to go with

org.freedesktop.Platform.GL.nvidia-xxx and for steam in compat mode org.freedesktop.Platform.GL32.nvidia-xxx.

@winehub
Copy link
Author

winehub commented Jan 6, 2019

With the new version from flatpak you can use the .yml file. More easy to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants