Open gpetrov opened 3 years ago
It works for me building node-pty. Note that you'll need the MacOSX11.0.sdk that comes with Xcode 12.2.
yes of course I have Xcode 12.2, but how did you compile it? I just get:
> node-pty@0.9.0 install /Users/george/Documents/SVN/Wappler/node_modules/node-pty
> node scripts/install.js
CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
In file included from ../../nan/nan.h:54:
In file included from /Users/george/.nw-gyp/0.50.0/src/node.h:67:
In file included from /Users/george/.nw-gyp/0.50.0/deps/v8/include/v8.h:30:
/Users/george/.nw-gyp/0.50.0/deps/v8/include/v8-internal.h:418:38: error: no template named
'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
~~~~~^~~~~~~~~~~
remove_cv
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:697:50: note:
'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
^
1 error generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/nw-gyp/lib/build.js:271:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.1.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/nw-gyp" "rebuild"
gyp ERR! cwd /Users/george/Documents/SVN/Wappler/node_modules/node-pty
gyp ERR! node -v v14.15.1
gyp ERR! nw-gyp -v v3.6.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.9.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I'm just using the commands you posted.
ah seems there was some old std=c++11 in binding.gyp in node-pty (they recently removed it - but it is not published yet) it needs to be now at least std=c++14. or removed
same is also for nodegit - they also have some old c++11 options there
Solution mentioned at: https://github.com/nwjs/nw.js/issues/7620#issuecomment-733684392 maybe it can be integrated in a nw-gyp update
Trying to compile the native node modules for Apple Silicon arm64 - fails. It just doesn't pickup the new arm64 architecture for Darwin.
trying to compile nodegit and node-pty both fail with similar error:
tried also running directly: nw-gyp configure --target=0.50.0 --target_arch=arm64
but list afterwrards produces:
as as you can see x64 is still detected and nw-gyp build fails
@rogerwang can you check this please? it is the final peace to move to Apple Silicon M1 with arm. As the base of NWJS seems to be running fine natively we just need to be able also to compile custom native node modules.