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

David T. Lewis lewis at mail.msen.com
Sun Dec 19 19:48:52 UTC 2021


Hi David,

The motivation for adding --link-shared-lib was to satisfy a
packaging requirement for the Debian squeak-vm package. The
implementation is (or was meant to be) based on an earlier
patch from the Debian package maintainers. Beyond that I have
to confess that it is not well tested, and I don't know what
issues may be lurking.

Traditionally (in the past) the interpreter VM was distributed
as a compiled binary from squeakvm.org and was intended to be
run as-is on various unix/linux platforms. This approach conflicts
with Debian packaging requirements, hence the attempt to work
around the issue with the --link-shared-lib configuration option.

CC to Phil B who has been working, with the excouragement and
support of the Squeak Oversight Board, on updating the Debian
package.

Dave



On Sun, Dec 19, 2021 at 04:49:39PM +0100, stes at PANDORA.BE wrote:
>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> 
> Hi,
> 
> 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,
> 
> 	--link-shared-lib
> 
> 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
> 
> Regards,
> David Stes
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> 
> iQEcBAEBCAAGBQJhv1PTAAoJENdFDkXGicizKyYH/2thJnqmR1M7FDl5fKanSTzu
> hpHNLZoL45Nsz5CWLqxehrAQHZWZuU70izQWM8zyOadYLnpfFcFnDvAQkSv9H184
> UqQQEk/Ic6AvEwm0obWemR8H4GhOVBT+mmlsN0GOZFoTcIM9Wqk4RvEeThZiUnaP
> mWEGkdJnfNHkP3V/ZCvhjD0YOcwh35bUPtpuF9IISe6PtAVkk0+bgmv7Se1MIjgV
> 8/cjbYaaDqovKwhZRJ5LXVQb31R6AOFtzUBBBtofw/WBy9InYtH1mxliGYx/j1lP
> E6whtYEWc0GA9VvN3PQ4Ge201NCMA7CygcBw5rhI3qSmuNKB0C9q7VDkG5oZbME=
> =uE9J
> -----END PGP SIGNATURE-----


More information about the Vm-dev mailing list