سؤال

I'm struggling to install reportlab on mac OS X 10.9.2 with python 2.7. I managed to install it using pip3 even if I need it for python2.7 so I believe I have all the required packages installed.

Can you please help?

Here is the install log (If you need the full unstripped log, just ask):

$>pip install reportlab
Downloading/unpacking reportlab
  Downloading reportlab-3.0.tar.gz (1.9MB): 1.9MB downloaded
  Running setup.py egg_info for package reportlab
    ################################################
    #Attempting install of _rl_accel & pyHnj
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
    ################################################
    ################################################
    #Attempting install of _renderPM
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
    will use package libart 2.3.12
    # installing with freetype version 21
    ################################################
    Downloading standard T1 font curves
    Finished download of standard T1 font curves

    ()
    ########## SUMMARY INFO #########
    ################################################
    #Attempting install of _rl_accel & pyHnj
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
    ################################################
    ################################################
    #Attempting install of _renderPM
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
    will use package libart 2.3.12
    # installing with freetype version 21
    ################################################
    Downloading standard T1 font curves
    Finished download of standard T1 font curves
Installing collected packages: reportlab
  Running setup.py install for reportlab
    ################################################
    #Attempting install of _rl_accel & pyHnj
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
    ################################################
    ################################################
    #Attempting install of _renderPM
    #extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
    will use package libart 2.3.12
    # installing with freetype version 21
    ################################################
    Standard T1 font curves already downloaded
    building 'reportlab.lib._rl_accel' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.o
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    error: command 'cc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip_build_root/reportlab/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xduBeA-record/install-record.txt --single-version-externally-managed:
    ################################################

#Attempting install of _rl_accel & pyHnj

#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'

################################################

################################################

#Attempting install of _renderPM

#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'

will use package libart 2.3.12

# installing with freetype version 21

################################################

Standard T1 font curves already downloaded

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/reportlab

copying src/reportlab/__init__.py -> build/lib.macosx-10.9-intel-2.7/reportlab

copying src/reportlab/rl_config.py -> build/lib.macosx-10.9-intel-2.7/reportlab

[...] -> lots of copying/creating lines stripped here for more clarity

running build_ext

creating build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip_build_root/reportlab/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ty1Jj1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip_build_root/reportlab
Storing complete log in /Users/hugo/Library/Logs/pip.log
هل كانت مفيدة؟

المحلول

Just found out the solution here. Just add these env settings prior to compilation to tell clang to ignore the error.

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

Hopefully will help someone!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top