You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/08/19 15:48:44 UTC
[GitHub] [pulsar-client-node] daghdha opened a new issue #46: fatal error:
pulsar/c/message.h: No such file or directory
daghdha opened a new issue #46: fatal error: pulsar/c/message.h: No such file or directory
URL: https://github.com/apache/pulsar-client-node/issues/46
Hi there,
I was having a problem trying to install/build the client node. I follow the instructions, git clone and then run the npm install and I get the following:
```
> pulsar-client@2.4.0-SNAPSHOT install /home/ubuntu/pulsar-client-node
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v2.4.0-SNAPSHOT-node-v57-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for pulsar-client@2.4.0-SNAPSHOT and node@8.16.0 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/ubuntu/pulsar-client-node/build'
CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
AR(target) Release/obj.target/node_modules/node-addon-api/src/nothing.a
COPY Release/nothing.a
CXX(target) Release/obj.target/Pulsar/src/addon.o
In file included from ../src/addon.cc:20:0:
../src/Message.h:24:10: fatal error: pulsar/c/message.h: No such file or directory
#include <pulsar/c/message.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Pulsar.target.mk:114: recipe for target 'Release/obj.target/Pulsar/src/addon.o' failed
make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
make: Leaving directory '/home/ubuntu/pulsar-client-node/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-1043-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ubuntu/pulsar-client-node/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/home/ubuntu/pulsar-client-node/build/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /home/ubuntu/pulsar-client-node
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/pulsar-client-node/build/Release/libpulsar.node --module_name=libpulsar --module_path=/home/ubuntu/pulsar-client-node/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ubuntu/pulsar-client-node/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.15.0-1043-aws
node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/pulsar-client-node/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ubuntu/pulsar-client-node
node-pre-gyp ERR! node -v v8.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/pulsar-client-node/build/Release/libpulsar.node --module_name=libpulsar --module_path=/home/ubuntu/pulsar-client-node/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulsar-client@2.4.0-SNAPSHOT install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pulsar-client@2.4.0-SNAPSHOT install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
```
Then I try a npm run build just in case I was crazy, but I get this:
```
ubuntu:~/pulsar-client-node$ npm run build
> pulsar-client@2.4.0-SNAPSHOT build /home/ubuntu/pulsar-client-node
> npm run format && node-gyp rebuild
> pulsar-client@2.4.0-SNAPSHOT format /home/ubuntu/pulsar-client-node
> clang-format -i --verbose src/* && eslint --fix --ext .js .
Formatting src/Authentication.cc
Formatting src/Authentication.h
Formatting src/AuthenticationAthenz.js
Formatting src/AuthenticationTls.js
Formatting src/AuthenticationToken.js
Formatting src/Client.cc
Formatting src/Client.h
Formatting src/Consumer.cc
Formatting src/Consumer.h
Formatting src/ConsumerConfig.cc
Formatting src/ConsumerConfig.h
Formatting src/Message.cc
Formatting src/Message.h
Formatting src/MessageId.cc
Formatting src/MessageId.h
Formatting src/Producer.cc
Formatting src/Producer.h
Formatting src/ProducerConfig.cc
Formatting src/ProducerConfig.h
Formatting src/Reader.cc
Formatting src/Reader.h
Formatting src/ReaderConfig.cc
Formatting src/ReaderConfig.h
Formatting src/addon.cc
/home/ubuntu/pulsar-client-node/examples/consumer_tls_auth.js
44:17 warning Unexpected `await` inside a loop no-await-in-loop
/home/ubuntu/pulsar-client-node/examples/consumer.js
39:17 warning Unexpected `await` inside a loop no-await-in-loop
/home/ubuntu/pulsar-client-node/examples/reader.js
37:17 warning Unexpected `await` inside a loop no-await-in-loop
/home/ubuntu/pulsar-client-node/tests/end_to_end.test.js
59:21 warning Unexpected `await` inside a loop no-await-in-loop
102:21 warning Unexpected `await` inside a loop no-await-in-loop
150:21 warning Unexpected `await` inside a loop no-await-in-loop
✖ 6 problems (0 errors, 6 warnings)
┌──────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/ubuntu/.config │
└──────────────────────────────────────────────────────────┘
make: Entering directory '/home/ubuntu/pulsar-client-node/build'
CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
AR(target) Release/obj.target/node_modules/node-addon-api/src/nothing.a
COPY Release/nothing.a
CXX(target) Release/obj.target/Pulsar/src/addon.o
In file included from ../src/addon.cc:20:0:
../src/Message.h:24:10: fatal error: pulsar/c/message.h: No such file or directory
#include <pulsar/c/message.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Pulsar.target.mk:114: recipe for target 'Release/obj.target/Pulsar/src/addon.o' failed
make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
make: Leaving directory '/home/ubuntu/pulsar-client-node/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-1043-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/pulsar-client-node
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulsar-client@2.4.0-SNAPSHOT build: `npm run format && node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pulsar-client@2.4.0-SNAPSHOT build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
```
Not sure what I am doing wrong, is there something that I am missing?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services