Skip to content

[BUG] Pre-built binaries not installable - Need prebuilt PPC64 linux releases odbc-v2.4.8-linux-ppc64-napi-v6.tar.gz #392

@phpdave

Description

@phpdave

Describe your system

  • odbc Package Version: 2.4.8
  • ODBC Driver: latest
  • Database Name: DB2 for i
  • Database OS: IBM i
  • Node.js Version: 18.20.2
  • Node.js OS: RHEL 9.1 Power Linux 5.14.0-162.6.1.el9_1.ppc64le

Describe the bug
When running npm install on a Power Linux RHEL9 host it can't download pre-built binaries because their are none for linux ppc64. Trying to build it locally is also having issues with

error: invalid conversion from ‘napi_finalize’ {aka ‘void (*)(napi_env__*, void*, void*)’} to ‘node_api_nogc_finalize’ {aka ‘void (*)(const napi_env__*, void*, void*)’} [-fpermissive]

Expected behavior
Expectation was that there would be pre-built binaries for PowerPC Linux and wouldnt need to install gcc, make, g++. The hassles to get sql.h from unixODBC-devel using subscription-manager repos --enable codeready-builder-for-rhel-9-ppcle-rpms https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html-single/package_manifest/index#CodeReadyLinuxBuilder-repository https://access.redhat.com/articles/4348511

To Reproduce
Steps to reproduce the behavior:

  1. On a RHEL9 PPC computer run npm install with node-odbc in the package.json file

Additional context

Here's the error message

npm ERR! code 1
npm ERR! path /home/the_user/the_project/server_side_code/node_modules/odbc
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/home/the_user/the_project/server_side_code/node_modules/odbc/build'
npm ERR!   CXX(target) Release/obj.target/odbc/src/odbc.o
npm ERR! make: Leaving directory '/home/the_user/the_project/server_side_code/node_modules/odbc/build'
npm ERR! Failed to execute '/home/the_user/.nvm/versions/node/v18.20.2/bin/node /home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6 --napi_version=9 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.11
npm ERR! node-pre-gyp info using node@18.20.2 | linux | ppc64
npm ERR! node-pre-gyp info check checked for "/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6/odbc.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-linux-ppc64-napi-v6.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-linux-ppc64-napi-v6.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for odbc@2.4.8 and node@18.20.2 (node-v108 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-linux-ppc64-napi-v6.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.20.2 | linux | ppc64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.20.2 | linux | ppc64
npm ERR! gyp info find Python using Python version 3.9.18 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.20.2/node-v18.20.2-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.20.2/node-v18.20.2-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.20.2/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.20.2/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/the_user/the_project/server_side_code/node_modules/odbc/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/the_user/.cache/node-gyp/18.20.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/the_user/.cache/node-gyp/18.20.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/the_user/.cache/node-gyp/18.20.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/the_user/the_project/server_side_code/node_modules/odbc',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.20.2 | linux | ppc64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi.h:2725,
npm ERR!                  from ../src/odbc.h:27,
npm ERR!                  from ../src/odbc.cpp:22:
npm ERR! /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi-inl.h: In instantiation of ‘napi_status Napi::details::AttachData(napi_env, napi_value, FreeType*, napi_finalize, void*) [with FreeType = Napi::details::CallbackData<Napi::Value (*)(const Napi::CallbackInfo&), Napi::Value>; napi_env = napi_env__*; napi_value = napi_value__*; napi_finalize = void (*)(napi_env__*, void*, void*)]’:
npm ERR! /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi-inl.h:1965:39:   required from ‘napi_status Napi::CreateFunction(napi_env, const char*, napi_callback, CbData*, napi_value__**) [with CbData = Napi::details::CallbackData<Napi::Value (*)(const Napi::CallbackInfo&), Napi::Value>; napi_env = napi_env__*; napi_callback = napi_value__* (*)(napi_env__*, napi_callback_info__*); napi_value = napi_value__*]’
npm ERR! /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi-inl.h:2021:38:   required from ‘static Napi::Function Napi::Function::New(napi_env, Callable, const char*, void*) [with Callable = Napi::Value (*)(const Napi::CallbackInfo&); napi_env = napi_env__*]’
npm ERR! ../src/odbc.cpp:148:45:   required from here
npm ERR! /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi-inl.h:63:47: error: invalid conversion from ‘napi_finalize’ {aka ‘void (*)(napi_env__*, void*, void*)’} to ‘node_api_nogc_finalize’ {aka ‘void (*)(const napi_env__*, void*, void*)’} [-fpermissive]
npm ERR!    63 |   status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr);
npm ERR!       |                                               ^~~~~~~~~
npm ERR!       |                                               |
npm ERR!       |                                               napi_finalize {aka void (*)(napi_env__*, void*, void*)}
npm ERR! In file included from /home/the_user/.cache/node-gyp/18.20.2/include/node/node_api.h:12,
npm ERR!                  from /home/the_user/the_project/server_side_code/node_modules/node-addon-api/napi.h:4,
npm ERR!                  from ../src/odbc.h:27,
npm ERR!                  from ../src/odbc.cpp:22:
npm ERR! /home/the_user/.cache/node-gyp/18.20.2/include/node/js_native_api.h:516:43: note:   initializing argument 4 of ‘napi_status napi_add_finalizer(napi_env, napi_value, void*, node_api_nogc_finalize, void*, napi_ref__**)’
npm ERR!   516 |                    node_api_nogc_finalize finalize_cb,
npm ERR!       |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
npm ERR! make: *** [odbc.target.mk:133: Release/obj.target/odbc/src/odbc.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 5.14.0-427.24.1.el9_4.ppc64le
npm ERR! gyp ERR! command "/home/the_user/.nvm/versions/node/v18.20.2/bin/node" "/home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6/odbc.node" "--module_name=odbc" "--module_path=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
npm ERR! gyp ERR! cwd /home/the_user/the_project/server_side_code/node_modules/odbc
npm ERR! gyp ERR! node -v v18.20.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/home/the_user/.nvm/versions/node/v18.20.2/bin/node /home/the_user/.nvm/versions/node/v18.20.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/home/the_user/the_project/server_side_code/node_modules/odbc/lib/bindings/napi-v6 --napi_version=9 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/the_user/the_project/server_side_code/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:303:5)
npm ERR! node-pre-gyp ERR! System Linux 5.14.0-427.24.1.el9_4.ppc64le
npm ERR! node-pre-gyp ERR! command "/home/the_user/.nvm/versions/node/v18.20.2/bin/node" "/home/the_user/the_project/server_side_code/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/the_user/the_project/server_side_code/node_modules/odbc
npm ERR! node-pre-gyp ERR! node -v v18.20.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/the_user/.npm/_logs/2024-07-28T20_20_44_555Z-debug-0.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions