csauvage opened a new issue #189: URL: https://github.com/apache/pulsar-client-node/issues/189
Hi there. I'm facing the same issues as #46 and #87 trying to install (and build) `pulsar-client` on M1 Pro. - [x] OS : MacOS 12.0.1 (arch. M1 Pro - 2021) - [x] Node : v16.13.2 - [x] NPM : 8.1.2 - [x] Node-gyp : node-gyp@7.1.0 - [x] Python Version : 2.7.18 - [x] libpulsar: 2.9.1_1 ## Error ```bash ... gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) CXX(target) Release/obj.target/Pulsar/src/addon.o In file included from ../src/addon.cc:20: ../src/Message.h:24:10: fatal error: 'pulsar/c/message.h' file not found #include <pulsar/c/message.h> ^~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/clementsauvage/Github/***/backend/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Darwin 21.1.0 ... ``` ## What did I try - [x] Building libpulsar myself : Python Boost not found and impossible to install it from homebrew - [x] Trying other version : Tried 1.2 / 1.3 & 1.4 same issues - [x] Trying to change npm / node / python version - [x] Switching between NPM & Yarn ## Full trace ``` backend git:(master) ✗ yarn add pulsar-client@1.2.0 yarn add v1.22.17 [1/4] 🔍 Resolving packages... warning pulsar-client > node-pre-gyp@0.12.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future warning pulsar-client > node-gyp > tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. warning pulsar-client > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > @sentry/react@6.16.1" has unmet peer dependency "react@15.x || 16.x || 17.x". warning "swagger-jsdoc > swagger-parser > @apidevtools/swagger-parser@10.0.2" has unmet peer dependency "openapi-types@>=7". [4/4] 🔨 Building fresh packages... [1/6] ⠂ bcrypt [2/6] ⠂ iltorb [3/6] ⠂ node-zopfli-es [4/6] ⠂ puppeteer error /Users/clementsauvage/Github/***/backend/node_modules/pulsar-client: Command failed. Exit code: 1 Command: node-pre-gyp install --fallback-to-build Arguments: Directory: /Users/clementsauvage/Github/***/backend/node_modules/pulsar-client Output: node-pre-gyp info it worked if it ends with ok node-pre-gyp info using node-pre-gyp@0.12.0 node-pre-gyp info using node@16.13.2 | darwin | arm64 node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp info check checked for "/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/Release/libpulsar.node" (not found) node-pre-gyp http GET https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.2.0-node-v93-darwin-arm64.tar.gz node-pre-gyp http 404 https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.2.0-node-v93-darwin-arm64.tar.gz node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.2.0-node-v93-darwin-arm64.tar.gz node-pre-gyp WARN Pre-built binaries not found for pulsar-client@1.2.0 and node@16.13.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp http 404 status code downloading tarball https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.2.0-node-v93-darwin-arm64.tar.gz gyp info it worked if it ends with ok gyp info using node-gyp@7.1.0 gyp info using node@16.13.2 | darwin | arm64 gyp info ok gyp info it worked if it ends with ok gyp info using node-gyp@7.1.0 gyp info using node@16.13.2 | darwin | arm64 gyp info find Python using Python version 2.7.18 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python" (node:15144) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. (Use `node --trace-deprecation ...` to show where the warning was created) gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python gyp info spawn args [ gyp info spawn args '/Users/clementsauvage/Github/***/backend/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/clementsauvage/Github/***/backend/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/clementsauvage/Library/Caches/node-gyp/16.13.2/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/clementsauvage/Library/Caches/node-gyp/16.13.2', gyp info spawn args '-Dnode_gyp_dir=/Users/clementsauvage/Github/***/backend/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/clementsauvage/Library/Caches/node-gyp/16.13.2/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info ok gyp info it worked if it ends with ok gyp info using node-gyp@7.1.0 gyp info using node@16.13.2 | darwin | arm64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) CXX(target) Release/obj.target/Pulsar/src/addon.o In file included from ../src/addon.cc:20: ../src/Message.h:24:10: fatal error: 'pulsar/c/message.h' file not found #include <pulsar/c/message.h> ^~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/clementsauvage/Github/***/backend/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Darwin 21.1.0 gyp ERR! command "/Users/clementsauvage/.nvm/versions/node/v16.13.2/bin/node" "/Users/clementsauvage/Github/***/backend/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" gyp ERR! cwd /Users/clementsauvage/Github/***/backend/node_modules/pulsar-client gyp ERR! node -v v16.13.2 gyp ERR! node-gyp -v v7.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/Users/clementsauvage/.nvm/versions/node/v16.13.2/bin/node /Users/clementsauvage/Github/***/backend/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/clementsauvage/Github/***/backend/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28) node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) node-pre-gyp ERR! System Darwin 21.1.0 node-pre-gyp ERR! command "/Users/clementsauvage/.nvm/versions/node/v16.13.2/bin/node" "/Users/clementsauvage/Github/***/backend/node_modules/pulsar-client/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /Users/clementsauvage/Github/***/backend/node_modules/pulsar-client node-pre-gyp ERR! node -v v16.13.2 node-pre-gyp ERR! node-pre-gyp -v v0.12.0 node-pre-gyp ERR! not ok ``` Any help would be greatly appreciated. -- 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. To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org