yunshengtian / Assemble-Them-All

[SIGGRAPH Asia 2022] Assemble Them All: Physics-Based Planning for Generalizable Assembly by Disassembly

Home Page:http://assembly.csail.mit.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python setup.py

Zhaohhya opened this issue · comments

When running "python setup.py",“subprocess. CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1”
image

Just want to check first, have you cloned the repo with "git clone --recurse-submodules"?

If so, could you post the complete output message for me to better debug it? Thanks

Thank you for your reply, the first step is done
in the step "conda env create -f environment.yml" readline==7.0 and ncurses==6.3 i can't find these two packages, I'm using win system, I check the information, “ncurses” is only available in linux, “readline” I used “pyreadline” instead, is it possible, the following is is the part of my output after “python setup.py install”

D:\assemble\Assemble-Them-All\simulation\externals\libigl\include\igl\squared_edge_lengths.cpp(19,15): warning C4244: “
初始化”: 从“Eigen::EigenBase<Derived>::Index”转换到“const int”,可能丢失数据 [D:\assemble\Assemble-Them-All\simulation\build\temp.win
-amd64-3.7\Release\redmax\redmax.vcxproj]
          with
          [
              Derived=Eigen::Matrix<int,-1,-1,0,-1,-1>
          ]
  odeBoxBox.cpp
D:\assemble\Assemble-Them-All\simulation\redmax\CollisionDetection\ode\odeBoxBox.cpp(309,27): error C2065: “M_PI”: 未声 明的
标识符 `[D:\assemble\Assemble-Them-All\simulation\build\temp.win-amd64-3.7\Release\redmax\redmax.vcxproj]`
D:\assemble\Assemble-Them-All\simulation\redmax\CollisionDetection\ode\odeBoxBox.cpp(310,11): error C2065: “M_PI”: 未声 明的
标识符 [D:\assemble\Assemble-Them-All\simulation\build\temp.win-amd64-3.7\Release\redmax\redmax.vcxproj]
D:\assemble\Assemble-Them-All\simulation\redmax\CollisionDetection\ode\odeBoxBox.cpp(310,32): error C2065: “M_PI”: 未声 明的
标识符 [D:\assemble\Assemble-Them-All\simulation\build\temp.win-amd64-3.7\Release\redmax\redmax.vcxproj]
D:\assemble\Assemble-Them-All\simulation\redmax\CollisionDetection\ode\odeBoxBox.cpp(318,14): error C2065: “M_PI”: 未声 明的
标识符 [D:\assemble\Assemble-Them-All\simulation\build\temp.win-amd64-3.7\Release\redmax\redmax.vcxproj]
D:\assemble\Assemble-Them-All\simulation\redmax\CollisionDetection\ode\odeBoxBox.cpp(318,38): error C2065: “M_PI”: 未声 明的
标识符 [D:\assemble\Assemble-Them-All\simulation\build\temp.win-amd64-3.7\Release\redmax\redmax.vcxproj]
...
...
  正在生成代码...
Traceback (most recent call last):
  File "setup.py", line 66, in <module>
    zip_safe=False,
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 32, in run
    self.build_extension(ext)
  File "setup.py", line 58, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "C:\Users\87182\anaconda3\envs\assembly\lib\subprocess.py", line 328, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.

The win system does not support these three dependencies
ResolvePackageNotFound: readline=8.2 ncurses=6.4 libcxx=16.0.6

These packages are not really needed. And the anaconda environment yml file generated from mac/linux is not compatible with the windows system.

I would suggest manually install the following packages from pip:
networkx numpy pyquaternion python-fcl rtree scipy sortedcontainers tqdm trimesh

I retried with ubuntu 18.04 and had a problem with python setup.py install, here is the output messgae:

running install
running bdist_egg
running egg_info
writing redmax_py.egg-info/PKG-INFO
writing dependency_links to redmax_py.egg-info/dependency_links.txt
writing top-level names to redmax_py.egg-info/top_level.txt
reading manifest file 'redmax_py.egg-info/SOURCES.txt'
writing manifest file 'redmax_py.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
CMake Warning (dev) at /usr/local/share/cmake-3.23/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:20 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at externals/CMakeLists.txt:25 (add_subdirectory):
  The source directory

    /home/zhao/github/Assemble-Them-All/simulation/externals/libigl

  does not contain a CMakeLists.txt file.


CMake Error at externals/CMakeLists.txt:34 (add_subdirectory):
  The source directory

    /home/zhao/github/Assemble-Them-All/simulation/externals/pybind11

  does not contain a CMakeLists.txt file.


CMake Deprecation Warning at externals/sdfgen/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at externals/glfw/CMakeLists.txt:10 (cmake_policy):
  The OLD behavior for policy CMP0042 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
CMake Error at redmax/CMakeLists.txt:9 (pybind11_add_module):
  Unknown CMake command "pybind11_add_module".


-- Configuring incomplete, errors occurred!
See also "/home/zhao/github/Assemble-Them-All/simulation/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/home/zhao/github/Assemble-Them-All/simulation/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 66, in <module>
    zip_safe=False,
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 32, in run
    self.build_extension(ext)
  File "setup.py", line 57, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/home/zhao/anaconda3/envs/assembly/lib/python3.7/subprocess.py", line 328, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/zhao/github/Assemble-Them-All/simulation', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/zhao/github/Assemble-Them-All/simulation/build/lib.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/zhao/anaconda3/envs/assembly/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

Then I realized that the libigl and pyblind11 folders were empty.
and I have run sudo apt-get install libgl1-mesa-dev xorg-dev before the step

These folders are empty because you need to clone with submodules. "git clone --recurse-submodules"

Successful install, thanks a lot for your help