discordjs / opus

Native opus bindings for node
MIT License
197 stars 57 forks source link

unable to npm install macOS #145

Open JohnA28 opened 1 year ago

JohnA28 commented 1 year ago

Unable to install @discordjs/opus, getting the error output below.

npm ERR! code 1
npm ERR! path /Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh /var/folders/v9/tssb2ckj5vb394w6nqj07x8h0000gn/T/install-db9dedbe.sh
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mapping_matrix.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_compare.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/repacketizer.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_frame.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/inner_product_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_vector_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pred_coefs_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/schur_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/warped_autocorrelation_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/burg_modified_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LPC_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_inv_pred_gain_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_copy_vector_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/noise_shape_analysis_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/pitch_analysis_core_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/bwexpander_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_analysis_filter_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_scale_ctrl_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/corrMatrix_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/encode_frame_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/sort_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pitch_lags_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/residual_energy_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_analysis_filter_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/autocorrelation_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/k2a_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/regularize_correlations_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LTP_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/energy_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/apply_sine_window_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/wrappers_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/float/process_gains_FLP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_quant_pred.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_inv_pred_gain.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/process_NLSFs.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/check_control_input.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_del_dec_quant.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_analysis_filter.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/dec_API.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/sort.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/VAD.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_AR2.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_fit.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/control_SNR.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_parameters.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/pitch_est_tables.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/warped_autocorrelation_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/apply_sine_window_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/residual_energy16_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/schur64_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/residual_energy_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/noise_shape_analysis_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/encode_frame_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/schur_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/autocorr_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/burg_modified_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/pitch_analysis_core_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_LTP_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_LPC_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/corrMatrix_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/k2a_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/LTP_scale_ctrl_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/process_gains_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/k2a_Q16_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/regularize_correlations_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/LTP_analysis_filter_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/vector_ops_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_pitch_lags_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/fixed/find_pred_coefs_FIX.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/control_audio_bandwidth.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decoder_set_fs.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_unpack.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_rom.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/shell_coder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pulses.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander_32.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_core.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/PLC.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_WB.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/table_LSF_cos.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pulses_per_block.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_gain.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/inner_prod_aligned.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2_3.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ_del_dec.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pitch.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ_weights_laroia.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/interpolate.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/debug.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_other.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/LP_variable_cutoff.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_decode.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/encode_pulses.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/control_codec.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_LR_to_MS.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/HP_variable_cutoff.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/encode_indices.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/init_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_encode_pred.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/init_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_IIR_FIR.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_up2_HQ.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/sigm_Q15.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/sum_sqr_shift.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_LTP.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/code_signs.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_NB_MB.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/gain_quant.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pitch_lag.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_stabilize.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_find_predictor.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/A2NLSF.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF2A.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/VQ_WMat_EC.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_encode.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/log2lin.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_decode_pred.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/lin2log.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/CNG.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/enc_API.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/biquad_alt.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/quant_LTP_gains.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_down_FIR.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/ana_filt_bank_1.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_MS_to_LR.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/silk/decode_indices.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/rate.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/entdec.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/modes.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/celt_lpc.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/laplace.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/cwrs.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/celt.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/entcode.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/celt_decoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/celt_encoder.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/mdct.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/quant_bands.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/vq.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/bands.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/kiss_fft.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/entenc.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/mathops.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/pitch.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/arm/arm_celt_map.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/arm/armcpu.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/arm/celt_neon_intr.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/celt/arm/pitch_neon_intr.o
npm ERR!   LIBTOOL-STATIC Release/opus.a
npm ERR!   CXX(target) Release/obj.target/opus/src/node-opus.o
npm ERR! 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/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.4.5
npm ERR! node-pre-gyp info using node@16.17.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.8.0 and node@16.17.0 (node-v93 ABI, unknown) (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/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.17.0 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.17.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.8 found at "/opt/homebrew/opt/python@3.10/bin/python3.10"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/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   '/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/johnalban/Library/Caches/node-gyp/16.17.0/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=/Users/johnalban/Library/Caches/node-gyp/16.17.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/johnalban/Library/Caches/node-gyp/16.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus',
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@9.0.0
npm ERR! gyp info using node@16.17.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../deps/opus/silk/fixed/autocorr_FIX.c:47:29: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!     *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch);
npm ERR!                             ^~~~~~~~~
npm ERR! ../deps/opus/celt/celt_lpc.h:63:38: note: passing argument to parameter 'x' here
npm ERR! int _celt_autocorr(const opus_val16 *x, opus_val32 *ac,
npm ERR!                                      ^
npm ERR! ../deps/opus/silk/fixed/autocorr_FIX.c:47:40: warning: incompatible pointer types passing 'opus_int32 *' (aka 'int *') to parameter of type 'opus_val32 *' (aka 'float *') [-Wincompatible-pointer-types]
npm ERR!     *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch);
npm ERR!                                        ^~~~~~~
npm ERR! ../deps/opus/celt/celt_lpc.h:63:53: note: passing argument to parameter 'ac' here
npm ERR! int _celt_autocorr(const opus_val16 *x, opus_val32 *ac,
npm ERR!                                                     ^
npm ERR! 2 warnings generated.
npm ERR! ../deps/opus/silk/fixed/burg_modified_FIX.c:98:30: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
npm ERR!                              ^~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:52: note: passing argument to parameter '_x' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                    ^
npm ERR! ../deps/opus/silk/fixed/burg_modified_FIX.c:98:37: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
npm ERR!                                     ^~~~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:74: note: passing argument to parameter '_y' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                                          ^
npm ERR! ../deps/opus/silk/fixed/burg_modified_FIX.c:98:48: warning: incompatible pointer types passing 'opus_int32[24]' to parameter of type 'opus_val32 *' (aka 'float *') [-Wincompatible-pointer-types]
npm ERR!             celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch );
npm ERR!                                                ^~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:137:46: note: passing argument to parameter 'xcorr' here
npm ERR!                                  opus_val32 *xcorr, int len, int max_pitch, int arch);
npm ERR!                                              ^
npm ERR! 3 warnings generated.
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:27: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
npm ERR!                           ^~~~~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:52: note: passing argument to parameter '_x' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                    ^
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:39: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
npm ERR!                                       ^~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:74: note: passing argument to parameter '_y' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                                          ^
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:200:66: warning: incompatible pointer types passing 'opus_int32[65]' to parameter of type 'opus_val32 *' (aka 'float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch );
npm ERR!                                                                  ^~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:137:46: note: passing argument to parameter 'xcorr' here
npm ERR!                                  opus_val32 *xcorr, int len, int max_pitch, int arch);
npm ERR!                                              ^
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:27: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
npm ERR!                           ^~~~~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:52: note: passing argument to parameter '_x' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                    ^
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:39: warning: incompatible pointer types passing 'const opus_int16 *' (aka 'const short *') to parameter of type 'const opus_val16 *' (aka 'const float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
npm ERR!                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:136:74: note: passing argument to parameter '_y' here
npm ERR! void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y,
npm ERR!                                                                          ^
npm ERR! ../deps/opus/silk/fixed/pitch_analysis_core_FIX.c:616:74: warning: incompatible pointer types passing 'opus_int32[22]' to parameter of type 'opus_val32 *' (aka 'float *') [-Wincompatible-pointer-types]
npm ERR!         celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch );
npm ERR!                                                                          ^~~~~~~
npm ERR! ../deps/opus/celt/arm/pitch_arm.h:137:46: note: passing argument to parameter 'xcorr' here
npm ERR!                                  opus_val32 *xcorr, int len, int max_pitch, int arch);
npm ERR!                                              ^
npm ERR! 6 warnings generated.
npm ERR! ../deps/opus/celt/bands.c:904:85: warning: parameter 'b' set but not used [-Wunused-but-set-parameter]
npm ERR! static unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y, int b,
npm ERR!                                                                                     ^
npm ERR! 1 warning generated.
npm ERR! clang: error: no such file or directory: 'projects/Discord-bot/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/opus/src/node-opus.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.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 22.2.0
npm ERR! 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/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" "--module_name=opus" "--module_path=/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
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 '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1093:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 22.2.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus
npm ERR! node-pre-gyp ERR! node -v v16.17.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.5
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/johnalban/.npm/_logs/2023-02-19T04_46_15_172Z-debug-0.log

Further details:

I've tried uninstalling opus and cleaning my cache to avail. Any help would be much appreciated.

Jiralite commented 1 year ago

Do you not have build tools?

JohnA28 commented 1 year ago

Do you not have build tools?

I'm sorry but could you elaborate further? I'm in the learning stage for all of this so I'm not fully sure what you're asking me. As far I know I needed a recent version of Python, what else am I missing?

Jiralite commented 1 year ago

On macOS, I believe you should open a terminal and run xcode-select --install and try again.

JohnA28 commented 1 year ago

I get the message "xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates" and when I go to software update it says my Mac is up to date.

JoeKyx commented 1 year ago

Hey, exactly the same for me. xcode-select --install also returns "xcode-select: error: command line tools are already installed, use "Software Update" to install updates"

PAdventures commented 1 year ago

I'm suffering here too. I have a similar log but it's essentially the same

Woofer21 commented 8 months ago

I get the message "xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates" and when I go to software update it says my Mac is up to date.

cc @PAdventures & @JoeKyx

Are you still running into this issue? I know we are like a year detached from this now but I was just running into this on my own project and it seems like a space in your working dir will cause the build to fail. After I removed the space from the folder it worked fine.

PAdventures commented 8 months ago

I get the message "xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates" and when I go to software update it says my Mac is up to date.

cc @PAdventures & @JoeKyx

Are you still running into this issue? I know we are like a year detached from this now but I was just running into this on my own project and it seems like a space in your working dir will cause the build to fail. After I removed the space from the folder it worked fine.

I just removed it from my packages.

darkmaga commented 3 months ago

if u have python >= 3.12 installed via brew, you can try to install python-setuptools that worked for me