bambocher / pocketsphinx-python

Python interface to CMU Sphinxbase and Pocketsphinx libraries
https://pypi.python.org/pypi/pocketsphinx
Other
373 stars 187 forks source link

Fix MacOS Build #71

Open illegalbyte opened 2 years ago

illegalbyte commented 2 years ago

The location of OpenAL frameworks have been moved from system library to be a part of the Xcode Command Line Tools, this was preventing the current (17/01/2021) pip install to fail on current MacOS versions.

See issue 67: https://github.com/bambocher/pocketsphinx-python/issues/67

usr-ein commented 2 years ago

I've tested this PR on macOs Monterey (12.2.1) with python 3.9.1 and it worked like a charm 👍🏻

tbenst commented 2 years ago

I tried on macOS Monterey with Python 3.8.12 with M1 Pro, and got an error:

> pip install git+https://github.com/illegalbyte/pocketsphinx-python
[...]
deps/sphinxbase/src/libsphinxad/ad_openal.c:43:10: fatal error: 'al.h' file not found
    #include <al.h>

Seems to be a continuation of https://github.com/bambocher/pocketsphinx-python/issues/28 and https://github.com/bambocher/pocketsphinx-python/issues/67

ldaumail commented 2 years ago

What should be done exactly with a MacOS Monterey?

Here is my issue: (MacOS Monterey v12.4) I am currently trying to follow the steps recommended on https://github.com/bambocher/pocketsphinx-python/issues/28

I replaced two of these lines with:

include <OpenAL/al.h>

include <OpenAL/alc.h>

(as recommended on the issue above)

Though, I still have an error when running: python setup.py install 3 warnings generated. clang -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -Wl,-headerpad,0x1000 build/temp.macosx-10.14-x86_64-cpython-38/deps/sphinxbase/src/libsphinxad/ad_openal.o build/temp.macosx-10.14-x86_64-cpython-38/swig/sphinxbase/ad_openal_wrap.o /System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL -o build/lib.macosx-10.14-x86_64-cpython-38/sphinxbase/_ad_openal.cpython-38-darwin.so clang: error: no such file or directory: '/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL' error: command '/usr/bin/clang' failed with exit code 1

EDIT: I solved it with https://github.com/bambocher/pocketsphinx-python/commit/3a56428adab7fafd37e3b78825f159d1997ed871 Thanks!