Skip to content

[Caffe2] compiling error with gcc-6 #9208

@CosmicWebCreator

Description

@CosmicWebCreator

If you have a question or would like help and support, please ask at our
forums.

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

Issue description

When compiling caffe2, the following error occurs

[ 72%] Linking CXX shared library ../lib/libcaffe2.so
[ 72%] Built target caffe2
[ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o
gcc-6: error: unrecognized command line option ‘-faligned-new’; did you mean ‘-falign-jumps’?
CMake Error at caffe2_gpu_generated_yellowfin_op_gpu.cu.o.Release.cmake:219 (message):
Error generating
/home/mburon/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/sgd/./caffe2_gpu_generated_yellowfin_op_gpu.cu.o

caffe2/CMakeFiles/caffe2_gpu.dir/build.make:917: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o' failed
make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o] Error 1
CMakeFiles/Makefile2:1442: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Provide a short description.

Code example

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

System Info

Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
  • PyTorch or Caffe2: Caffe2
  • How you installed PyTorch (conda, pip, source): cmake of caffe2
  • Build command you used (if compiling from source): sudo make install
  • OS: Ubuntu 18
  • PyTorch version:
  • Python version: 2.7
  • CUDA/cuDNN version: 9.0 / 7.0.5
  • GPU models and configuration: GTX 1070
  • GCC version (if compiling from source): gcc-6
  • CMake version: 3.10.2
  • Versions of any other relevant libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions