Return to

[Solved] How to compile looking glass client?

the instructions on the official guide dont work. does anybody have a WORKING guide to compile the client?
the instructions on the website give the error

/usr/bin/ld: displayservers/X11/libdisplayserver_X11.a(x11.c.o): in function `x11GLSetSwapInterval':
x11.c:(.text.x11GLSetSwapInterval+0x23): undefined reference to `glXSwapIntervalEXT'
/usr/bin/ld: renderers/EGL/librenderer_EGL.a(texture_util.c.o): in function `egl_texUtilGenBuffers':
texture_util.c:(.text.egl_texUtilGenBuffers+0x88): undefined reference to `glBufferStorageEXT'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/looking-glass-client.dir/build.make:407: looking-glass-client] Error 1
make[1]: *** [CMakeFiles/Makefile2:326: CMakeFiles/looking-glass-client.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

after using “make” in the build directory.

Have you installed all necessary dependencies?

1 Like

yes. at least all of the dependencies the website claims i need.

Why are you trying to compile on your own?

Did you install the following dependencies?:

1 Like

if there were a prebuilt client download i wouldnt be attempting to compile my own.
i have an already-made client of an older version, but there’s some version check it does that closes itself when it tries to interact with my new and up-to-date Windows VM. thus the need to recompile an up-to-date client.

Where did you get the sources?

from git, using the command in the compilation guide. git clone --recursive

i tried doing the recommended thing and downloading the source code zip from the releases page. but that method fails at cmake. this git method gets farther.

If you are not a developer use the sources from the download page and post the output here. I am still guessing you have not all dependencies installed, which distribution are you on?

1 Like

Debian 11.
im gonna re-try using the releases page, after i apt --reinstall all the deps.

UPDATE: after apt --reinstall the deps, the client from the releases page compiles but doesnt work.

./looking-glass-client -f /dev/uio0
[I]   7956114162              main.c:1064 | main                           | Looking Glass (B4)
[I]   7956114198              main.c:1065 | main                           | Locking Method: Atomic
[I]   7956114985           ivshmem.c:127  | ivshmemOpenDev                 | KVMFR Device     : /dev/uio0
[E]   7956115015           ivshmem.c:168  | ivshmemOpenDev                 | Failed to map the shared memory device: /dev/uio0
[E]   7956115022           ivshmem.c:169  | ivshmemOpenDev                 | Invalid argument
[E]   7956115026              main.c:711  | lg_run                         | Failed to map memory

this makes no change when trying to build from git.

ls -al /dev/uio0

1 Like

crw------- 1 mathew2214 root 245, 0 Aug 17 09:47 /dev/uio0

this is the setup that worked on the old LG client.

No, I am not going to debug this further with you. Please follow the instructions on the site, or provide us information in what way you have deviated from the instructions. Neither the filename seems to fit, why ever you had to change that, nor do the GID or permissions seem to be set the way described in the instructions. The error messages indicate that the application can’t handle you shared memory file.

1 Like

please forgive my ignorance, i assumed since this worked with the old verison, the following information wouldnt at all impact simply trying to update my looking glass.

my client is a Linux VM on a Linux Host, alongside my Windows VM.
/dev/uio0 is what was created on the VM when i added Looking glass’ to the Linux VM’s xml way back when. both VMs have identical Looking Glass blocks in their XML.

/dev/shm/looking-glass exists on the host and is
-rw-r–r-- 1 root libvirt-qemu 32M Aug 17 12:54 /dev/shm/looking-glass
the group is not set to kvm because libvirt-qemu is the appropriate user in my specific setup.

I don’t get what you are doing. The LG client goes on the host, the server on the guest. You have to compile the client on the host and just run ./looking-glass no need for a -fflag if you don’t have a different shm file. Also it seems you would need to run sudo ./looking-glass since you did not give your user write permissions for the file. Only root has write permissions for /dev/shm/looking-glass from what you posted.

my host has no video output, my main desktop i am trying to control the Windows VM with is another VM, which runs linux. VM-to-VM. this worked perfectly on old versions.
running the client on the host directly is not an option in my case.

I see, then the permissions of the file on the host should be fine. The VM that runs the server should be fine also, if you have setup the server properly. I however do not know what settings you need to access the shm file from another Linux VM.

What happends when you run ./looking-glass on the client VM?

1 Like
[I]     68065626              main.c:1064 | main                           | Looking Glass (B4)
[I]     68065659              main.c:1065 | main                           | Locking Method: Atomic

Invalid value provided to the option: app:shmFile

 Error: Invalid path to the ivshmem file specified

Valid values are:

i think it looks for /dev/shm/looking-glass, which does not exist on the Linux VM. it is /dev/uio0.

Sorry then I can’t help you further. I have no prior experience with a setup like this. But from what I read the first time you tried to run this command including the -f flag, it had problems with you shared memory file. I think the compilation went successful.

1 Like

so then i guess the breaking/removal of this functionality is just a property of the newer LG? problem for another thread then.