<p>If a module such as vm-display-X11 fails to load due to dynamic linking<br>
errors such as symbol not found or missing runtime libary on the target<br>
machine, then provide a meaningful error message.<br>
Eliminate unnecessary check for if (strstr(why,"undefined symbol")) {...}<br>
because it eats errors, e.g. in the case of missing xRender runtime<br>
and VM compiled with xRender dev libaries.<br>
Improve the error message for readability. Add fflush() for stderr<br>
output to prevent messages being lost or mixed with stdout. Remove<br>
redundant and unreachable code.</p>
<p>Note, duplicate error messages on for load failures may occur due<br>
to path setup issues in the /bin/squeak start script, are are not<br>
a VM issue per se.</p>
<p>Example error message for VM compiled with xRender library for large<br>
cursor support, and run on a machine with missing runtime library:</p>
<p>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</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Ensure readable error message for VM module dlopen failures.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429/files#diff-0">platforms/unix/vm/sqUnixExternalPrims.c</a>
    (31)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.patch'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.patch</a></li>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.diff'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429?email_source=notifications&email_token=AIJPEW6DPOPRMEDNOQ6AGM3QONPFRA5CNFSM4JAH64C2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRONKCQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW4IWTIUI4AK7TKYFSLQONPFRANCNFSM4JAH64CQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWYES2MXQETUM22A3HDQONPFRA5CNFSM4JAH64C2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRONKCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429?email_source=notifications\u0026email_token=AIJPEW6DPOPRMEDNOQ6AGM3QONPFRA5CNFSM4JAH64C2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRONKCQ",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/429?email_source=notifications\u0026email_token=AIJPEW6DPOPRMEDNOQ6AGM3QONPFRA5CNFSM4JAH64C2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRONKCQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>