2

I am trying to install pillow 6.2.1 on a Raspberry Pi model 1B running Arch Linux ARM (in the worst case I could buy a newer raspberry pi but the point of this project was to upcycle the old Pi).

I tried installing in the standard way

pip install pillow==6.2.1

but the compiler ran out of memory so I then ran

pip --no-cache-dir install pillow==6.2.1

which produced a different error given below.

I am not sure how to interpret this error

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION="6.2.1" -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imaging.c -o build/temp.linux-armv6l-3.8/src/_imaging.o
src/_imaging.c: In function '_set_blocks_max':
src/_imaging.c:3697:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 3697 |     else if ( blocks_max > SIZE_MAX/sizeof(ImagingDefaultArena.blocks_pool[0])) {
      |                          ^
{standard input}: Assembler messages:
{standard input}:21669: Warning: end of file not at end of a line; newline inserted
{standard input}:21792: Error: found '
', expected: ')'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
building 'PIL._imagingtk' extension
creating build/temp.linux-armv6l-3.8/src/Tk
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -Isrc/Tk -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingtk.c -o build/temp.linux-armv6l-3.8/src/_imagingtk.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -Isrc/Tk -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/Tk/tkImaging.c -o build/temp.linux-armv6l-3.8/src/Tk/tkImaging.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingtk.o build/temp.linux-armv6l-3.8/src/Tk/tkImaging.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingtk.cpython-38-arm-linux-gnueabihf.so
building 'PIL._imagingmath' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingmath.c -o build/temp.linux-armv6l-3.8/src/_imagingmath.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingmath.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingmath.cpython-38-arm-linux-gnueabihf.so
building 'PIL._imagingmorph' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingmorph.c -o build/temp.linux-armv6l-3.8/src/_imagingmorph.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingmorph.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingmorph.cpython-38-arm-linux-gnueabihf.so
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yqwi0r_s/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yqwi0r_s/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i24ol927/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

The assembler message makes me think that it might be something to do with the Pi running out of resources. But is it instead just missing some dependecies or is there any way around this?

Cameron
  • 1,011
  • 1
  • 10
  • 20

1 Answers1

2

The Raspberry Pi 1B only has 512MB of RAM. To get around this I plugged in an external hard drive and allocated 2GB of SWAP space. The installation process was very slow but it completed in the end using

pip install pillow==6.2.1

this also allowed other programs to install that otherwise wouldn't.

Cameron
  • 1,011
  • 1
  • 10
  • 20