The error I see in the config.log is:
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
The main.log shows you are using Xcode 8.2.1 on macOS 10.12. Consider upgrading to Xcode 9.2 and then reinstalling the cctools and ld64 ports (sudo port install cctools ld64
)—with Xcode 9 or later in place, these ports will install themselves as wrappers around Xcode 9's versions of those tools, rather than providing their own versions of the tools (which are based on Xcode 8.2.1 in the case of ld64-latest and Xcode 8.1 in the case of cctools and are therefore outdated at this point; unfortunately Apple has not released the source code of these parts of newer versions of Xcode so we can't update the ports with newer versions yet).