facebookresearch / rlr-audio-propagation

Audio propagation engine - Meta Reality Labs Research.
Other
16 stars 5 forks source link

version `GLIBC_2.27' not found #9

Open chenjinyubuaa opened 2 years ago

chenjinyubuaa commented 2 years ago

Hello! I tried to make the habitat_sim from the source code. And I meet this problem when import in python.

import habitat_sim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/**/anaconda3/envs/habitatn/lib/python3.7/site-packages/habitat_sim-0.2.2-py3.7-linux-x86_64.egg/habitat_sim/__init__.py", line 13, in <module>
    import habitat_sim._ext.habitat_sim_bindings
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /**/anaconda3/envs/habitatn/lib/python3.7/site-packages/habitat_sim-0.2.2-py3.7-linux-x86_64.egg/habitat_sim/_ext/libRLRAudioPropagation.so)

It seems that you compile the libRLRAudioPropagation.so under GLIBC_2.27, but our cluster does not support that version of GLIBC_2.27. So I prefer to compile this repo myself. I wonder if you will release the source code of this repo?

sanchitgarg commented 2 years ago

Hey @chenjinyubuaa , we are discussing how to support this internally. Will get back to you soon.

chenjinyubuaa commented 2 years ago

Thank you very much!

chenjinyubuaa commented 2 years ago

Hey @sanchitgarg , I fix this by making new glibc-2.29, and only export the libm.so.6 into the $LD_LIBRARY_PATH.

auroracramer commented 2 years ago

We're also encountering this issue. We're attempting to try @chenjinyubuaa's approach and build glibc-2.29 from source and add libm.so.6 to $LD_LIBRARY_PATH

auroracramer commented 2 years ago

Hmm I get a segfault when using this approach. :grimacing:

auroracramer commented 2 years ago

@chenjinyubuaa can you detail the steps you did to get this working?

chenjinyubuaa commented 2 years ago

@chenjinyubuaa can you detail the steps you did to get this working?

After you make the GLIBC version 2.29, mv the libm.so outside the install directory, and just export the libm.so into the $LD_LIBRARY_PATH. The other .so files may cause the core dump issue.

auroracramer commented 2 years ago

I'm still encountering some issues. I'm installing this in a Singularity container (bootstrapped from the Docker nvidia/cudagl:10.2-devel-ubuntu18.04 image and with the dependencies installed) using Ubuntu 18.04 and trying this:

# Install habitat-sim
git clone -b v0.2.2 git@github.com:facebookresearch/habitat-sim.git
cd habitat-sim
python setup.py build_ext --headless --audio --with-cuda --bullet --parallel 8 install
cd /ext3/code

# Build glibc
cd /ext3/code # working directory
wget http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
tar xzf glibc-2.29.tar.gz
cd glibc-2.29
mkdir build
cd build
../configure --prefix=/ext3/local
make
cd /ext3/code
mkdir libm
cp glibc-2.29/build/math/libm.so.6 libm/
export LD_LIBRARY_PATH=/ext3/code/libm:$LD_LIBRARY_PATH

When I run python -c "import habitat_sim" I get this error:

free(): invalid pointer
Aborted (core dumped)

I also tried installing habitat_sim after adding libm.so.6 to $LD_LIBRARY_PATH in case there were issues with other parts of the build dependent on it, but I got the same error. I also tried the same process in an Ubuntu 16.04 container and got pretty much the same thing (though that resulted in a long core dump stack trace).

Am I missing a step here?

chenjinyubuaa commented 2 years ago

@auroracramer Try to build the habitat-lab, and import habitat. I meet the same core dump bug after making the habitat-sim only and import habitat_sim. After I make the habitat-lab, I can run the code in soud-spaces successfully.

auroracramer commented 2 years ago

@chenjinyubuaa Ah if I do python -c "import habitat; import habitat_sim" after installing habitat-lab then it works as you say. The soundspaces code seems to be able to run as well. Thanks for clarifying! :)

ChanganVR commented 1 year ago

Posting the complete building instructions here:

  1. build glibc of the desired version as follows
    git clone git://sourceware.org/git/glibc.git
    cd glibc
    git checkout glibc-2.29
    mkdir build
    cd build
    export glibc_install="$(pwd)/install"
    ../configure --prefix "$glibc_install"
    make -j `nproc`
    make install -j `nproc`
  2. run the following code to copy the needed binary file
    mkdir $HOME/bin
    cp $(pwd)/install/lib/libm.so.6 $HOME/bin/
  3. add this line of code to the .bashrc file
    export LD_LIBRARY_PATH=$HOME/bin:$LD_LIBRARY_PATH