Rantanen / node-opus

Opus bindings for Node.js
MIT License
79 stars 32 forks source link

Installation Issue on Linux x64 #57

Closed Chailotl closed 6 years ago

Chailotl commented 6 years ago

This is NOT on Windows, that's a path I wish I never went down. This is on a fresh install of a Debian-based Linux x64 installation on a VPS from DigitalOcean.

What should happen:

root@server:~/Mikolai# npm install node-opus
+ node-opus@0.3.0
installed 1 package in 7.052s
root@server:~/Mikolai#

What actually happens: (exaggeration)

root@server:~/Mikolai# npm install node-opus
npm ERR! check engine
root@server:~/Mikolai#
Click to expand for full logs ``` root@server:~/Mikolai# npm install node-opus > ref@1.3.5 install /root/Mikolai/node_modules/ref > node-gyp rebuild make: Entering directory '/root/Mikolai/node_modules/ref/build' CXX(target) Release/obj.target/binding/src/binding.o g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. binding.target.mk:95: recipe for target 'Release/obj.target/binding/src/binding.o' failed make: *** [Release/obj.target/binding/src/binding.o] Error 4 make: Leaving directory '/root/Mikolai/node_modules/ref/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.4.0-130-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/Mikolai/node_modules/ref gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok > node-opus@0.3.0 install /root/Mikolai/node_modules/node-opus > node-gyp rebuild make: Entering directory '/root/Mikolai/node_modules/node-opus/build' CC(target) Release/obj.target/libopus/deps/opus/src/opus.o CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o CC(target) Release/obj.target/libopus/deps/opus/src/opus_encoder.o CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o CC(target) Release/obj.target/libopus/deps/opus/src/repacketizer.o CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o CC(target) Release/obj.target/libopus/deps/opus/celt/bands.o CC(target) Release/obj.target/libopus/deps/opus/celt/celt.o CC(target) Release/obj.target/libopus/deps/opus/celt/celt_encoder.o CC(target) Release/obj.target/libopus/deps/opus/celt/celt_decoder.o CC(target) Release/obj.target/libopus/deps/opus/celt/cwrs.o CC(target) Release/obj.target/libopus/deps/opus/celt/entcode.o CC(target) Release/obj.target/libopus/deps/opus/celt/entdec.o CC(target) Release/obj.target/libopus/deps/opus/celt/entenc.o CC(target) Release/obj.target/libopus/deps/opus/celt/kiss_fft.o CC(target) Release/obj.target/libopus/deps/opus/celt/laplace.o CC(target) Release/obj.target/libopus/deps/opus/celt/mathops.o CC(target) Release/obj.target/libopus/deps/opus/celt/mdct.o CC(target) Release/obj.target/libopus/deps/opus/celt/modes.o CC(target) Release/obj.target/libopus/deps/opus/celt/pitch.o CC(target) Release/obj.target/libopus/deps/opus/celt/celt_lpc.o CC(target) Release/obj.target/libopus/deps/opus/celt/quant_bands.o CC(target) Release/obj.target/libopus/deps/opus/celt/rate.o CC(target) Release/obj.target/libopus/deps/opus/celt/vq.o CC(target) Release/obj.target/libopus/deps/opus/silk/CNG.o CC(target) Release/obj.target/libopus/deps/opus/silk/code_signs.o CC(target) Release/obj.target/libopus/deps/opus/silk/init_decoder.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_core.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_frame.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_parameters.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_indices.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pulses.o CC(target) Release/obj.target/libopus/deps/opus/silk/decoder_set_fs.o CC(target) Release/obj.target/libopus/deps/opus/silk/dec_API.o CC(target) Release/obj.target/libopus/deps/opus/silk/enc_API.o CC(target) Release/obj.target/libopus/deps/opus/silk/encode_indices.o CC(target) Release/obj.target/libopus/deps/opus/silk/encode_pulses.o CC(target) Release/obj.target/libopus/deps/opus/silk/gain_quant.o CC(target) Release/obj.target/libopus/deps/opus/silk/interpolate.o CC(target) Release/obj.target/libopus/deps/opus/silk/LP_variable_cutoff.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_decode.o CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ.o CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ_del_dec.o CC(target) Release/obj.target/libopus/deps/opus/silk/PLC.o CC(target) Release/obj.target/libopus/deps/opus/silk/shell_coder.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_gain.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_LTP.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_NB_MB.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_WB.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_other.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pitch_lag.o CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pulses_per_block.o CC(target) Release/obj.target/libopus/deps/opus/silk/VAD.o CC(target) Release/obj.target/libopus/deps/opus/silk/control_audio_bandwidth.o CC(target) Release/obj.target/libopus/deps/opus/silk/quant_LTP_gains.o CC(target) Release/obj.target/libopus/deps/opus/silk/VQ_WMat_EC.o CC(target) Release/obj.target/libopus/deps/opus/silk/HP_variable_cutoff.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_encode.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_unpack.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_del_dec_quant.o CC(target) Release/obj.target/libopus/deps/opus/silk/process_NLSFs.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_LR_to_MS.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_MS_to_LR.o CC(target) Release/obj.target/libopus/deps/opus/silk/check_control_input.o CC(target) Release/obj.target/libopus/deps/opus/silk/control_SNR.o CC(target) Release/obj.target/libopus/deps/opus/silk/init_encoder.o CC(target) Release/obj.target/libopus/deps/opus/silk/control_codec.o CC(target) Release/obj.target/libopus/deps/opus/silk/A2NLSF.o CC(target) Release/obj.target/libopus/deps/opus/silk/ana_filt_bank_1.o CC(target) Release/obj.target/libopus/deps/opus/silk/biquad_alt.o CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander_32.o CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander.o CC(target) Release/obj.target/libopus/deps/opus/silk/debug.o CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pitch.o CC(target) Release/obj.target/libopus/deps/opus/silk/inner_prod_aligned.o CC(target) Release/obj.target/libopus/deps/opus/silk/lin2log.o CC(target) Release/obj.target/libopus/deps/opus/silk/log2lin.o CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_analysis_filter.o CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_inv_pred_gain.o CC(target) Release/obj.target/libopus/deps/opus/silk/table_LSF_cos.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF2A.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_stabilize.o CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ_weights_laroia.o CC(target) Release/obj.target/libopus/deps/opus/silk/pitch_est_tables.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2_3.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_AR2.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_down_FIR.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_IIR_FIR.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_up2_HQ.o CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_rom.o CC(target) Release/obj.target/libopus/deps/opus/silk/sigm_Q15.o CC(target) Release/obj.target/libopus/deps/opus/silk/sort.o CC(target) Release/obj.target/libopus/deps/opus/silk/sum_sqr_shift.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_decode_pred.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_encode_pred.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_find_predictor.o CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_quant_pred.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/apply_sine_window_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/corrMatrix_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/encode_frame_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LPC_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LTP_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pitch_lags_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pred_coefs_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_analysis_filter_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_analysis_filter_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_scale_ctrl_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/noise_shape_analysis_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/prefilter_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/process_gains_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/regularize_correlations_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/residual_energy_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/solve_LS_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/warped_autocorrelation_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/wrappers_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/autocorrelation_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/burg_modified_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/bwexpander_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/energy_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/inner_product_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/k2a_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/levinsondurbin_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_inv_pred_gain_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/pitch_analysis_core_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_copy_vector_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_vector_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/schur_FLP.o CC(target) Release/obj.target/libopus/deps/opus/silk/float/sort_FLP.o AR(target) Release/obj.target/deps/opus.a COPY Release/opus.a CXX(target) Release/obj.target/node-opus/src/node-opus.o g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. node-opus.target.mk:144: recipe for target 'Release/obj.target/node-opus/src/node-opus.o' failed make: *** [Release/obj.target/node-opus/src/node-opus.o] Error 4 make: Leaving directory '/root/Mikolai/node_modules/node-opus/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.4.0-130-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/Mikolai/node_modules/node-opus gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN discord.js@11.3.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN Mikolai@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 (node_modules/ref): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 install: `node-gyp rebuild` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-opus@0.3.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-opus@0.3.0 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! /root/.npm/_logs/2018-07-19T13_42_40_755Z-debug.log root@server:~/Mikolai# ```

Yes, I have build-essentials, auto-conf, libtool, as well as node-gyp, I had enough headaches with half installed software.

I've also pulled the git repository and manually built it with ./configure --enable-static --disable-shared --with-pic and then make, and dragged it to the node_modules folder, but that cropped up another issue about missing bindings, so I then tried node-gyp rebuild, which starts up and requires the module without a hitch, but when it came to using the module it crashes without an error log.

God have mercy on my tortured soul.

Rantanen commented 6 years ago

https://bitcointalk.org/index.php?topic=304389.0

How is your VPS for memory? You might have luck compiling the libraries on a similar (same architecture, same OS version or at the very least the same library versions, including glibc) Linux box with node-gyp and then copying the binaries.

Chailotl commented 6 years ago

If I recall correctly the VPS has 512 megabytes of RAM. Is that not enough?

Chailotl commented 6 years ago

I was on mobile and had missed the link you sent, and sweet mother of mercy it worked! A thousand thanks Rantanen!

Chailotl commented 6 years ago

Oh my goodness, it fixed every other bizarre npm install issue I had too, many thanks!