无法在heroku上安装reportlab

时间:2014-06-07 13:03:37

标签: python heroku reportlab

我正在尝试在heroku上安装reportlab 2.7,但编译失败。

我使用远程shell生成一台机器并尝试编译它。我启动python setup.py build时遇到的错误如下

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION="2.3.12" -I/app/reportlab-2.7/src/rl_addons/renderPM -I/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl -I/app/reportlab-2.7/src/rl_addons/renderPM/gt1 -I/usr/include -I/usr/include/freetype2 -I/app/.heroku/python/include/python2.7 -c /app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.c -o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/_renderPM.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath_bpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_pixbuf_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_svp.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_vpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_vpath_stroke.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_ops.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath_dash.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rect.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_affine_private.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_rgba_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_intersect.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_render_aa.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_misc.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-parset1.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-dict.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-namecontext.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.o -L/usr/local/lib -L/usr/lib -L/app/.heroku/python/lib -L/app/.heroku/python/lib -lfreetype -lpython2.7 -o build/lib.linux-x86_64-2.7/_renderPM.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' 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 returned 1 exit status
error: command 'gcc' failed with exit status 1

为什么会失败?我一年前创建的另一个应用程序从未遇到此问题。

我怀疑buildpack已被更改,但我没有找到差异,也不知道如何修复它。

1 个答案:

答案 0 :(得分:3)

好消息!

现在已使用python-2.7.7运行时修复了reportlab错误。