Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Install ODBC on Mac M3 Apple Silicon ARM64 #390

Closed
Relbot opened this issue Jul 22, 2024 · 4 comments
Closed

[ERROR] Install ODBC on Mac M3 Apple Silicon ARM64 #390

Relbot opened this issue Jul 22, 2024 · 4 comments

Comments

@Relbot
Copy link

Relbot commented Jul 22, 2024

I tried to install the ODBC library on my new Apple M3 (ARM64)
As it seems there there is no prebuilt for this and then it tried to compile it with node-gyp where the error occurs.
Error: https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-darwin-arm64-napi-v6.tar.gz

404 Not Found on https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-darwin-arm64-napi-v6.tar.gz

If I install it like this

npm i odbc

I get the following error

npm error code 1
npm error path /Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc
npm error command failed
npm error command sh -c node-pre-gyp install --fallback-to-build
npm error CXX(target) Release/obj.target/odbc/src/odbc.o
npm error Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/Users/<name>/.Trash/odbc 18-13-40-142/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 error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | darwin | arm64
npm error node-pre-gyp info check checked for "/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/lib/bindings/napi-v6/odbc.node" (not found)
npm error node-pre-gyp http GET https://github.com/markdirish/node-odbc/releases/download/v2.4.8/odbc-v2.4.8-darwin-arm64-napi-v6.tar.gz
npm error 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-darwin-arm64-napi-v6.tar.gz 
npm error node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v115 ABI, unknown) (falling back to source compile with node-gyp) 
npm error 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-darwin-arm64-napi-v6.tar.gz 
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info ok 
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.12.4 found at "/Library/Frameworks/Python.framework/Versions/3.12/bin/python3"
npm error gyp info spawn /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/<name>/Library/Caches/node-gyp/20.15.1/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/<name>/Library/Caches/node-gyp/20.15.1',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/<name>/Library/Caches/node-gyp/20.15.1/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info ok 
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error clang: error: no such file or directory: '18-13-40-142/node_modules/node-addon-api'
npm error make: *** [Release/obj.target/odbc/src/odbc.o] Error 1
npm error gyp ERR! build error 
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Darwin 23.3.0
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/lib/bindings/napi-v6/odbc.node" "--module_name=odbc" "--module_path=/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/lib/bindings/napi-v6" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
npm error gyp ERR! cwd /Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc
npm error gyp ERR! node -v v20.15.1
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok 
npm error node-pre-gyp ERR! build error 
npm error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc/lib/bindings/napi-v6/odbc.node --module_name=odbc --module_path=/Users/<name>/.Trash/odbc 18-13-40-142/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 error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
npm error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm error node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Darwin 23.3.0
npm error node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/<name>/.Trash/odbc 18-13-40-142/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd /Users/<name>/.Trash/odbc 18-13-40-142/node_modules/odbc
npm error node-pre-gyp ERR! node -v v20.15.1
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/<name>/.npm/_logs/2024-07-22T16_13_43_660Z-debug-0.log

Help is really appreciated :)

@Relbot Relbot changed the title [ERROR] Install ODBC Max M3 Apple Silicon ARM64 [ERROR] Install ODBC on Mac M3 Apple Silicon ARM64 Jul 22, 2024
@MasterOdin
Copy link

MasterOdin commented Jul 24, 2024

Installing this used to work fine on a M1 machine where it'd be built from scratch, but has recently broke, I think because of nodejs/node#52229?

Hopefully a new release is made from master that has #381 merged, which should hopefully fix things?

@jorgeramirezamora
Copy link

Same here, I already installed unixodbc but my npm install is now failing

@MasterOdin
Copy link

Moving to having "odbc": "github:markdirish/node-odbc" in my package.json fixed the issue for me.

@Relbot
Copy link
Author

Relbot commented Jul 25, 2024

I tried this yesterday as well, and it fixed it for me too. Thanks for all the answers. Wishing you a wonderful rest of the week.

@Relbot Relbot closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants