ufraw 0.22 does not compile on macOS 10.13 (with system compiler Xcode 9). The logs are there: https://gist.github.com/anonymous/160a78c4ad803a787c41e4b91f6684c6
The failure is due to calling abs() on unsigned values, which leads to an error. The patch is simple: https://raw.githubusercontent.com/Homebrew/formula-patches/d5bf686c74/ufraw/high_sierra.patch
Can confirm this bug on GCC 7