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

i am getting g++ error #12

Open
msverma101 opened this issue Jul 31, 2023 · 2 comments
Open

i am getting g++ error #12

msverma101 opened this issue Jul 31, 2023 · 2 comments

Comments

@msverma101
Copy link

pip install -e .
Obtaining file:///home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv
Preparing metadata (setup.py) ... done
Installing collected packages: FastMinv
Running setup.py develop for FastMinv
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
    running develop
    running egg_info
    creating FastMinv.egg-info
    writing FastMinv.egg-info/PKG-INFO
    writing dependency_links to FastMinv.egg-info/dependency_links.txt
    writing top-level names to FastMinv.egg-info/top_level.txt
    writing manifest file 'FastMinv.egg-info/SOURCES.txt'
    reading manifest file 'FastMinv.egg-info/SOURCES.txt'
    writing manifest file 'FastMinv.egg-info/SOURCES.txt'
    running build_ext
    building 'FastMinv' extension
    creating /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build
    creating /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38
    Emitting ninja build file /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    /home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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)
    /home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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()
    1.11.1.git.kitware.jobserver-1
    creating build/lib.linux-x86_64-cpython-38
    g++ -pthread -B /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat -L/home/student_sneha/anaconda3/envs/pytorch3d1/lib -Wl,-rpath=/home/student_sneha/anaconda3/envs/pytorch3d1/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/M3x3Inv.o /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/Matrix3x3InvKernels.o -L/home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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-38/FastMinv.cpython-38-x86_64-linux-gnu.so
    /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat/ld: cannot find /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/M3x3Inv.o: No such file or directory
    /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat/ld: cannot find /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/Matrix3x3InvKernels.o: No such file or directory
    collect2: error: ld returned 1 exit status
    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.

error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
running develop
running egg_info
creating FastMinv.egg-info
writing FastMinv.egg-info/PKG-INFO
writing dependency_links to FastMinv.egg-info/dependency_links.txt
writing top-level names to FastMinv.egg-info/top_level.txt
writing manifest file 'FastMinv.egg-info/SOURCES.txt'
reading manifest file 'FastMinv.egg-info/SOURCES.txt'
writing manifest file 'FastMinv.egg-info/SOURCES.txt'
running build_ext
building 'FastMinv' extension
creating /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build
creating /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38
Emitting ninja build file /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
/home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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)
/home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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()
1.11.1.git.kitware.jobserver-1
creating build/lib.linux-x86_64-cpython-38
g++ -pthread -B /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat -L/home/student_sneha/anaconda3/envs/pytorch3d1/lib -Wl,-rpath=/home/student_sneha/anaconda3/envs/pytorch3d1/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/M3x3Inv.o /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/Matrix3x3InvKernels.o -L/home/student_sneha/anaconda3/envs/pytorch3d1/lib/python3.8/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-38/FastMinv.cpython-38-x86_64-linux-gnu.so
/home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat/ld: cannot find /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/M3x3Inv.o: No such file or directory
/home/student_sneha/anaconda3/envs/pytorch3d1/compiler_compat/ld: cannot find /home/student_sneha/Downloads/git/thesis/REC-MV/FastMinv/build/temp.linux-x86_64-cpython-38/Matrix3x3InvKernels.o: No such file or directory
collect2: error: ld returned 1 exit status
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.

@msverma101
Copy link
Author

msverma101 commented Jul 31, 2023

i followed the steps given bellow and i am stuck at this error can you please tell me what i can do here

conda create -n pytorch3d1 python=3.8
conda activate pytorch3d1
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
conda install -c conda-forge -c fvcore -c iopath fvcore iopath
conda install -c bottler nvidiacub
conda install pytorch3d=0.4.0 -c pytorch3d

bash install.sh dint work and gave me the error from this post.

#10 (comment)

i solved that by addint "'--version" instead of "-v"

then i did

cd FastMinv/
994 python setup.py install
995 CUDA_HOME='/usr/local/cuda'

still the same error as above and then

pip isntall -e .
nothing changed in the error

@lingtengqiu
Copy link
Collaborator

Please follow SelfRecon setup to build FastMinv Lib

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

2 participants