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

Python demo cannot run lib/linux/x86_64/libpv_porcupine.so on ChromeOS Linux #69

Closed
phmagic opened this issue Aug 16, 2018 · 1 comment

Comments

@phmagic
Copy link

phmagic commented Aug 16, 2018

Expected behavior

python demo/python/porcupine_demo.py --keyword_file_paths resources/keyword_files/alexa_linux.ppn

Demo runs.

Actual behavior

Error:

Traceback (most recent call last):
  File "demo/python/porcupine_demo.py", line 210, in <module>
    input_device_index=args.input_audio_device_index).run()
  File "demo/python/porcupine_demo.py", line 95, in run
    sensitivities=[self._sensitivity] * num_keywords)
  File "demo/python/../../binding/python/porcupine.py", line 69, in __init__
    library = cdll.LoadLibrary(library_path)
  File "/usr/local/conda3/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/conda3/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: demo/python/../../lib/linux/x86_64/libpv_porcupine.so: failed to map segment from shared object

Steps to reproduce the behavior

Environment:

ChromeOS on Acer CXI2
Linux localhost 3.14.0 #1 SMP PREEMPT Fri Jun 22 17:20:26 PDT 2018 x86_64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz GenuineIntel GNU/Linux

Steps to reproduce:
Commented out soundfile dependency because libsndfile is not installed in the ChromeOS linux.
Start terminal with ChromeOS (Ctrl + Alt + T)
Clone Porcupine repo.
Installed portaudio, pyaudio.
Run python: python demo/python/porcupine_demo.py --keyword_file_paths resources/keyword_files/alexa_linux.ppn

I know ChromeOS Linux is not the typical use case. Looking for any guidance on where this error could stem from since failed to map segment from shared object is not specific for me.

@phmagic phmagic changed the title Python demo cannot run lib/linux/x86_64/libpv_porcupine.so Python demo cannot run lib/linux/x86_64/libpv_porcupine.so on ChromeOS Linux Aug 16, 2018
@phmagic
Copy link
Author

phmagic commented Aug 16, 2018

Figured it out, for others coming later:
ChromeOS mounts the /home directory of chronos user as noexec. You need to remount with exec permissions.

sudo mount -o remount,exec /home/chronos

@phmagic phmagic closed this as completed Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant