Python-RVO2 icon indicating copy to clipboard operation
Python-RVO2 copied to clipboard

Error: Build in PopOS 21.10

Open cbhua opened this issue 3 years ago • 0 comments
trafficstars

Hi guys, I meet a building problem when I follow the tutorial to run python setup.py build in my server.

Error Report

[  9%] Building CXX object src/CMakeFiles/RVO.dir/Agent.cpp.o
[ 18%] Building CXX object src/CMakeFiles/RVO.dir/KdTree.cpp.o
[ 27%] Building CXX object src/CMakeFiles/RVO.dir/Obstacle.cpp.o
[ 36%] Building CXX object src/CMakeFiles/RVO.dir/RVOSimulator.cpp.o
[ 45%] Linking CXX static library libRVO.a
[ 45%] Built target RVO
[ 54%] Building CXX object examples/CMakeFiles/Blocks.dir/Blocks.cpp.o
[ 63%] Linking CXX executable Blocks
/home/user_name/Miniconda/envs/py6/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/user_name/Miniconda/envs/py6/lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
/home/user_name/Miniconda/envs/py6/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/user_name/Miniconda/envs/py6/lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: error: ld returned 1 exit status
gmake[2]: *** [examples/CMakeFiles/Blocks.dir/build.make:98: examples/Blocks] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:902: examples/CMakeFiles/Blocks.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 49, in <module>
    'Topic :: Software Development :: Libraries :: Python Modules',
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 20, in run
    subprocess.check_call(['cmake', '--build', '.'], cwd=build_dir)
  File "/home/user_name/Miniconda/envs/py6/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2.

The key point I noticed that is undefined reference to aligned_alloc@GLIBC_2.16 and I also tried to search this but nothing got. Questions about this error has been many years ago, seems this rarely happens.

Actually I'm not that familar with CMake side, so maybe this is a stupid question. But if someone has meet the same problem please teach me how to solve it. So grateful!

System Info

  • OS: Pop!_OS 21.10 x86_64
  • Kernel: 5.16.11-76051611-generic
  • libstdc++ Version: /usr/lib32/libstdc++.so.6 -> libstdc++.so.6.0.29
  • g++ -dumpversion: 9.3.0
  • Conda Version: 4.10.3
  • Conda Env Python Version: 3.6

What I tried

  1. Reinstall conda and conda env: the same problem happens;
  2. Do not use conda env, instead of using system python env;
  3. Upgrade system, including g++ and other libs;

What I guess

  1. Conda's problem, maybe the Cython has some conflict with conda env?
  2. Some out-of-date lib soft links, maybe can be fixed manually.

Sharing any ideas about this would be welcome and I would be so grateful.

cbhua avatar Apr 07 '22 14:04 cbhua