升级到Xcode 5.1(以及最新的命令行工具)导致我无法再构建zlib。我现在得到以下内容:
gcc -dynamiclib -install_name /Users/fonnescj/Code/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.5 -arch x86_64 -I/Users/fonnescj/Code/include -I/Users/fonnescj/Code/include/freetype2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fPIC -o libz.1.2.5.dylib adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo -lc -arch x86_64 -L/Users/fonnescj/Code/lib -lbz2 -syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L. libz.a
clang: error: unknown argument: '-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk' [-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
make[1]: *** [libz.1.2.5.dylib] Error 1
make: *** [zlib] Error 2
有人建议添加以下标志可以解决问题:
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
但它没有。