Pages

Sunday, 13 April 2014

Clang error installing Ansible on Mac

Installing the latest version of Ansible on Mac should be very easy when using pip. However, when I tried to do this on my Mac with the most recent versions of all software, I got the following error during install:

clang: error: unknown argument: '-mno-fused-madd'

The problem seems to be the latest (5.1) version of Xcode which treats unknown passed parameters as errors.

The workaround is quite simple, run the pip command with the following prefix:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future sudo pip install ansible

Run pip this way and your Ansible install will work like a charm again.