[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Ensure readable error message for VM module dlopen failures. (#429)

David T Lewis notifications at github.com
Sun Oct 13 18:03:04 UTC 2019


If a module such as vm-display-X11 fails to load due to dynamic linking
errors such as symbol not found or missing runtime libary on the target
machine, then provide a meaningful error message.
Eliminate unnecessary check for if (strstr(why,"undefined symbol")) {...}
because it eats errors, e.g. in the case of missing xRender runtime
and VM compiled with xRender dev libaries.
Improve the error message for readability. Add fflush() for stderr
output to prevent messages being lost or mixed with stdout. Remove
redundant and unreachable code.

Note, duplicate error messages on for load failures may occur due
to path setup issues in the /bin/squeak start script, are are not
a VM issue per se.

Example error message for VM compiled with xRender library for large
cursor support, and run on a machine with missing runtime library:

vm-display-X11 tryLoading /usr/local/lib/squeak/5.0-201910110209/vm-display-X11.so: dlopen: libXrender.so.1: cannot open shared object file: No such file or directory
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Ensure readable error message for VM module dlopen failures.

-- File Changes --

    M platforms/unix/vm/sqUnixExternalPrims.c (31)

-- Patch Links --

https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.patch
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191013/c1369249/attachment-0001.html>


More information about the Vm-dev mailing list