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

Calling Catalina users in @nodejs/collaborators #1936

Closed
rvagg opened this issue Oct 24, 2019 · 14 comments
Closed

Calling Catalina users in @nodejs/collaborators #1936

rvagg opened this issue Oct 24, 2019 · 14 comments

Comments

@rvagg
Copy link
Member

rvagg commented Oct 24, 2019

@nodejs/collaborators: we're having an unusually high number of users showing up having problems with their build toolchain on macOS thanks to Catalina. None of us here (afaik) are using it ourselves so our ability to poke at the problem is limited. We're all pretty time-constrained too, because we have our own focuses which mostly don't include macOS specifically.

If you are using Catalina, and have a rough familiarity with the toolchain for building native addons, your help in coming up with clear and concise answers would be appreciated. You don't need to be an expert in any of the tooling, but being able to replicate problems being reported and coming up with solutions might be enough. If we have to provide documentation to improve things then we can do that, or maybe we can change the detection in GYP to improve the situation.

Here's some of the discussions happening: https://github.com/nodejs/node-gyp/issues?utf8=%E2%9C%93&q=is%3Aissue+catalina+ - the first couple mostly regard pre-releases of Catalina but they also have follow-on to Catalina GA where problems have persisted.

The most active discussion currently is #1927 but that's currently directing people to a generic macOS + Xcode CLI tools upgrade fix @ #569 (note the number of reactions in the OP). Perhaps the solutions presented there are good enough for Catalina and this is not a special case. If so, maybe we should put that into the README for macOS. Suggestions welcome!

@mcollina
Copy link
Member

I have upgraded to Catalina, and to my greatest surprise it did not break anything in my tool chain that I know of. I have full XCode installed at the latest version. Let me know if I need to check anything.

@gengjiawen
Copy link
Member

I am using Catalina and Xcode: 11.1/11A1027, not run into any issue so far.

@cclauss cclauss added the macOS label Oct 24, 2019
@sam-github
Copy link
Contributor

I think the issues mostly affect people who chose to install only the CLI developer tools instead of the full Xcode. That would include me... but I am also not eager to upgrade to Catalina ATM. I'll reconsider if this lingers unresolved too long.

@benjamingr
Copy link
Member

No issues here either.

@ryzokuken
Copy link
Contributor

Same, running Catalina just fine.

@bdon
Copy link

bdon commented Oct 26, 2019

Just did a fresh install of Catalina and https://github.com/nodejs/node-gyp/blob/master/gyp/pylib/gyp/xcode_emulation.py#L1271 returning exit status 1 was breaking my install. worked around it by just hardcoding the result in (xcodebuild -install works fine from normal user shell)

@codebytere
Copy link
Member

codebytere commented Oct 26, 2019

@bdon i don't think that's catalina - i opened nodejs/node#30129 for the same issue and it looks like the python default change is the culprit there

@bdon
Copy link

bdon commented Oct 27, 2019

@codebytere Ah, you're probably right. I encountered this in the context of installing https://ports.macports.org/port/nodejs10 via MacPorts after reformatting, and I did set the global python to 3.7 instead of 2.x beforehand

@cclauss
Copy link
Contributor

cclauss commented Oct 27, 2019

You can always revert the python default change with:
PYTHON=python2 my_make_command

@cclauss cclauss added the Python label Nov 2, 2019
@vb-software
Copy link

It appears that there is no issue as long as you have XCode installed. However, I have no desire to have XCode JUST for npm and node-gyp and would prefer the tools installed without XCode.

The readme instructions for Catalina work great by uninstalling and reinstalling via command line. The Mac however picks up immediately that the version being installed is out of date. If you suppress having software update then to install a latest version, there are not issues. If you allow software update to update the version then it's back to issues.

@u84six
Copy link

u84six commented Jan 16, 2020

I have the latest Catalina and latest xcode (as of the date of this comment), and I can no longer build an existing Angular app that was built in Mojava just a few months ago. When I clone the Angular app from the git repot and run 'npm install', I get node-gyp related errors:

user@mbp (master)-> npm install
> grpc@1.23.3 install /Users/username/Development/angular/idea-portal/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v79-darwin-x64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for grpc@1.23.3 and node@13.6.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
CC(target) Release/obj.target/ares/deps/grpc/third_party/cares/cares/windows_port.o
  LIBTOOL-STATIC Release/libares.a
  CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting.o
  CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting_posix.o
  CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting_windows.o
  LIBTOOL-STATIC Release/libaddress_sorting.a
  CXX(target) Release/obj.target/grpc_node/ext/byte_buffer.o
  CXX(target) Release/obj.target/grpc_node/ext/call.o
../ext/call.cc:104:53: error: no matching member function for call to 'Get'
    Local<String> current_key(Nan::To<String>(keys->Get(i)).ToLocalChecked());
                                              ~~~~~~^~~
/Users/username/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/username/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../ext/call.cc:681:27: error: no matching member function for call to 'Get'
    if (!op->ParseOp(obj->Get(type), &ops[i])) {
                     ~~~~~^~~
/Users/username/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/username/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
2 errors generated.
make: *** [Release/obj.target/grpc_node/ext/call.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/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/Cellar/node/13.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /Users/username/Development/angular/idea-portal/node_modules/grpc
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/13.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/username/Development/angular/idea-portal/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.2.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/13.6.0/bin/node" "/Users/username/Development/angular/idea-portal/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/username/Development/angular/idea-portal/node_modules/grpc
node-pre-gyp ERR! node -v v13.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/13.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/username/Development/angular/idea-portal/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm WARN @angular/animations@8.2.14 requires a peer of @angular/core@8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine-html-reporter@1.5.1 requires a peer of jasmine-core@>=3.5 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.23.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.23.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2020-01-16T22_04_03_460Z-debug.log

I'm fairly new to Angular (and node for that matter), so I've been banging my head for hours on this one.

@richardlau
Copy link
Member

@u84six grpc only added support for Node.js 13 in 1.24.2 (https://github.com/grpc/grpc-node/releases/tag/grpc%401.24.2) (you're using 1.23.3).

@u84six
Copy link

u84six commented Jan 28, 2020

@richardlau Yes, figured that out... the hard way.

@bnoordhuis
Copy link
Member

This issue seems to have run its course. For people coming here through search engines: see https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md

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

No branches or pull requests