heroku / heroku-pg-extras

A heroku plugin for awesome pg:* commands that are also great and fun and super.
MIT License
1.33k stars 102 forks source link

Installation returns errors on ARM Mac #210

Open quantus opened 3 months ago

quantus commented 3 months ago

Running heroku plugins:install heroku-pg-extras returns errors:

~/Documents heroku plugins:install heroku-pg-extras
Installing plugin heroku-pg-extras... ⣟ [1/4] Resolving packages...
warning heroku-pg-extras > heroku-cli-util@8.0.12: This package has been deprecated. Install the new supported version at https://www.npmjs.com/package/@heroku/heroku-cli-util
warning heroku-pg-extras > heroku-cli-addons > heroku-cli-util@6.0.15: This package has been deprecated. Install the new supported version at https://www.npmjs.com/package/@heroku/heroku-cli-util
warning heroku-pg-extras > execa > cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
Installing plugin heroku-pg-extras... ⣯ [1/4] Resolving packages...
warning heroku-pg-extras > @heroku-cli/plugin-pg-v5 > heroku-cli-util@8.0.12: This package has been deprecated. Install the new supported version at https:/
Installing plugin heroku-pg-extras... ⣾ [1/4] Resolving packages...
warning heroku-pg-extras > @heroku-cli/plugin-pg-v5 > @heroku-cli/plugin-addons > heroku-cli-util@8.0.12: This package has been deprecated. Install the new
Installing plugin heroku-pg-extras... ⣽ [4/4] Building fresh packages...
warning Error running install script for optional dependency: "/Users/pekka/.local/share/heroku/node_modules/cpu-features: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/pekka/.local/share/heroku/node_modules/cpu-features
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@10.2.0
gyp info using node@16.20.2 | darwin | arm64
gyp info find Python using Python version 3.12.4 found at \"/opt/homebrew/opt/python@3.12/bin/python3.12\"

gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
gyp info spawn args [
gyp info spawn args '/Users/pekka/.config/yarn/global/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/pekka/.local/share/heroku/node_modules/cpu-features/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/pekka/.config/yarn/global/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/pekka/Library/Caches/node-gyp/16.20.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/pekka/Library/Caches/node-gyp/16.20.2',
gyp info spawn args '-Dnode_gyp_dir=/Users/pekka/.config/yarn/global/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/pekka/Library/Caches/node-gyp/16.20.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/pekka/.local/share/heroku/node_modules/cpu-features',
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 spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  ACTION Configuring dependencies /Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build/Makefile
/bin/sh: cmake: command not found
make: *** [/Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build/Makefile] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/pekka/.config/yarn/global/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Darwin 23.5.0
gyp ERR! command \"/opt/homebrew/Cellar/heroku/8.11.5/lib/client/8.11.5-df5cd30/bin/node\" \"/Users/pekka/.yarn/bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/pekka/.local/share/heroku/node_modules/cpu-features
gyp ERR! node -v v16.20.2
gyp ERR! node-gyp -v v10.2.0
Installing plugin heroku-pg-extras... installed v1.2.5

I noticed the /bin/sh: cmake: command not found error and after running brew install cmake it's now returning some other errors:

~/Documents heroku plugins:install heroku-pg-extras
Installing plugin heroku-pg-extras... ⣽ [4/4] Building fresh packages...
warning Error running install script for optional dependency: "/Users/pekka/.local/share/heroku/node_modules/cpu-features: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/pekka/.local/share/heroku/node_modules/cpu-features
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@10.2.0
gyp info using node@16.20.2 | darwin | arm64
gyp info find Python using Python version 3.12.4 found at \"/opt/homebrew/opt/python@3.12/bin/python3.12\"

gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
gyp info spawn args [
gyp info spawn args '/Users/pekka/.config/yarn/global/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/pekka/.local/share/heroku/node_modules/cpu-features/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/pekka/.config/yarn/global/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/pekka/Library/Caches/node-gyp/16.20.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/pekka/Library/Caches/node-gyp/16.20.2',
gyp info spawn args '-Dnode_gyp_dir=/Users/pekka/.config/yarn/global/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/pekka/Library/Caches/node-gyp/16.20.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/pekka/.local/share/heroku/node_modules/cpu-features',
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 spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  ACTION Configuring dependencies /Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build/Makefile
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for getauxval
-- Looking for getauxval - not found
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build
  TOUCH Release/obj.target/config_deps.stamp
  ACTION Building dependencies /Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build/libcpu_features.a
[ 11%] Building C object CMakeFiles/utils.dir/src/filesystem.c.o
[ 22%] Building C object CMakeFiles/utils.dir/src/stack_line_reader.c.o
[ 33%] Building C object CMakeFiles/utils.dir/src/string_view.c.o
[ 33%] Built target utils
[ 44%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/hwcaps.c.o
[ 55%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/unix_features_aggregator.c.o
[ 55%] Built target unix_based_hardware_detection
[ 66%] Building C object CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o
In file included from /Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/src/cpuinfo_arm.c:15:
/Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h:118:2: error: \"Including cpuinfo_arm.h from a non-arm target.\"
#error \"Including cpuinfo_arm.h from a non-arm target.\"
 ^
1 error generated.
make[3]: *** [CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o] Error 1
make[2]: *** [CMakeFiles/cpu_features.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [/Users/pekka/.local/share/heroku/node_modules/cpu-features/deps/cpu_features/build/libcpu_features.a] Error 2
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/pekka/.config/yarn/global/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Darwin 23.5.0
gyp ERR! command \"/opt/homebrew/Cellar/heroku/8.11.5/lib/client/8.11.5-df5cd30/bin/node\" \"/Users/pekka/.yarn/bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/pekka/.local/share/heroku/node_modules/cpu-features
gyp ERR! node -v v16.20.2
gyp ERR! node-gyp -v v10.2.0
Installing plugin heroku-pg-extras... installed v1.2.5

My MacOS version is 14.5 (23F79) and heroku cli version is heroku/8.11.5 darwin-arm64 node-v16.20.2. I tested some pg:extras commands and those seem to be working.