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

npm install error in unknown connect.c file #42

Open
ghost opened this issue Nov 30, 2019 · 2 comments
Open

npm install error in unknown connect.c file #42

ghost opened this issue Nov 30, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 30, 2019

Hi,

After installing node v12, I ran npm install in the odas directory. I'm getting an error in connect.c file in directory /home/pi/odas_web-0.3/node_modules/grpc/build/Release/obj.target/boringssl/deps/grpc/third_party/boringssl/crypto/bio/.

I am not sure why this error is popping up in first place because the bio folder shows only bio.o and bio_mem.o files, and neither connect.o nor connect.c file.
Please have a look at the error and let me know if there's any issue or if I'm missing something.

Best

Snippet of error:

CC(target) Release/obj.target/boringssl/deps/grpc/third_party/boringssl/crypto/bio/bio.o
CC(target) Release/obj.target/boringssl/deps/grpc/third_party/boringssl/crypto/bio/bio_mem.o
CC(target) Release/obj.target/boringssl/deps/grpc/third_party/boringssl/crypto/bio/connect.o
../deps/grpc/third_party/boringssl/crypto/bio/connect.c: In function ‘conn_callback_ctrl’:
../deps/grpc/third_party/boringssl/crypto/bio/connect.c:491:29: error: cast between incompatible function types from ‘bio_info_cb’ {aka ‘long int (*)(struct bio_st *, int, const char , int, long int, long int)’} to ‘int ()(const struct bio_st , int, int)’ [-Werror=cast-function-type]
data->info_callback = (int (
)(const struct bio_st *, int, int))fp;
^
cc1: all warnings being treated as errors
make: *** [boringssl.target.mk:420: Release/obj.target/boringssl/deps/grpc/third_party/boringssl/crypto/bio/connect.o] Error 1
make: Leaving directory '/home/pi/odas_web-0.3/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/odas_web-0.3/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.75-v7l+
gyp ERR! command "/usr/bin/node" "/home/pi/odas_web-0.3/node_modules/.bin/node-gyp" "rebuild" "--target=5.0.3" "--arch=arm" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--module_name=grpc_node" "--module_path=/home/pi/odas_web-0.3/node_modules/grpc/src/node/extension_binary/electron-v5.0-linux-arm-glibc" "--host=https://node-precompiled-binaries.grpc.io/" "--remote_path={name}/v1.21.1" "--package_name=electron-v5.0-linux-arm-glibc.tar.gz"
gyp ERR! cwd /home/pi/odas_web-0.3/node_modules/grpc
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok

@GodCed
Copy link
Collaborator

GodCed commented Dec 1, 2019

Hi, the issue is that grpc, a package on which ODAS Studio depends, needs to be build from source on arm cpu, but the build fail.

I suggest you first try to export CXXFLAGS=-Wno-error before running npm install to stop treating the warning you get as an error.
You can also try bumping the grpc version in package.json to 1.25.0.
You may also have more success using Node.js 10 instead of 12, even if 12 is the current LTS.

I find this issue, this issue and this issue to be of interest.
I don't have an arm machine available for testing so I don't know if it'll work.
I searched with "node-gyp grpc build fail" and "grpc cast between incompatible function type" to find info.

@pfeatherstone
Copy link

Upgrading grpc to 1.24.2 in package.json worked for me. I hate NPM. The worst package manager on earth. I don't understand how javascript/node is the most widely used software language in the world. It's terrifying.

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

2 participants