gyp fails on MacOS without XCode

12 views
Skip to first unread message

Shigeki Ohtsu

unread,
Mar 2, 2015, 8:29:07 PM3/2/15
to gyp-de...@googlegroups.com
I am now working on upgrading to the latest gyp of io.js as in https://github.com/iojs/io.js/pull/723 and submitted the issue of https://code.google.com/p/gyp/issues/detail?id=477 that gyp fails on MacOS without XCode.
The issue comes from  that `sdk_root` is None so I create a patch as below.

````
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 16388c8..b069644 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -1465,6 +1465,8 @@ def _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
     sdk_root = xcode_settings._SdkRoot(configuration)
     if not sdk_root:
       sdk_root = xcode_settings._XcodeSdkPath('')
+    if sdk_root is None:
+      sdk_root = ''
     env['SDKROOT'] = sdk_root

   if not additional_settings:
````

But many tests of `./gyptest.py -a` were failed because of the stderr outputs of "xcode-select: error:"
so I cannot confirm this patch has no problems.

Is this a right way to resolve the issue or is there an another better patch to fix it?

Regards,

Reply all
Reply to author
Forward
0 new messages