MacOS 安装 Kaldi 的 PortAudio
Oct. 17, 2019, 10:07 a.m.
read: 1939
如果是基于kaldi的工程编译,则进入 kaldi/tools/运行
./install_portaudio.sh
发生错误 ld: library not found for -lgcc_s.10.4
vim install_portaudio.sh
行数 96-106
加入一行 -e ‘s/-mmacosx-version-min=10.3//g’ \
if [ “$MACOS” != “” ]; then
echo “detected MacOS operating system … trying to fix Makefile”
mv Makefile Makefile.bck
cat Makefile.bck | sed -e ‘s/-isysroot\ \/Developer\/SDKs\/MacOSX10.4u.sdk//g’ \
-e ‘s/-mmacosx-version-min=10.3//g’ \
-e ‘s/-Werror//g’ -e ‘s/-arch i386//g’ -e ‘s/-arch ppc64//g’ -e ‘s/-arch ppc//g’ \
Makefile
mv include/pa_mac_core.h include/pa_mac_core.h.bck
cat include/pa_mac_core.h.bck \
| sed ‘s/\/\/#include \/#include \ /g’ \
include/pa_mac_core.h
fi
就可以编译成功