TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
747 stars 137 forks source link

[question] Which parts of unix/Xvnc/programs/Xserver are really needed? #338

Closed Apteryks closed 1 year ago

Apteryks commented 1 year ago

Hi,

I'm trying to package this for GNU Guix, using as much as the system provided libraries as possible, so building with -DTVNC_SYSTEMX11=1 and -DTVNC_SYSTEMLIBS=1 among others. I noticed that many Xorg libraries still appear bundled under the above location (unix/Xvnc/programs/Xserver) and was wondering if those were modified or just maintained as copies from the upstream xorg-server?

Thanks!

dcommander commented 1 year ago

TVNC_SYSTEMX11 affects the dependency libraries of Xvnc. If TVNC_SYSTEMX11 is false (default), then the in-tree copies of those dependency libraries (under unix/Xvnc/lib and unix/Xvnc/extras) will be built and linked (statically in most cases) with Xvnc. If TVNC_SYSTEMX11 is true, then the system's copies of those same libraries will be linked dynamically with Xvnc. The libraries under unix/Xvnc/programs/Xserver are all static and are internal to the X server, so you can't get rid of those.

Note also: The TurboVNC Server source code includes a specific version of X.org that may not match the system's version. Regardless of the TVNC_SYSTEMX11 setting, the in-tree X.org source code will be used, because that in-tree source code has TurboVNC-specific modifications and uses CMake rather than autotools for its build system. Hypothetically, it should be possible to introduce a new setting (TVNC_SYSTEMXORG) to allow for the use of a distribution-specific X.org code base, but that would require some hackery, such as using CMake's ExternalProject_Add() function to build the X.org code with autotools and including a TurboVNC-specific patch for each major X.org release (as TigerVNC does.) There hasn't been any demand for such a build feature, but I am open to it.

dcommander commented 1 year ago

Another setting you'll want to use if you are building a distribution-specific version of Xvnc is -DTVNC_DLOPENSSL=0, which will cause Xvnc to be linked with the specific version of OpenSSL in your O/S distribution. (If TVNC_DLOPENSSL is true, which it is by default, then the TurboVNC Server will search for various known versions of OpenSSL and dynamically load the best one. That reflects the fact that the default/official builds of TurboVNC are designed to be cross-distribution.)

Apteryks commented 1 year ago

Thank you for taking the time to answer in detail! I understand the impedance mismatch between Autotools (of Xorg) and CMake (of this project), and how that would complicate the process of dropping my own copy of Xorg under unix/Xvnc/programs/Xserver and applying the TurboVNC specific patch.

The package is complete and everything seems to be working. I'll open a ticket with the packaging complications I faced, so that these issues can be fixed, in time. Thanks again!