opensmile-python icon indicating copy to clipboard operation
opensmile-python copied to clipboard

version `GLIBC_2.27' not found

Open eli7gn opened this issue 4 years ago • 3 comments

Hi guys, please help me with this issue:

[ERROR] OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/lang/lib/python3.9/site-packages/opensmile/core/bin/linux/libSMILEapi.so) Traceback (most recent call last):   File "/var/lang/lib/python3.9/importlib/init.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "", line 1030, in _gcd_import   File "", line 1007, in _find_and_load   File "", line 986, in _find_and_load_unlocked   File "", line 680, in _load_unlocked   File "", line 850, in exec_module   File "", line 228, in _call_with_frames_removed   File "/var/task/lambda_function.py", line 15, in     from get_prediction import get_prediction   File "/var/task/get_prediction.py", line 7, in     from feature_extraction import get_features   File "/var/task/feature_extraction.py", line 19, in     import opensmile as opnsmile   File "/var/lang/lib/python3.9/site-packages/opensmile/init.py", line 6, in     from opensmile.core.smile import (   File "/var/lang/lib/python3.9/site-packages/opensmile/core/smile.py", line 13, in     from opensmile.core.SMILEapi import (   File "/var/lang/lib/python3.9/site-packages/opensmile/core/SMILEapi.py", line 23, in     smileapi = cdll.LoadLibrary(smileapi_path)   File "/var/lang/lib/python3.9/ctypes/init.py", line 452, in LoadLibrary     return self._dlltype(name)   File "/var/lang/lib/python3.9/ctypes/init.py", line 374, in init     self._handle = _dlopen(self._name, mode)

*** Server AWS SageMaker system. System information: sh-4.2$ uname -r 4.14.248-129.473.amzn1.x86_64

***Docker image:

FROM public.ecr.aws/lambda/python:3.9 as build-image

ARG FUNCTION_DIR="./app/"
ARG NUMBA_CACHE_DIR="/tmp"

RUN yum install -y tar xz yum-utils
RUN yum remove  cmake
RUN yum update -y

# start install sudo, wget and openssl, which is required for building CMake
RUN yum install sudo wget openssl-devel -y

### start install development tools
RUN sudo yum groupinstall "Development Tools" -y
RUN gcc --version
RUN g++ --version

# Download, build and install cmake
RUN wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
RUN tar -xvzf cmake-3.18.0.tar.gz
RUN cd cmake-3.18.0/ && \
       ./bootstrap && \
       make && \
       make install

### start opensmile compilation and 
RUN wget  https://github.com/audeering/opensmile/archive/master.zip && \
                                         unzip master.zip && \
                                         cd opensmile-master/ && \
                                         ./build.sh 
### end opensmile compilation

## start glibc installation
RUN mkdir ~/glibc227
RUN cd ~/glibc227
RUN wget http://ftp.gnu.org/gnu/glibc/glibc-2.27.tar.gz
RUN tar zxvf glibc-2.27.tar.gz && \
                 cd glibc-2.27 && \
                   mkdir build && \
                      cd build && \
  ../configure --prefix=/opt/glibc-2.27  && \
                      make -j4 && \
                  make install 
# Install aws-lambda-cpp build dependencies
RUN yum update -y

RUN yum install -y git cmake libmad-devel libsndfile-devel gd-devel boost-devel

RUN yum install -y install apt-utils gcc libpq-dev libsndfile-dev

RUN yum update -y
RUN python -m pip install -U scikit-image
RUN python -m pip install boto3
COPY ${FUNCTION_DIR} ./
COPY requirements.txt ${FUNCTION_DIR}
WORKDIR ${FUNCTION_DIR}
RUN python -m pip install -r requirements.txt

# Install the runtime interface client
RUN python -m pip install \
        --target ${FUNCTION_DIR} \
        awslambdaric

RUN show-installed 
CMD [ "lambda_function.lambda_handler" ]

In the lambda I add this line: os.environ['LD_LIBRARY_PATH'] = '/opt/glibc-2.27/lib:' + os.environ['LD_LIBRARY_PATH']

def lambda_handler(event, context): ...

Please help me

eli7gn avatar Feb 12 '22 20:02 eli7gn

I got the same error: /lib64/libm.so.6: version `GLIBC_2.27' not found. My machine is: ldd (Ubuntu GLIBC 2.31-0ubuntu9.7) 2.31. It seems opensmile does not support new GLIBC version? Have you fixed that?

yc-li20 avatar May 13 '22 14:05 yc-li20

I got the same error: /lib64/libm.so.6: version `GLIBC_2.27' not found. My machine is: ldd (Ubuntu GLIBC 2.31-0ubuntu9.7) 2.31. It seems opensmile does not support new GLIBC version? Have you fixed that?

Hi, so sorry I've not. Probably you right: "It seems opensmile does not support new GLIBC version".

eli7gn avatar May 23 '22 09:05 eli7gn

See https://github.com/audeering/opensmile/issues/47 for a possible solution.

hagenw avatar May 23 '22 09:05 hagenw