NVlabs / FoundationPose

[CVPR 2024 Highlight] FoundationPose: Unified 6D Pose Estimation and Tracking of Novel Objects
https://nvlabs.github.io/FoundationPose/
Other
1.01k stars 112 forks source link

Error while running build_all_conda.sh #41

Closed ShangQingLiu closed 1 month ago

ShangQingLiu commented 1 month ago

Environment: Ubuntu 20.04, CUDA11.8, RTX3090, gcc=9.4.0, g++=9.4.0

Problem: Using instruction install conda environment on the last step: (foundationpose) 1sliu@tamsGPU4:~/FoundationPose/bundlesdf/mycuda$ python -m pip install -e . Obtaining file:///homeL/1sliu/FoundationPose/bundlesdf/mycuda Preparing metadata (setup.py) ... done Installing collected packages: common Attempting uninstall: common Found existing installation: common 0.1.2 Uninstalling common-0.1.2: Successfully uninstalled common-0.1.2 Running setup.py develop for common error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
    /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'extra_cflags'
      warnings.warn(msg)
    /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'extra_cuda_cflags'
      warnings.warn(msg)
    running develop
    /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running egg_info
    writing common.egg-info/PKG-INFO
    writing dependency_links to common.egg-info/dependency_links.txt
    writing top-level names to common.egg-info/top_level.txt
    reading manifest file 'common.egg-info/SOURCES.txt'
    writing manifest file 'common.egg-info/SOURCES.txt'
    running build_ext
    /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
      warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
    building 'common' extension
    creating /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build
    creating /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39
    Emitting ninja build file /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    1.11.1.git.kitware.jobserver-1
    creating build/lib.linux-x86_64-cpython-39
    g++ -pthread -B /homeL/1sliu/anaconda3/envs/foundationpose/compiler_compat -shared -Wl,-rpath,/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath-link,/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath,/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath-link,/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/bindings.o /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/common.o -L/homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-39/common.cpython-39-x86_64-linux-gnu.so
    g++: error: /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/bindings.o: No such file or directory
    g++: error: /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/common.o: No such file or directory
    error: command '/usr/bin/g++' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Rolling back uninstall of common Moving to /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/common-0.1.2.dist-info/ from /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/~ommon-0.1.2.dist-info Moving to /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/common/ from /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/~ommon error: subprocess-exited-with-error

× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [52 lines of output] /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'extra_cflags' warnings.warn(msg) /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'extra_cuda_cflags' warnings.warn(msg) running develop /homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated. !!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
writing common.egg-info/PKG-INFO
writing dependency_links to common.egg-info/dependency_links.txt
writing top-level names to common.egg-info/top_level.txt
reading manifest file 'common.egg-info/SOURCES.txt'
writing manifest file 'common.egg-info/SOURCES.txt'
running build_ext
/homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
  warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'common' extension
creating /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build
creating /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39
Emitting ninja build file /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
creating build/lib.linux-x86_64-cpython-39
g++ -pthread -B /homeL/1sliu/anaconda3/envs/foundationpose/compiler_compat -shared -Wl,-rpath,/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath-link,/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath,/homeL/1sliu/anaconda3/envs/foundationpose/lib -Wl,-rpath-link,/homeL/1sliu/anaconda3/envs/foundationpose/lib -L/homeL/1sliu/anaconda3/envs/foundationpose/lib /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/bindings.o /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/common.o -L/homeL/1sliu/anaconda3/envs/foundationpose/lib/python3.9/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-39/common.cpython-39-x86_64-linux-gnu.so
g++: error: /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/bindings.o: No such file or directory
g++: error: /homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/common.o: No such file or directory
error: command '/usr/bin/g++' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Progress: I look into the code and find the problem is about installing the bundlesdf, do you have any idea why their were two object file missing as bindings.o and common.o?

Note: I have install the eigen under the conda environment using cmake prfix under ~/anaconda3/envs/foundationpose/include/eigen3 and change the /bundlesdf/mycuda/setup.py include eigen directory as include_dirs=[ "~/anaconda3/envs/foundationpose/include/eigen3", ],

wenbowen123 commented 1 month ago

seems related https://github.com/NVlabs/FoundationPose/issues/35

ShangQingLiu commented 1 month ago

I have tried to follow the setting on #35, unfortunately it still failed.

NTheodoris commented 1 month ago

It is not solved by changing the c++17

wenbowen123 commented 1 month ago

I have tried to follow the setting on #35, unfortunately it still failed.

did you run build_all_conda.sh directly instead of manual installation? Also do you have this error if you use docker?

ShangQingLiu commented 1 month ago

I have tried both run build_all_conda.sh or by look into the bash code in build_all_conda.sh run line by line.

For docker, due to personal privilege issue I am still under apply to, so unfortunately I could not give a try now.

wenbowen123 commented 1 month ago

/homeL/1sliu/FoundationPose/bundlesdf/mycuda/build/temp.linux-x86_64-cpython-39/bindings.o Maybe the temp.linux-x86_64-cpython-39 folder implies the wrong location?

ShangQingLiu commented 1 month ago

The temp.linux-x86_64-cpython-39 is actually over there, I think it generated while it build. I am still looking into the error. I would quickly run another machine to try docker option this week.