Skip to content

Commit a606c6c

Browse files
committed
Merge branch 'BrianeMouncer-pr/1.11.0' of https://github.com/BrianMouncer/azure-docs-pr into BrianeMouncer-pr/1.11.0
2 parents 9126f57 + 9704c50 commit a606c6c

File tree

2 files changed

+143
-4
lines changed

2 files changed

+143
-4
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: How to configure RHEL/CentOS 7
3+
titleSuffix: Azure Cognitive Services
4+
description: Learn how to configure RHEL/CentOS 7 so that SpeechSDK can be used.
5+
services: cognitive-services
6+
author: pankopon
7+
manager: jhakulin
8+
ms.service: cognitive-services
9+
ms.subservice: speech-service
10+
ms.topic: conceptual
11+
ms.date: 03/20/2020
12+
ms.author: pankopon
13+
---
14+
15+
# Configure RHEL/CentOS 7 for Speech SDK
16+
17+
Red Hat Enterprise Linux (RHEL) 8 x64 and CentOS 8 x64 are officially supported from Speech SDK version 1.10.0 onwards.
18+
19+
It is also possible to use Speech SDK on RHEL/CentOS 7 x64, but this requires updating the C++ compiler (for C++ development) and the shared C++ runtime library on the system.
20+
21+
To check the C++ compiler version, run a command:
22+
23+
```bash
24+
g++ --version
25+
```
26+
27+
If the compiler is installed, the output on vanilla RHEL/CentOS 7 should be like:
28+
29+
```
30+
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
31+
```
32+
33+
i.e. GCC major version 4. This does not have full support for the C\+\+11 standard that Speech SDK uses, and an attempt to compile a C++ program with Speech SDK headers will result in compilation errors.
34+
35+
Another thing to check is the version of the shared C++ runtime library (libstdc++). Most of Speech SDK is implemented as native C++ libraries, thus it depends on libstdc++ regardless of the actual application development language.
36+
37+
To find the location of libstdc++ on the system, run a command:
38+
39+
```bash
40+
ldconfig -p | grep libstdc++
41+
```
42+
43+
The output on vanilla RHEL/CentOS 7 (x64) is:
44+
45+
```
46+
libstdc++.so.6 (libc6,x86-64) => /lib64/libstdc++.so.6
47+
```
48+
49+
Based on the above, check the version definitions with a command:
50+
51+
```bash
52+
strings /lib64/libstdc++.so.6 | egrep "GLIBCXX_|CXXABI_"
53+
```
54+
55+
The output on vanilla RHEL/CentOS 7 (with only the highest version definitions shown):
56+
57+
```
58+
...
59+
GLIBCXX_3.4.19
60+
...
61+
CXXABI_1.3.7
62+
...
63+
```
64+
65+
Speech SDK requires **CXXABI_1.3.9** and **GLIBCXX_3.4.21**. (This can be seen e.g. by running `ldd libMicrosoft.CognitiveServices.Speech.core.so` on Speech SDK libraries from the Linux package.)
66+
67+
It is recommended that the version of GCC installed on the system is at least **5.4.0**, with matching runtime libraries.
68+
69+
## Example
70+
71+
The following is a full set of commands to configure RHEL/CentOS 7 x64 for development (C++, C#, Java, Python) with SpeechSDK 1.10.0 or later.
72+
73+
```bash
74+
# Only run ONE of the following two commands
75+
# - for CentOS 7:
76+
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
77+
# - for RHEL 7:
78+
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
79+
80+
# Install development tools and libraries
81+
sudo yum update -y
82+
sudo yum groupinstall -y "Development tools"
83+
sudo yum install -y alsa-lib dotnet-sdk-2.1 java-1.8.0-openjdk-devel openssl python3
84+
sudo yum install -y gstreamer1 gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-bad-free gstreamer1-plugins-ugly-free
85+
86+
# Build GCC 5.4.0 and runtimes and install them under /usr/local
87+
sudo yum install -y gmp-devel mpfr-devel libmpc-devel
88+
curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O
89+
tar jxf gcc-5.4.0.tar.bz2
90+
mkdir gcc-5.4.0-build && cd gcc-5.4.0-build
91+
../gcc-5.4.0/configure --enable-languages=c,c++ --disable-bootstrap --disable-multilib --prefix=/usr/local
92+
make -j$(nproc)
93+
sudo make install-strip
94+
95+
# Set SSL cert file location
96+
# (this is required for any development/testing with Speech SDK)
97+
export SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt
98+
99+
# Add updated C/C++ runtimes to the library path
100+
# (this is required for any development/testing with Speech SDK)
101+
export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
102+
103+
# For C++ development only:
104+
# - add the updated compiler to PATH
105+
# (note, /usr/local/bin should be already first in PATH on vanilla systems)
106+
# - add Speech SDK libraries from the Linux tar package to LD_LIBRARY_PATH
107+
# (note, use the actual path to extracted files!)
108+
export PATH=/usr/local/bin:$PATH
109+
hash -r # reset cached paths in the current shell session just in case
110+
export LD_LIBRARY_PATH=/path/to/extracted/SpeechSDK-Linux-1.10.0/lib/x64:$LD_LIBRARY_PATH
111+
112+
# For Python: install the Speech SDK module
113+
python3 -m pip install azure-cognitiveservices-speech --user
114+
```
115+
116+
## Next steps
117+
118+
> [!div class="nextstepaction"]
119+
> [About the Speech SDK](speech-sdk.md)

articles/cognitive-services/Speech-Service/speech-sdk.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,30 @@ For Windows, we support the following languages:
4242
# [Linux](#tab/linux)
4343

4444
> [!NOTE]
45-
> Currently, we only support Ubuntu 16.04, Ubuntu 18.04, Debian 9, Red Hat Enterprise Linux (RHEL) 8, and CentOS 8 on the following target architectures:
46-
> - x86 (Debian/Ubuntu), x64, ARM32 (Debian/Ubuntu), and ARM64 (Debian/Ubuntu) for C++ development
47-
> - x64, ARM32 (Debian/Ubuntu), and ARM64 (Debian/Ubuntu) for Java
48-
> - x64 for .NET Core and Python
45+
> Currently, we only support the following distributions and development languages/platforms:
46+
>
47+
> | Distribution | Development |
48+
> |:-|:-|
49+
> |Ubuntu 16.04 x86 |C++|
50+
> |Ubuntu 16.04 x64 |C++, Java, .NET Core, Python|
51+
> |Ubuntu 16.04 ARM32 |C++, Java, .NET Core|
52+
> |Ubuntu 16.04 ARM64 |C++, Java, .NET Core[<sup>[1]</sup>](#footnote1)|
53+
> |Ubuntu 18.04 x86 |C++|
54+
> |Ubuntu 18.04 x64 |C++, Java, .NET Core, Python|
55+
> |Ubuntu 18.04 ARM32 |C++, Java, .NET Core|
56+
> |Ubuntu 18.04 ARM64 |C++, Java, .NET Core[<sup>[1]</sup>](#footnote1)|
57+
> |Debian 9 x86 |C++|
58+
> |Debian 9 x64 |C++, Java, .NET Core, Python|
59+
> |Debian 9 ARM32 |C++, Java, .NET Core|
60+
> |Debian 9 ARM64 |C++, Java, .NET Core[<sup>[1]</sup>](#footnote1)|
61+
> |Red Hat Enterprise Linux (RHEL) 7 x64[<sup>[2]</sup>](#footnote2) |C++, Java, .NET Core, Python|
62+
> |Red Hat Enterprise Linux (RHEL) 8 x64 |C++, Java, .NET Core, Python|
63+
> |CentOS 7 x64[<sup>[2]</sup>](#footnote2) |C++, Java, .NET Core, Python|
64+
> |CentOS 8 x64 |C++, Java, .NET Core, Python|
65+
>
66+
> **[<a name="footnote1">1</a>]** Linux ARM64 requires .NET Core 3.x (dotnet-sdk-3.x package) for proper ARM64 support.<br>
67+
> **[<a name="footnote2">2</a>]** Follow the instructions on [how to configure RHEL/CentOS 7 for Speech SDK](~/articles/cognitive-services/speech-service/how-to-configure-rhel-centos-7.md).
68+
4969

5070
Make sure you have the required libraries installed by running the following shell commands:
5171

0 commit comments

Comments
 (0)