Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-07-14 11:36:51



Reply to topic  [ 5 posts ] 
SDL2-compat and the clipboard 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 392
Location: Columbus area, OH, USA
Reply with quote
My distro recently switched to using the SDL2 compatibility package which maps functionality to SDL3. When building Cool VL Viewer with --usesystemlibs, the resulting viewer's clipboard functionality doesn't work. The viewer will hang for a few moments when ctrl+V or even when using the context menu Paste. It also will not copy anything highlight and ctrl+C or, again, via the context menu. This happens across any text input area within the viewer, from chat input to Script/Notecard editing. My Space Navigator seems to work correctly, however (which I believe also depends on SDL).

I build with: ./linux-build.sh --usesystemlibs --tune --clang --lto

Code:
Cool VL Viewer v1.32.2.50, Jun 14 2025 14:31:22
Release notes
Binaries and directories in use

CPU: AMD Ryzen 7 3700X 8-Core Processor (4399 MHz)
Memory: 64212MB
OS version: Linux-x86_64 v6.14.9-300.fc42.x86_64
Memory manager: jemalloc v5.3.1-20250604
Graphics: NVIDIA GEFORCE GTX 1080 TI/PCIE/SSE2
OpenGL version: 4.6.0 NVIDIA 575.57.08
Detected VRAM: 11264MB
J2C decoder: OpenJPEG: 1.4.0.635f
Audio driver: OpenAL v1.1 ALSOFT 1.24.2 (OpenAL Soft: OpenAL Soft)
Networking backend: libcurl 7.64.1/OpenSSL 1.1.1w/zlib-ng 2.2.4/nghttp2 1.47.0
Browser plugin: Dullahan 1.13.3/CEF 137.0.17/Chromium 137.0.7151.104

Built with: Clang/LLVM v20.1.6
Compiler-generated maths: AVX2.

Compile flags used for this build:
-O3 -fno-delete-null-pointer-checks -mno-retpoline -mno-retpoline-external-thunk -mno-lvi-cfi -mno-lvi-hardening -DNDEBUG -flto=thin -march=native -std=c++17 -fno-stack-protector -fcf-protection=none -U_FORTIFY_SOURCE -fno-threadsafe-statics -fPIC -pipe -g -fexceptions -fno-strict-aliasing -fvisibility=hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -fuse-ld=gold  -DLL_LINUX=1 -DLL_JEMALLOC=1 -DLL_OPENAL=1


I'm attaching a log where I tried multiple copies/paste activities, though I don't see anything that might point to the issue. I have also searched that project's issues and haven't seen other reporting anything related to clipboard functionality. And inspected my system's journal for any hint about what is failing but have found no clues.

This is certainly NOT critical. It's easily avoided by building without --usesystemlibs OR by copying or linking the SLD2 lib provided by the official build into the appropriate lib folder, which implies a potential bug in the 2.32.56 version that I have.


Attachments:
CoolVLViewer.zip [28.4 KiB]
Downloaded 18 times
2025-06-14 19:02:10
Profile

Joined: 2009-03-17 18:42:51
Posts: 6007
Reply with quote
Do NOT use the SDL3 "compatibility" package to build the viewer. This won't work.

SDL's own clipboard functions are also plain broken, so the Cool VL Viewer uses its (my) own clipboard implementation, via Xlib, but it relies on SDL_SetEventFilter() actually properly passing the copy/paste events to the Xlib clipboard callback; this is likely what got broken by SDL3 (and therefore the compatibility library layer using SDL3).

If you want to keep building the viewer with your system's library despite the "compatibility" package, you can edit indra/cmake/LLWindow.cmake and replace all occurrences of "USESYSTEMLIBS" with some other dummy variable name (e.g; "DUMMY"): this will cause the build system to use the pre-built SDL2 viewer package.

I will see if I can auto-detect such "compatibility" libraries and automatically exclude them with USESYSTEMLIBS...


2025-06-14 20:23:40
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 392
Location: Columbus area, OH, USA
Reply with quote
Thanks for the background info. I thought I recalled a forum thread or discussion about clipboard functionality and it using your own version. I may have not gone back far enough though when searching. I did find the thread about the emoji copying, which might have been what was hazy in my memory.

Unfortunately Fedora has stopped providing plain SDL2 (non-compatibility version) and many of the packages I have installed depend on it, namely Wine...so Voice.

I'll modify my cmake as you suggest. With --patches, I can 'automate' that for future releases, if detection isn't an option.


2025-06-14 21:21:46
Profile

Joined: 2009-03-17 18:42:51
Posts: 6007
Reply with quote
I sadly did not find any reliable way to detect the SDL2 compatibility library with cmake.

But with today's release (1.32.2.53) you can now exclude specific system libraries from being used by the build system, via new "USEPREBUILT*" cmake variables (see the list in linden/indra/cmake/Variables.cmake) and a new feature of the build script to allow passing custom cmake options after a double-dash (" -- ") in the command line.

In your case, simply use:
Code:
./linux-build.sh -u -- -DUSEPREBUILTSDL=ON


2025-07-12 08:42:20
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 392
Location: Columbus area, OH, USA
Reply with quote
Thanks Henri. The new methodology works well for me. I can see the build output finding my various local libs for OpenAL, OpenGL, GStreamer, etc. and even my self-built, SDL3-updated, dynamic libndofdev lib while still using:
Code:
Processing libSDL2-2.0.so.0.*.* => libSDL2-2.0.so.0 ... 1 files


2025-07-12 14:06:40
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.