Large cursor support is present but optional on X11
You can view, comment on, or merge this pull request online at:https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424 Commit Summary
File ChangesPatch Links:
— |
Could someone fluent in autotools double check this Should I commit the generated aclocal.m4 config.h.in and configure files? — |
On Tue, Sep 03, 2019 at 07:02:56AM -0700, Nicolas Cellier wrote: > > Could someone fluent in autotools double check this > It worked for me, but I'm very unsure. > > Should I commit the generated aclocal.m4 config.h.in and configure files? > I presume so... > I am not fluent in autotools, but if it generates the expected #define in config.h and if it results in a VM with large cursor support, that means that both the configuration for compiling and the linker options to include the necessary header are working as expected. Sorry I cannot do a better job of confirming, but if that is what you see, then yes you should commit the generated aclocal.m4 and config.h.in files. Dave |
In reply to this post by David T Lewis
@nicolas-cellier-aka-nice pushed 1 commit.
— |
In reply to this post by David T Lewis
I committed the generated configure. That does not cover the case when header would be present, but the library would be required AND absent. Should we cover that case? — |
In reply to this post by David T Lewis
Merged #424 into Cog. — |
In reply to this post by David T Lewis
On Wed, Sep 04, 2019 at 01:59:21AM -0700, Nicolas Cellier wrote: > > I committed the generated configure. > I have a doubt, it seems that I set the `-DHAVE_LIBXRENDER` define if I find the header, > then check whether the library libXrender.so is required or not (and add it to `LIBS` if required). > > That does not cover the case when header would be present, but the library would be required AND absent. Should we cover that case? > For the case of a VM compiled with HAVE_LIBXRENDER, but running on a machine that does not have the xrender library runtime, this could be a problem. In practice, I expect that any Linux machine with X11 will also provide the runtime library for xrender, but that is just a guess. To test this, I started with an interpreter VM compiled with Xrender development libraries, and with large cursor support working. I then removed (renamed) the following runtime libraries: /usr/lib/x86_64-linux-gnu/libXrender.a /usr/lib//x86_64-linux-gnu/libXrender.so /usr/lib/x86_64-linux-gnu/libXrender.so.1 /usr/lib//x86_64-linux-gnu/libXrender.so.1.3.0 Result: The VM fails to run, and crashes: lewis@lewis-Gazelle-Pro:~/squeak/Squeak4.6$ squeak squeak.175 libXrender.so.1: cannot open shared object file: No such file or directory could not find display driver vm-display-X11; either: - check that /usr/local/lib/squeak/4.16.6-3772/vm-display-X11.so exists, or - use the '-plugins <path>' option to tell me where it is, or - remove DISPLAY from your environment. Aborted (core dumped) Conclusion: If a VM with Xrender and large cursor support is run on a machine that does not have the Xrender runtime libraries, it probably will not work. In my opinion, this is not a likely failure mode. I would expect that machines that use X11 will also provide Xrender and other extensions by default. But it could happen, so it is worth noting the risk. Dave |
In reply to this post by David T Lewis
Ok, not good. That means that the VM shall attempt to link it dynamically with dlopen, and issue a message on console if that fails... on ubuntu, libXrender is an optional package, i guess similar in other distros... Or we could document the requirement and add the package dependency in squeak/pharo/cuis/newspeak packages... Or we could attempt to link statically, which would be somehow simple and robust, but not secure (no update). Or we could find another solution for displaying larger cursors. How do others apps handle those highres Screens? — |
In reply to this post by David T Lewis
The only real problem is that the VM is not issuing an understandable error message in the case of a missing runtime library. For example, if the VM module-display-X11 module requires runtime library libXrender, and if libXrender.so is not installed, then a message like this would be sufficient: $ squeak myImage
I can make this work on interpreter VM (SVN trunk) but module loading seems to have changed on oscog and I have not yet been able to make it work here. More to follow. — |
Free forum by Nabble | Edit this page |