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

MacBook Pro M2: dyld[7797]: missing symbol called #165

Open
objectkuan opened this issue Nov 20, 2024 · 2 comments
Open

MacBook Pro M2: dyld[7797]: missing symbol called #165

objectkuan opened this issue Nov 20, 2024 · 2 comments
Labels
bug Something isn't working need repro

Comments

@objectkuan
Copy link

Issue description

  1. Prepare some PCM data. In my case it's 16kHz mono, 16bits.
  2. Encode it with 960 bytes per frame.
  3. Watch the crash

After digging into the missing symbols, I managed to fix that by adding "opus/silk/arm/NSQ_neon.c" to the "target_arch==\"arm64\"" condition in @discordjs/opus/deps/binding.gyp .

Code sample

import { OpusEncoder } from '@discordjs/opus';

const buffer = ...;
const bytesPerFrame = 960;
const frame = buffer.subarray(0, bytesPerFrame);
const encoder = new OpusEncoder(16000, 1);
const opus = encoder.encode(frame);

Versions

  • @discordjs/opus: 0.9.0
  • nodejs: v22.11.0
  • typescript: 5.6.3
  • OS: macOS 14.6.1 (23G93)
  • Chip: Apple M2

Issue priority

Medium (should be fixed soon)

@objectkuan objectkuan added bug Something isn't working need repro labels Nov 20, 2024
@deepso7
Copy link

deepso7 commented Dec 3, 2024

getting same error on macos, M2 pro
encoding pcm16, 24kHz mono

@twlite
Copy link

twlite commented Dec 28, 2024

Since this is yet to be reviewed, I have prepared a list of alternative opus libs for node which could work for the people having issues:

1. mediaplex

mediaplex has opus api which is exactly the same as @discordjs/opus but is written in rust instead of c++ which makes the installation easier.

2. @evan/opus

@evan/opus has different api but gets the job done and author claims it to be faster than other alternatives. This one has native and wasm versions.

3. opusscript

opusscript is similar to @discordjs/opus but uses webassembly.

4. opus-decoder

If you only need a decoder, there's opus-decoder which uses webassembly.

5. @evan/wasm

@evan/wasm contains bunch of stuff but also has opus encoder/decoder. It is also a webassembly module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need repro
Projects
None yet
Development

No branches or pull requests

3 participants