DavidGillsjo / SRW-Net

Semantic Room Wireframe Detection from a single perspective image
MIT License
72 stars 9 forks source link

Errors building #1

Closed ariel415el closed 2 years ago

ariel415el commented 2 years ago

Hi I have problems installing this repo. When I run build.sh as suggested in the instructions i get the following error even when I update g++ and build-essesntials

running build_ext
building 'parsing._C' extension
Emitting ninja build file /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc -I/home/ariel/.local/lib/python3.8/site-packages/torch/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/linesegment.cu -o /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/linesegment.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/linesegment.o 
/usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc -I/home/ariel/.local/lib/python3.8/site-packages/torch/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/linesegment.cu -o /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/linesegment.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
nvcc fatal   : Failed to preprocess host compiler properties.

[2/2] c++ -MMD -MF /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/vision.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc -I/home/ariel/.local/lib/python3.8/site-packages/torch/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ariel/.local/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.8 -c -c /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/vision.cpp -o /home/ariel/work/Replicate/repos/SRW-Net/build/temp.linux-x86_64-3.8/home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
In file included from /home/ariel/.local/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:140,
                 from /home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                 from /home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                 from /home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                 from /home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
                 from /home/ariel/.local/lib/python3.8/site-packages/torch/include/torch/extension.h:4,
                 from /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/cuda/vision.h:2,
                 from /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/linesegment.h:2,
                 from /home/ariel/work/Replicate/repos/SRW-Net/parsing/csrc/vision.cpp:1:
/home/ariel/.local/lib/python3.8/site-packages/torch/include/ATen/ParallelOpenMP.h:87: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
   87 | #pragma omp parallel for if ((end - begin) >= grain_size)
      | 
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/ariel/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
    subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 62, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 87, in run
    _build_ext.run(self)
  File "/home/ariel/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/ariel/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
    build_ext.build_extensions(self)
  File "/home/ariel/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 208, in build_extension
    _build_ext.build_extension(self, ext)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/home/ariel/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/ariel/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/ariel/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

Can you help?

DavidGillsjo commented 2 years ago

Hi, Thanks for reaching out. Unfortunately I have not seen this error before. Did you build a docker image defined by the supplied Dockerfile or are you setting up your own environment? I've built in my docker-container using gcc and g++ version 7.5.0. What versions are you using?

ariel415el commented 2 years ago

Hi, thanks for the quick reply:

I'm building localy and not using a docker image.
My versions are: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 gcc (Ubuntu 8.4.0-3ubuntu2) 8.4.0

About docker There is no docker/build_docker.sh script only docker/build.sh which didn't work for me giving the error: ./build.sh: line 2: ./../libs/dockers/common/build.sh: No such file or directory

When I built a docker image from the DockerFile in the docker folder using docker build -f . it asks for host name

[powerlevel10k] fetching gitstatusd .. [ok]                                                                                                           
 pytorch  /host_home  
DavidGillsjo commented 2 years ago

OK, I've only used the docker image so I don't have any ideas regarding you build issue, unfortunately. Regarding the docker build error I suspect you have not updated the submodules. Try

git submodule init
git submodule update

and then build the docker image again with

cd docker
./build.sh
ariel415el commented 2 years ago

Ok this was indeed the problem for docker. I did run these commands but since it has git clone commands in ssh it did nothing on my local enviroment. After I manually cloned the repos I from .gitmodules I was able to run the docker image via run.sh

I now encounter runtime issues #2

Also i'm still trying to build locally so any new ideas are welcome.

Thanks for the help.

DavidGillsjo commented 2 years ago

Unfortunately I have no ideas for your build. I've only used the environment defined by the Dockerfile which is based on ubuntu18.04.

Please let me know if you figure it out!