Sharp: Installation on 32-bit Windows

Created on 18 Mar 2016  路  3Comments  路  Source: lovell/sharp

I understand from the changelog that 32-bit support is dropped, but is this necessarily a permanent decision? Sharp is the better alternative for image resizing and effects, and I rely on gulp-responsive in my development workflow. Unfortunately, one of my development environments runs 32-bit Windows 8.1 - with no chance of an upgrade to 64-bit.

I was wondering if someone had an installation process for Sharp using 32-bit, even using an older version (presumably @0.11.4). Currently I fail on C:\VIPS\include\glib-2.0\glib/gtypes.h(32): fatal error C1083: Cannot open include file: 'glibconfig.h', running npm install [email protected] --save-exact --arch=ia32. Per Sharp.io/0.11.4/ I have set a VIPS_HOME environment variable to C:\VIPS and added C:\VIPS\bin to path.

However, given the name - vips-dev-w64-8.2.2.zip - it would perhaps be the case that this is the Windows 64-bit version of these files (as referred to by the docs). Has anyone recently installed Sharp on a 32-bit Windows system successfully?

question

All 3 comments

Hei Ole, the last version combination to work with a 32-bit Node executable was, as you've discovered, sharp v0.11.4 with libvips v8.1.1.

Archived installation instructions are at http://sharp.dimens.io/en/v0.11.4/install/#windows

libvips v8.1.1 is available from http://www.vips.ecs.soton.ac.uk/supported/8.1/win32/vips-dev-8.1.1.zip

The newer w64 builds of libvips won't work with 32-bit.

If you're really stuck (and have lots of time), a hardware virtualisation tool such as QEMU might allow the use of a 64-bit environment on a 32-bit CPU. Good luck!

That libvips v8.1.1 was indeed the missing piece: Now npm install [email protected] --save-dev --arch=ia32 runs as expected, and can be followed by npm install [email protected] --save-dev --arch=ia32 (v1.2.0 runs Sharp v0.11).

This development environment is in reality a Windows-tablet with very limited hardware, so virtualization or other solutions are limited. Just finding the space for Visual Studio (currently needed for node-gyp) took a lot of effort, I'd be hard-pressed to find more.

Hopefully this sheds some light for anyone else in the same situation: It can be done with 32-bit, just be sure to acquire the right versions of the libraries.

Sharp is so fast, but reverted back to Jimp as on Azure web app deployment causing issues. Tried older version of Sharp no luck. Not sure how to compile the libvips dependency myself for Azure.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andresmag picture Andresmag  路  3Comments

kachurovskiy picture kachurovskiy  路  3Comments

zilions picture zilions  路  3Comments

AVVS picture AVVS  路  3Comments

iq-dot picture iq-dot  路  3Comments