ERROR, example from deepspeech repo README

Hi! I have followed the instructions on https://github.com/mozilla/DeepSpeech/tree/v0.6.0 to the “T” and I am running into some errors. Googling didn’t yield any hits that looked useful.

h-0.6.0-models/lm.binary --trie deepspeech-0.6.0-models/trie --audio audio/2830-3980-0043.wav
Traceback (most recent call last):
  File "/Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/bin/deepspeech", line 5, in <module>
    from deepspeech.client import main
  File "/Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/lib/python3.6/site-packages/deepspeech/__init__.py", line 23, in <module>
    from deepspeech.impl import PrintVersions as printVersions
  File "/Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/lib/python3.6/site-packages/deepspeech/impl.py", line 13, in <module>
    from ._impl import *
ImportError: dlopen(/Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/lib/python3.6/site-packages/deepspeech/_impl.cpython-36m-darwin.so, 2): Symbol not found: _SecKeyCopyExternalRepresentation
  Referenced from: /Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/lib/python3.6/site-packages/deepspeech/lib//libdeepspeech.so
  Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
 in /Users/susaneraly/SKYMIND/deepspeech/deepspeech-venv/lib/python3.6/site-packages/deepspeech/lib//libdeepspeech.so

Hi @eraly - welcome to the forum :slightly_smiling_face:

I don’t know the answer, but I think a few more details may help others diagnose the situation.

From my own brief Googling on this, that error seems to come up on Macs and from the output it looks like you’re on a Mac. Could you confirm things like the version of the OS etc?

Did you notice any errors in the installation and do you have the output from that available still?

And you are using the non-gpu instructions aren’t you? (I can’t see from the limited command line details you gave as it doesn’t show the whole command)

Hello there. Thank you for the welcome.
I was hoping this was a “oh i’ve seen that before. happens all the time” kind of error…which is why i didn’t post more details. Sorry about that!
I am on a Mac, 10.11.6. No GPU.
Pip says successfully installed. Full std out/err here
Link to std out/err when running deep speech here

Is it possible this is just too old ?

I’m finding references to the documentation that states macOS 10.12+ for _SecKeyCopyExternalRepresentation, so this would be consistent :confused: Unfortunately, we were supposed to target 10.10. I’m not a mac user, so I don’t really know what to expect from that …

Weird, it should have picked the env var we set: https://github.com/pyenv/pyenv/blob/f3d008fddd8db8a492490bd79f7020dd10e271d9/plugins/python-build/bin/python-build#L2285-L2294

@eraly I’m not sure I understand what you mean with " I have followed the instructions on https://github.com/mozilla/DeepSpeech/tree/v0.6.0 to the “T” ". What is this “T” you are referring about ?

I don’t have macOS so I can’t really investigate the symbols exported by SWIG’s wrapper, but a strings _impl.cpython-36m-darwin.so does not reveal anything close to the symbol you report missing _SecKeyCopyExternalRepresentation.

is there some extra context informations we are missing here ? I don’t see how we can help so far, it’s unclear whether the issue is on our side.

Maybe the error is misleading:

$ strings lib/libdeepspeech.so | grep SecKey
@_SecKeyCopyExternalRepresentation
_SecKeyCopyExternalRepresentation

Hi there! To the T just means I followed the instructions exactly, more here.

Yes, my mac is ancient but as you mentioned it is a supported version. There is no extra context information you are missing here. All there is are the outputs I linked to in the gists and the fact that I followed what is in the deep speech repo read me.

Well, it seems that TensorFlow does its own thing in the back. @reuben tested forcing the needed env var, but it was still linking those symbols.

I’m not sure if we can keep <10.12 compatibility in light of this.

Unfortunately, we don’t have an easy way to test that …

The weird thing is that I couldn’t find where exactly in TensorFlow that specific dep is being specified.