Ian,
While trying to debug a problem in loading vm-display-X11, I found that errors in vm-display-X11 were silently ignored in the module loading process.
Here is a patch for sqUnixExternalPrims.c that prints the dlerror() message on standard error if a shared module file exists but dlopen() fails to open it. This prevents the situation where the VM fails to load a module due to a real problem in the module file, then proceeds to look for the module in a bunch of other places without informing the user that something bad may have happened.
This is just for the dlopen() in tryLoading(). An error message was already in place to cover dlopen() errors in ioLoadModule().
Following is an example of console output in a case such as this:
lewis@dtlewis:/tmp/sq/Squeak64BitPort/images/build32> squeak dlopen() failed to load module /usr/local/lib/squeak/3.8a-2/vm-display-X11 /usr/local/lib/squeak/3.8a-2/vm-display-X11: undefined symbol: oopAt could not find display driver vm-display-X11; either: - check that /usr/local/lib/squeak/3.8a-2/vm-display-X11.so exists, or - use the '-plugins <path>' option to tell me where it is, or - remove DISPLAY from your environment. Aborted
I have attached a diff file as well as the patched source file.
Dave