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

version `GLIBC_2.27' not found #56

Open
eli7gn opened this issue Feb 12, 2022 · 3 comments
Open

version `GLIBC_2.27' not found #56

eli7gn opened this issue Feb 12, 2022 · 3 comments

Comments

@eli7gn
Copy link

eli7gn commented Feb 12, 2022

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

@yc-li20
Copy link

yc-li20 commented May 13, 2022

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?

@eli7gn
Copy link
Author

eli7gn commented May 23, 2022

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".

@hagenw
Copy link
Member

hagenw commented May 23, 2022

See audeering/opensmile#47 for a possible solution.

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

3 participants