[VM][UNIX][PATCH] Was: Cannot load vm-display-X11 module after build from latest SVN and VMM

David T. Lewis lewis at mail.msen.com
Sat Jul 2 21:26:54 UTC 2005


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

I have attached a diff file as well as the patched source file.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixExternalPrims.c.diff.gz
Type: application/x-gunzip
Size: 538 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20050702/099ad256/sqUnixExternalPrims.c.diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixExternalPrims.c.gz
Type: application/x-gunzip
Size: 3543 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20050702/099ad256/sqUnixExternalPrims.c.bin

More information about the Vm-dev mailing list