Hi Team, Facing some issue while building the doc...
# support
c
Hi Team, Facing some issue while building the docker image for rudder-transformer
Copy code
> dtrace-provider@0.8.8 install /home/node/app/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory '/home/node/app/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/home/node/app/node_modules/dtrace-provider/build'

> heapdump@0.3.15 install /home/node/app/node_modules/heapdump
> node-gyp rebuild

make: Entering directory '/home/node/app/node_modules/heapdump/build'
  CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from ../src/heapdump.cc:17:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2294:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
 2294 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
In file included from ../src/heapdump.cc:15:
../src/heapdump.cc: At global scope:
/home/node/.cache/node-gyp/14.19.0/include/node/node.h:793:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
  793 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/home/node/.cache/node-gyp/14.19.0/include/node/node.h:827:3: note: in expansion of macro 'NODE_MODULE_X'
  827 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/heapdump.cc:136:1: note: in expansion of macro 'NODE_MODULE'
  136 | NODE_MODULE(addon, Initialize)
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/addon.node
  COPY Release/addon.node
make: Leaving directory '/home/node/app/node_modules/heapdump/build'

> isolated-vm@4.3.6 install /home/node/app/node_modules/isolated-vm
> node-gyp rebuild --release -j 4

make: Entering directory '/home/node/app/node_modules/isolated-vm/build'
  CXX(target) Release/obj.target/nortti/src/isolate/allocator_nortti.o
  CXX(target) Release/obj.target/nortti/src/external_copy/serializer_nortti.o
  AR(target) Release/obj.target/nortti.a
  COPY Release/nortti.a
  CXX(target) Release/obj.target/isolated_vm/src/isolate/environment.o
  CXX(target) Release/obj.target/isolated_vm/src/external_copy/string.o
  CXX(target) Release/obj.target/isolated_vm/src/external_copy/serializer.o
  CXX(target) Release/obj.target/isolated_vm/src/external_copy/external_copy.o
../src/isolate/environment.cc:25: warning: "_GNU_SOURCE" redefined
   25 | #define _GNU_SOURCE
      |
<command-line>: note: this is the location of the previous definition
  CXX(target) Release/obj.target/isolated_vm/src/isolate/executor.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/holder.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/inspector.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/platform_delegate.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/scheduler.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/stack_trace.o
  CXX(target) Release/obj.target/isolated_vm/src/isolate/three_phase_task.o
  CXX(target) Release/obj.target/isolated_vm/src/lib/thread_pool.o
  CXX(target) Release/obj.target/isolated_vm/src/lib/timer.o
  CXX(target) Release/obj.target/isolated_vm/src/module/callback.o
  CXX(target) Release/obj.target/isolated_vm/src/module/context_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/evaluation.o
  CXX(target) Release/obj.target/isolated_vm/src/module/external_copy_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/isolate.o
  CXX(target) Release/obj.target/isolated_vm/src/module/isolate_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/lib_handle.o
../src/module/lib_handle.cc: In member function 'v8::Local<v8::Value> ivm::LibHandle::PrivateSymbol(v8::MaybeLocal<v8::String>)':
../src/module/lib_handle.cc:58:10: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   58 |  return *reinterpret_cast<Local<Value>*>(&symbol);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/module/lib_handle.cc:58:10: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  CXX(target) Release/obj.target/isolated_vm/src/module/module_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/native_module_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/reference_handle.o
  CXX(target) Release/obj.target/isolated_vm/src/module/script_handle.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [isolated_vm.target.mk:185: Release/obj.target/isolated_vm/src/module/isolate_handle.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/node/app/node_modules/isolated-vm/build'
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:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 6.4.11-200.fc38.aarch64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" "-j" "4"
gyp ERR! cwd /home/node/app/node_modules/isolated-vm
gyp ERR! node -v v14.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN rudder-transformer@0.1.5-rc.0 No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/rudder-transformer-cdk/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/jest-circus/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! isolated-vm@4.3.6 install: `node-gyp rebuild --release -j 4`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the isolated-vm@4.3.6 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!     /home/node/.npm/_logs/2023-08-23T11_58_49_017Z-debug.log
building at STEP "RUN npm install": while running runtime: exit status 1
You can find the stack trace for the error above. I believe its the version of g++ thats causing the trouble but can't figure out properly. Failing to build isolated-vm
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Will check with the team on this.
c
sure
m
Hi Sauparna, you are using the incorrect NodeJS version. Can you use this node version `node v18.16.0`⁣
c
Okay, I'll try
It won't work that way. node v18.16.0 doesn't have a suitable version of alpine associated with it whose repository has python2
m
Oh ok. Let me check and get back on this.
c
Apparently it was an architecture problem. I am using a m1 chip apple macbook. It was failing in arm64 architecture. With intel architecture it worked fine.
m
Oh ok. That is why the bug looked familiar. I have an m1 mac as well and ran into a similar issue a while ago.