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
looking-glass-client: init at a10 #34386
Conversation
@GrahamcOfBorg build looking-glass-client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure on x86_64-darwin (full log)
Partial log (click to expand)
Package ‘looking-glass-client-a10’ in /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/virtualization/looking-glass-client/default.nix:30 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success on x86_64-linux (full log)
Partial log (click to expand)
gcc -o bin/looking-glass-client .build/main.o .build/lg-renderer.o .build/spice/spice.o .build/renderers/opengl.o -lrt -Wl,--gc-sections -L/nix/store/rb4vsahgqn5q4nq5k01vfqi6aiin4ax8-libX11-1.6.5/lib -L/nix/store/jp8i5dski55f02cn2xiyw0dpb3xn8xi0-mesa-noglu-17.2.8/lib -L/nix/store/gjdf0gwada330nyjmnzyrnz5vbhscn5a-glu-9.0.0/lib -L/nix/store/pan0vwrvh40ciqfyjzrdjl9bxwbgc3jw-SDL2-2.0.7/lib -L/nix/store/v4g1iqhh5y35ccc73bs82flijyvva2ys-SDL2_ttf-2.0.14/lib -L/nix/store/j705knck72ps4gpzk2jiswxj5nibxnqv-openssl-1.0.2n/lib -L/nix/store/2x3ia1b25g1wbmyks1llh9ns9qha7chw-fontconfig-2.12.1-lib/lib -L/nix/store/giigsd4cy3mb40v67albhiwc63s9djjj-freetype-2.7.1/lib -lSDL2_ttf -Wl,-rpath,/nix/store/pan0vwrvh40ciqfyjzrdjl9bxwbgc3jw-SDL2-2.0.7/lib -Wl,--enable-new-dtags -lSDL2 -lGLU -lGL -lssl -lcrypto -lfontconfig -lfreetype -lX11
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10
shrinking /nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10/bin/looking-glass-client
strip is /nix/store/mdyy001q67hiks0g24ra53z7ckm4jfr4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10/bin
patching script interpreter paths in /nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10
checking for references to /tmp/nix-build-looking-glass-client-a10.drv-0 in /nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10...
/nix/store/9589wnn29z0f1p9rc5fjnxg33x9pn6ly-looking-glass-client-a10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure on aarch64-linux (full log)
Partial log (click to expand)
gcc -c -g -O3 -std=gnu99 -march=native -Wall -Werror -I./ -I../common -DDEBUG -DATOMIC_LOCKING -ffast-math -fdata-sections -ffunction-sections -D_REENTRANT -I/nix/store/xn25kk9caf7zk6mbh8qgn2n58yp911df-xproto-7.0.31/include -I/nix/store/vigch5qpv3npz1ag242v8zf7ivmgypq5-libX11-1.6.5-dev/include -I/nix/store/1gl2k79lnqw532zb669rd16jwh39hca3-kbproto-1.0.7/include -I/nix/store/0hs365gafy1i2hdkm1q1qgh0z5m3v6x9-mesa-noglu-17.2.8-dev/include -I/nix/store/vsgbzdpsaixa17wg2pi44sr96vqgijjv-glu-9.0.0-dev/include -I/nix/store/dpy97pfjypxiilsb88dmk8c2va2cnadv-SDL2-2.0.7-dev/include/SDL2 -I/nix/store/5mmg1z9r5wyrnzfyr66gb0vw2nzwkpsh-SDL2_ttf-2.0.14/include/SDL2 -I/nix/store/sk5fk2pv7kg7vq1gjag3791hql2fg63d-openssl-1.0.2n-dev/include -I/nix/store/m2i1myz7sv5hiama0p29ch6phcdc68bb-spice-protocol-0.12.13/include/spice-1 -I/nix/store/z3m4gria37mw09609mzfrb6n3dp9j6f5-fontconfig-2.12.1-dev/include -I/nix/store/p88as78q8sdd15lkgk82npv4g23jw2rz-expat-2.2.5-dev/include -I/nix/store/mzgr9k3765dy4zjd4vpij70qpsj5rlq0-freetype-2.7.1-dev/include/freetype2 -DBUILD_VERSION='""' -o .build/renderers/opengl.o renderers/opengl.c
In file included from renderers/opengl.c:33:0:
../common/memcpySSE.h:24:23: fatal error: tmmintrin.h: No such file or directory
#include <tmmintrin.h>
^
compilation terminated.
make: *** [Makefile:28: .build/renderers/opengl.o] Error 1
make: *** Waiting for unfinished jobs....
builder for '/nix/store/cyyhkn96gfgackxgnpjvnrw099qq47c3-looking-glass-client-a10.drv' failed with exit code 2
error: build of '/nix/store/cyyhkn96gfgackxgnpjvnrw099qq47c3-looking-glass-client-a10.drv' failed
src = fetchFromGitHub { | ||
owner = "gnif"; | ||
repo = "LookingGlass"; | ||
rev = "a10"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could reuse version
here.
sha256 = "10jxnkrvskjzkg86iz3hnb5v91ykzx6pvcnpy1v4436g5f2d62wn"; | ||
}; | ||
|
||
buildInputs = [ pkgconfig SDL SDL2 SDL2_ttf openssl spice_protocol fontconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkgconfig
should go to nativeBuildInputs
.
for legacy programs that require high performance graphics. | ||
''; | ||
homepage = https://looking-glass.hostfission.com/; | ||
license = licenses.gpl2Plus; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a source for this? The website only seems to talk about GPL 2:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main.c file of the client says "either version 2 of the License, or (at your option) any later version", so I assumed that meant GPL-2.0+.
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec { | |||
src = fetchFromGitHub { | |||
owner = "gnif"; | |||
repo = "LookingGlass"; | |||
rev = "a10"; | |||
rev = "${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use version
here if you do not append anything.
(Sorry for the code style issues, it's my first nix pull request :D) |
Thanks, this looks good. |
|
||
nativeBuildInputs = [ pkgconfig ]; | ||
|
||
buildInputs = [ SDL SDL2 SDL2_ttf openssl spice_protocol fontconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, SDL does not seem to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't include it, the build fails with:
make: *** [Makefile:29: .build/spice/spice.o] Error 1
In file included from main.c:24:0:
/nix/store/v4g1iqhh5y35ccc73bs82flijyvva2ys-SDL2_ttf-2.0.14/include/SDL2/SDL_ttf.h:34:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
^
compilation terminated.
make: *** [Makefile:29: .build/main.o] Error 1
Which seems a little weird (is the SDL2 library trying to find SDL1 headers or something?), but adding the SDL buildInput fixes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, only these seem to be used:
$ nix-store --query --references $(nix-build -A looking-glass-client)
/nix/store/z0b60y0khix9jb74ka56gw7b7n9s8awx-glibc-2.26-131
/nix/store/giigsd4cy3mb40v67albhiwc63s9djjj-freetype-2.7.1
/nix/store/2x3ia1b25g1wbmyks1llh9ns9qha7chw-fontconfig-2.12.1-lib
/nix/store/rb4vsahgqn5q4nq5k01vfqi6aiin4ax8-libX11-1.6.5
/nix/store/jp8i5dski55f02cn2xiyw0dpb3xn8xi0-mesa-noglu-17.2.8
/nix/store/gjdf0gwada330nyjmnzyrnz5vbhscn5a-glu-9.0.0
/nix/store/j705knck72ps4gpzk2jiswxj5nibxnqv-openssl-1.0.2n
/nix/store/pan0vwrvh40ciqfyjzrdjl9bxwbgc3jw-SDL2-2.0.7
/nix/store/v4g1iqhh5y35ccc73bs82flijyvva2ys-SDL2_ttf-2.0.14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you are right, those are needed by SDL2
. We should probably propagate them from there.
d3af13c
to
93532b0
Compare
Motivation for this change
An application to relay frames from a KVM VFIO virtual machine (e.g. running Windows) to a window on the Linux host using shared memory.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)