[OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
 

Large cursor support is present but optional on X11
It is triggered by compiler define HAVE_LIBXRENDER
It depends on availability of Xrender library which is an optional X extension
Try to test presence of header and library in configure macro
Note that it is also necessary to install the proper package
e.g. on debian flavours

sudo apt-get install libxrender-dev

You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424

Commit Summary

  • Restore support for large cursor on linux X11 VM

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW77DO54WWUQGTDXVVLQHZU3FA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI72K3Q", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW77DO54WWUQGTDXVVLQHZU3FA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI72K3Q", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
 

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...


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3ZDTJFHYBFKZBH5QTQHZVBBA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YJPYQ#issuecomment-527472610", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3ZDTJFHYBFKZBH5QTQHZVBBA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YJPYQ#issuecomment-527472610", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T. Lewis
 
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
 
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
In reply to this post by David T Lewis
 

@nicolas-cellier-aka-nice pushed 1 commit.

  • edb14fe Commit files generated by autotools


You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424/files/83497f5a6c3d7b96cbae086729dd4c849ef029ea..edb14fe404654241ef2a2bf04ae0945611d6533a?email_source=notifications\u0026email_token=AIJPEW7GN7PDYHTOQRVDK53QH5ZAJA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGMYTGNRQG44DGNKQOVZWQIZTHE4TIOJVG44DOOA", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424/files/83497f5a6c3d7b96cbae086729dd4c849ef029ea..edb14fe404654241ef2a2bf04ae0945611d6533a?email_source=notifications\u0026email_token=AIJPEW7GN7PDYHTOQRVDK53QH5ZAJA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGMYTGNRQG44DGNKQOVZWQIZTHE4TIOJVG44DOOA", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
In reply to this post by David T Lewis
 

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?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3UDV5C7EL3TXZJWHTQH52GTA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5237PY#issuecomment-527810495", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3UDV5C7EL3TXZJWHTQH52GTA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5237PY#issuecomment-527810495", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
In reply to this post by David T Lewis
 

Merged #424 into Cog.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3OOAZVXTNHOZYMPEDQH7RRNA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTNXOB3I#event-2607735021", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW3OOAZVXTNHOZYMPEDQH7RRNA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTNXOB3I#event-2607735021", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T. Lewis
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
 
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
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?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW2XVPPPAEAI5IXXFCLQICLW3A5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD554QLA#issuecomment-528205868", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEW2XVPPPAEAI5IXXFCLQICLW3A5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD554QLA#issuecomment-528205868", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Restore support for large cursor on linux X11 VM (#424)

David T Lewis
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
failed loading module /usr/local/lib/squeak/4.16.6-3772/so.vm-display-X11 due to 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 ' option to tell me where it is, or
  • remove DISPLAY from your environment.
    Aborted (core dumped)

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.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEWYTB23RUEWWKM3E243QKGO2TA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD66V53Y#issuecomment-532504303", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/424?email_source=notifications\u0026email_token=AIJPEWYTB23RUEWWKM3E243QKGO2TA5CNFSM4ITGWYL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD66V53Y#issuecomment-532504303", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>