[squeak-dev] JPEG and --link-shared-lib

stes@PANDORA.BE stes at telenet.be
Sun Dec 19 15:49:39 UTC 2021

Hash: SHA256


I have a question on the "classic VM" (from subversion) and the
"JPEGReadWriter2" for the pluginJPEGReadWriter2Plugin

For Debian / Ubuntu Linux a configure option was added recently to squeak,


The idea here is to compile the VM with the systems provided library.

By default the directory platforms/Cross/plugins/JPEGReaderWriter2
contains a copy of the files of the libjpeg(-turbo?) library.

As a test, I have tried to compile on OpenIndiana and Slackware Linux,
with --link-shared-lib.

The compile works, the squeakvm links against -lpcre and -ljpeg.

BUT ... unfortunately on Slackware Linux 32bit it does not work  :

The test from Example from http://wiki.squeak.org/squeak/4043

 | jpgPicURL aStream |
 jpgPicURL := 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Quartz_Br%C3%A9sil.jpg/564px-Quartz_Br%C3%A9sil.jpg'.
 aStream := HTTPSocket httpGet: jpgPicURL.
 (JPEGReadWriter2 formFromStream: aStream) asMorph openInHand

The above test works when building the VM without --link-shared-lib
but fails with I configure with --link-shared-lib.

In the first case an image is displayed, in the second case the VM starts,
the shared library libjpeg.so is loaded but nothing is displayed,
when I run the test from http://wiki.squeak.org/squeak/4043

On Slackware Linux 14.2  /usr/lib/libjpeg.so points to libjpeg.so.62

I have many questions ... (1) why is the JPEG plugin delivered in two variants
there is JPEG ReadWriter and a JPEG ReadWriter2.

Smalltalk listBuiltinModule:16.
Smalltalk listBuiltinModule:17.

(2) why is this plugin not built as an external module instead of builtinModule

(3) why not removing all copied files from platforms/Cross/plugins/JPEG*
and provide a cmake file there for the configuration of JPEG

I like the idea of using the systems provided library.

However I am not convinced the option OPT--link-shared-lib is the right way,
to do that in Squeak VM classic.

The option --link-shared-lib seems not a good name to me.

It is "too general' for something specific like --enable-jpeg or --disable-jpeg

(4) Is the author of that plugin or those plugins still maintaining the plugin,
using Squeak ?

(5) do Smalltalk systems like Cuis or Squeak really need a JPEG plugin ,
this seems something that could be optional instead of enabled by default

David Stes

Version: GnuPG v2


More information about the Squeak-dev mailing list