libX11's libXcursor dlopen
Petre Rodan <[email protected]> Mon, 23 Mar 2026 10:23:32 +0200
| Newsgroups | gmane.os.netbsd.devel.x11 |
|---|---|
| Message-ID | <[email protected]> |
hello, I spent two days now on tracking down a few problems I have with a fresh install of NetBSD 10.1_STABLE. this is my first install of NetBSD so please excuse my confusion. The problem I would like to tackle in this mail is related to libX11 and it's interaction to libXcursor. Upon install I quickly realized that mouse cursor settings are not getting applied to windowmaker. I got the following in my .Xresources: Xcursor.theme: Adwaita Xcursor.size: 48 these settings come into play when an application calls XCreateFontCursor() (part of Xlib / libX11) which in turn calls XCreateGlyphCursor() which according to /usr/xsrc/external/mit/libX11/dist/src/CrGlCur.c dlopens() "libXcursor.so". note the lack of version. (in the original code it searches for .1) [1] on my system however I see this: 24472 24472 example CALL open(0x7f7fff2a4618,0,6) 24472 24472 example NAMI "/usr/X11R7/lib/libXcursor.so.2" 24472 24472 example RET open 4 where does that query for version '2' of the library come from? simply compiling /usr/xsrc/external/mit/libXcursor/dist results in library version '1.0'. for some reason this version 2 does not care about xcursor sizes or themes. if however I install libXcursor-1.2.3 from packages and force it to be used via /etc/ld.so.conf reordering and a strategic symlink then the size and theme settings are applied. I'm using [2] as a test program. it requires adwaita-icon-theme and libXcursor installed. to sumarise 1. why is /usr/X11R7/lib/libX11.so loading libXcursor.so.2 instead of libXcursor.so as per the sourcecode? 2. is it normal for a NetBSD system to not even have a /etc/ld.so.conf file? I might have managed to lose it during the sysupgrade ... 3. is the xsrc set out-of-sync compared to the x11 set? they were both initially installed then sysupgrade was run. 4. where can I find the sources for that elusive libXcursor.so.2 that comes with the x11 set? [1] https://github.com/mirror/libX11/blob/ff8706a5eae25b8bafce300527079f68a201d27f/src/CrGlCur.c#L58 [2] https://pastebin.com/AZe636JK thank you. peter