Pillow installation failed for python with my custom opcode
Wesley
nispray at gmail.com
Thu Mar 12 03:41:35 EDT 2015
Hi guys,
I don't know if here is right place for asking this question, if not, please help me route to the right place.
I do some simple tests on custom opcode for python.
1. change opcode.h:
for example:
#define PRINT_EXPR 70
#define PRINT_ITEM 71
#define PRINT_NEWLINE 72
#define PRINT_ITEM_TO 73
#define PRINT_NEWLINE_TO 74
to this new values:
#define PRINT_EXPR 74
#define PRINT_ITEM 70
#define PRINT_NEWLINE 71
#define PRINT_ITEM_TO 72
#define PRINT_NEWLINE_TO 73
2. then, configure/make/make install
I see the customized python is executable.
And, I use pip to install other packages like django,south, mysql-python successfully.
But, when I execute 'pip install pillow' to install pillow version 2.7, error happend and snippet here:
Building using 4 processes
gcc -pthread -shared build/temp.linux-x86_64-2.7-pydebug/_imaging.o build/temp.linux-x86_64-2.7-pydebug/decode.o build/temp.linux-x86_64-2.7-pydebug/encode.o build/temp.linux-x86_64-2.7-pydebug/map.o build/temp.linux-x86_64-2.7-pydebug/display.o build/temp.linux-x86_64-2.7-pydebug/outline.o build/temp.linux-x86_64-2.7-pydebug/path.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Access.o build/temp.linux-x86_64-2.7-pydebug/libImaging/AlphaComposite.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Resample.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Bands.o build/temp.linux-x86_64-2.7-pydebug/libImaging/BitDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Blend.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Chops.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Convert.o build/temp.linux-x86_64-2.7-pydebug/libImaging/ConvertYCbCr.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Copy.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Crc32.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Crop.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Dib.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Draw.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Effects.o build/temp.linux-x86_64-2.7-pydebug/libImaging/EpsEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/File.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Fill.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Filter.o build/temp.linux-x86_64-2.7-pydebug/libImaging/FliDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Geometry.o build/temp.linux-x86_64-2.7-pydebug/libImaging/GetBBox.o build/temp.linux-x86_64-2.7-pydebug/libImaging/GifDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/GifEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/HexDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Histo.o build/temp.linux-x86_64-2.7-pydebug/libImaging/JpegDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/JpegEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/LzwDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Matrix.o build/temp.linux-x86_64-2.7-pydebug/libImaging/ModeFilter.o build/temp.linux-x86_64-2.7-pydebug/libImaging/MspDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Negative.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Offset.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Pack.o build/temp.linux-x86_64-2.7-pydebug/libImaging/PackDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Palette.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Paste.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Quant.o build/temp.linux-x86_64-2.7-pydebug/libImaging/QuantOctree.o build/temp.linux-x86_64-2.7-pydebug/libImaging/QuantHash.o build/temp.linux-x86_64-2.7-pydebug/libImaging/QuantHeap.o build/temp.linux-x86_64-2.7-pydebug/libImaging/PcdDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/PcxDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/PcxEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Point.o build/temp.linux-x86_64-2.7-pydebug/libImaging/RankFilter.o build/temp.linux-x86_64-2.7-pydebug/libImaging/RawDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/RawEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Storage.o build/temp.linux-x86_64-2.7-pydebug/libImaging/SunRleDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/TgaRleDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Unpack.o build/temp.linux-x86_64-2.7-pydebug/libImaging/UnpackYCC.o build/temp.linux-x86_64-2.7-pydebug/libImaging/UnsharpMask.o build/temp.linux-x86_64-2.7-pydebug/libImaging/XbmDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/XbmEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/ZipDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/ZipEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/TiffDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Incremental.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Jpeg2KDecode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/Jpeg2KEncode.o build/temp.linux-x86_64-2.7-pydebug/libImaging/BoxBlur.o -L/home/src/mypy27/lib -L/lib64 -L/usr/lib64 -L/usr/local/lib -L/usr/lib -L/home/src/mypy276/lib -ljpeg -lz -lpython2.7 -o build/lib.linux-x86_64-2.7-pydebug/PIL/_imaging.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld return 1
error: command 'gcc' failed with exit status 1
[74447 refs]
----------------------------------------
Cleaning up...
Command /home/src/mypy27/bin/python2.7 -c "import setuptools;__file__='/home/src/mypy27/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Y7XweN-record/install-record.txt --single-version-externally-managed --install-headers /home/src/mypy27/include/site/python2.7 failed with error code 1 in /home/src/mypy27/build/pillow
Traceback (most recent call last):
File "/home/src/mypy27/bin/pip", line 9, in <module>
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
File "/home/src/mypy27/lib/python2.7/site-packages/pip/__init__.py", line 148, in main
return command.main(args[1:], options)
File "/home/src/mypy27/lib/python2.7/site-packages/pip/basecommand.py", line 169, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 17: ordinal not in range(128)
[103880 refs]
I see /usr/local/lib/libpython2.7.a is the formal python2.7.6's, and here is libpython2.7.a in my system:
(mypy27)[root at localhost testforpythonencode]# find / -name libpython2.7.a
/usr/local/lib/python2.7/config/libpython2.7.a
/usr/local/lib/libpython2.7.a
/home/src/Python-2.7.6/libpython2.7.a
/home/src/mypy276/lib/python2.7/config/libpython2.7.a
The last one is my customized python location.
For pillow installation, shall I need to specify libpython2.7.a path?
But I don't know why other packages are correct.
Anyone knows what's wrong here?
Thanks.
Wesley
More information about the Python-list
mailing list