Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: SDK "macosx" cannot be located. Is the OSX not supported? #114

Open
romario89 opened this issue Mar 8, 2014 · 5 comments
Open

Error: SDK "macosx" cannot be located. Is the OSX not supported? #114

romario89 opened this issue Mar 8, 2014 · 5 comments

Comments

@romario89
Copy link

Sorry for posting 3rd issue in a row. Now I get this error when I try to make -j8 ppc.
My setup is: OSX 10.5.8 PPC, Python 2.7.6, GCC 4.2.1, svn 1.7.14

PYTHONPATH="/Users/haansgruber/Downloads/v8ppc-    master/tools/generate_shim_headers:" \
    GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=ppc \
                  -S.ppc  -Dv8_enable_backtrace=1 -Darm_fpu=default -    Darm_float_abi=default

xcodebuild: Warning: SDK "macosx" cannot be located.  Using project-defined SDK.

Error: A valid SDK was not specified on the command line for -sdk when used with -    version.

gyp: Error 1 running xcodebuild
make: *** [out/Makefile.ppc] Error 1

It is said that recent versions of (Intel) node.js cannot be compiled on OSX 10.5.x (ref: nodejs/node-v0.x-archive#6571) I noticed there were only Linux and AIX builds of v8ppc at the CI page of v8ppc.

Could the SDK "macosx" error I got and the absence of OSX builds in the CI repository of v8ppc all mean that v8ppc cannot be built on OSX?

@romario89
Copy link
Author

It looks like v8ppc is not targeted at OSX (link https://groups.google.com/forum/#!topic/nodejs/ivGMr-C_m1Y)

Can we add this "(for the time being) only Linux PPC and AIX are supported" to the title?

@andrewlow
Copy link
Collaborator

I'm happy to leave this one open - it's a legitimate issue.

There is one against the node repo we have here ibmruntimes/node#14 and it is basically the same problem.

Today, no one has done the work to support OSX with the PPC code. If you're running Linux on a G5 then things work.

This is something that probably just needs a little effort to sort out the GYP files etc. Much easier than dealing with the assembly stuff.

@barracuda156
Copy link

Request to developers: Please make it build on PowerPC MacOS.

@barracuda156
Copy link

I'm happy to leave this one open - it's a legitimate issue.

There is one against the node repo we have here ibmruntimes/node#14 and it is basically the same problem.

Today, no one has done the work to support OSX with the PPC code. If you're running Linux on a G5 then things work.

This is something that probably just needs a little effort to sort out the GYP files etc. Much easier than dealing with the assembly stuff.

@andrewlow Fixing gyp files is quite easy. However Darwin ABI differs from ELF and AIX, so the code and likely assembler will need extra work.

Something like:

--- a/configure.py	2022-09-02 00:58:51.000000000 +0700
+++ b/configure.py	2022-09-02 01:54:31.000000000 +0700
@@ -952,7 +952,9 @@
     '__MIPSEL__'  : 'mipsel',
     '__mips__'    : 'mips',
     '__PPC64__'   : 'ppc64',
-    '__PPC__'     : 'ppc64',
+    '__ppc64__'   : 'ppc64',
+    '__PPC__'     : 'ppc',
+    '__ppc__'     : 'ppc',
     '__x86_64__'  : 'x64',
     '__s390x__'   : 's390x',
   }

--- a/common.gypi	2022-09-02 00:58:56.000000000 +0700
+++ b/common.gypi	2022-09-02 05:17:01.000000000 +0700
@@ -132,7 +132,7 @@
       }, {
         'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
       }],
-      ['OS=="mac"', {
+      ['OS=="mac" and target_arch!="ppc" and target_arch!="ppc64"', {
         'clang%': 1,
       }],
       ['target_arch in "ppc64 s390x"', {
@@ -500,6 +500,12 @@
           ['target_arch=="x64"', {
             'xcode_settings': {'ARCHS': ['x86_64']},
           }],
+          ['target_arch=="ppc"', {
+            'xcode_settings': {'ARCHS': ['ppc']},
+          }],
+          ['target_arch=="ppc64"', {
+            'xcode_settings': {'ARCHS': ['ppc64']},
+          }],
           ['target_arch=="arm64"', {
             'xcode_settings': {
               'ARCHS': ['arm64'],

--- a/tools/v8_gypfiles/toolchain.gypi	2022-09-02 00:58:59.000000000 +0700
+++ b/tools/v8_gypfiles/toolchain.gypi	2022-09-02 03:34:18.000000000 +0700
@@ -295,10 +295,21 @@
           'V8_TARGET_ARCH_PPC',
         ],
         'conditions': [
+          ['v8_target_arch=="ppc"', {
+            'defines': [
+              'V8_TARGET_ARCH_32_BIT',
+            ],
+            'xcode_settings': {
+              'ARCHS': [ 'ppc' ],
+            },
+          }],
           ['v8_target_arch=="ppc64"', {
             'defines': [
               'V8_TARGET_ARCH_PPC64',
             ],
+            'xcode_settings': {
+              'ARCHS': [ 'ppc64' ],
+            },
           }],
           ['v8_host_byteorder=="little"', {
             'defines': [
@@ -1011,7 +1022,7 @@
               }],
             ],
             'xcode_settings': {
-              'ARCHS': [ 'i386' ],
+              'ARCHS': [ 'ppc' ],
             },
           }],
           ['_toolset=="target"', {
@@ -1029,12 +1040,12 @@
               }],
             ],
             'xcode_settings': {
-              'ARCHS': [ 'i386' ],
+              'ARCHS': [ 'ppc' ],
             },
           }],
         ],
       }],
-      ['(OS=="linux" or OS=="android") and \
+      ['(OS=="linux" or OS=="mac" or OS=="android") and \
         (v8_target_arch=="x64" or v8_target_arch=="arm64" or \
          v8_target_arch=="ppc64" or v8_target_arch=="s390x")', {
         'target_conditions': [
@@ -1045,6 +1056,9 @@
                 'ldflags': [ '-m64' ]
               }],
              ],
+            'xcode_settings': {
+              'ARCHS': [ 'ppc64' ],
+            },
            }],
           ['_toolset=="target"', {
              'conditions': [
@@ -1052,7 +1066,10 @@
                  'cflags': [ '-m64' ],
                  'ldflags': [ '-m64' ],
                }],
-             ]
+             ],
+            'xcode_settings': {
+              'ARCHS': [ 'ppc64' ],
+            },
            }],
          ],
       }],


--- a/tools/gyp/pylib/gyp/xcode_emulation.py	2022-09-02 00:58:55.000000000 +0700
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py	2022-09-02 02:58:18.000000000 +0700
@@ -120,7 +120,13 @@
   if XCODE_ARCHS_DEFAULT_CACHE:
     return XCODE_ARCHS_DEFAULT_CACHE
   xcode_version, _ = XcodeVersion()
-  if xcode_version < '0500':
+  if xcode_version < '0400':
+    XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
+        '$(ARCHS_STANDARD)',
+        XcodeArchsVariableMapping(['ppc']),
+        XcodeArchsVariableMapping(['ppc64']),
+        XcodeArchsVariableMapping(['i386']))
+  elif xcode_version < '0500':
     XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
         '$(ARCHS_STANDARD)',
         XcodeArchsVariableMapping(['i386']),

--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py	2022-09-02 00:58:52.000000000 +0700
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py	2022-09-02 02:58:21.000000000 +0700
@@ -120,7 +120,13 @@
   if XCODE_ARCHS_DEFAULT_CACHE:
     return XCODE_ARCHS_DEFAULT_CACHE
   xcode_version, _ = XcodeVersion()
-  if xcode_version < '0500':
+  if xcode_version < '0400':
+    XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
+        '$(ARCHS_STANDARD)',
+        XcodeArchsVariableMapping(['ppc']),
+        XcodeArchsVariableMapping(['ppc64']),
+        XcodeArchsVariableMapping(['i386']))
+  elif xcode_version < '0500':
     XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
         '$(ARCHS_STANDARD)',
         XcodeArchsVariableMapping(['i386']),

@barracuda156
Copy link

@romario89 With patches from this branch v8 should build on macOS ppc: https://github.com/barracuda156/v8-ppc/tree/8.3-powerpc-darwin-new
Or just use the port, which has build system set up: macports/macports-ports@178ba29

Notice, this is only confirmed to build on PowerPC, and has experimental status. (x86_64 from the same port appears fully functional; aarch64 not so much, though it also builds.)

PowerPC-specific code is likely to have omissions and errors; use at your own risk.
(I am just leaving it here, since may forget do it later on.)

@andrewlow I really need help on one particular issue, if you get a time to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants