BewareMyPower commented on PR #282: URL: https://github.com/apache/pulsar-client-node/pull/282#issuecomment-1383595543
From https://github.com/apache/pulsar-client-node/pull/282#discussion_r1066658153 I see > I tested and the parameter doesn't work if compiled on x86_64. Then I tried the following patch, which adds the same compile flags as this PR does for arm64 macOS. ```diff diff --git a/pkg/mac/build-cpp-deps-lib.sh b/pkg/mac/build-cpp-deps-lib.sh index e2078d1..aa4e04d 100755 --- a/pkg/mac/build-cpp-deps-lib.sh +++ b/pkg/mac/build-cpp-deps-lib.sh @@ -167,12 +167,12 @@ if [ ! -f curl-${CURL_VERSION}.done ]; then tar xfz curl-${CURL_VERSION}.tar.gz pushd curl-${CURL_VERSION} CFLAGS="-fPIC -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \ - ./configure --with-ssl=$PREFIX \ + ./configure \ --without-nghttp2 \ --without-libidn2 \ --disable-ldap \ --without-brotli \ - --without-secure-transport \ + --with-secure-transport \ --disable-ipv6 \ --prefix=$PREFIX \ --host=$ARCH-apple-darwin ``` Then, build from source. ```bash pkg/mac/build-cpp-deps-lib.sh pkg/mac/build-cpp-lib.sh npm install ``` After that, I reproduced the same issue with https://github.com/apache/pulsar-client-node/pull/282#issuecomment-1381722708 successfully ``` % node examples/producer node:internal/modules/cjs/loader:1210 return process.dlopen(module, path.toNamespacedPath(filename)); ^ Error: dlopen(/Users/xuyunze/node-demo/pulsar-client-node/lib/binding/Pulsar.node, 0x0001): symbol not found in flat namespace (_kSecAttrLabel) at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Module.require (node:internal/modules/cjs/loader:1028:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/Users/xuyunze/node-demo/pulsar-client-node/src/pulsar-binding.js:24:17) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) { code: 'ERR_DLOPEN_FAILED' } ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
