pytorch / pytorch/vision

compile c++ failed of the version release/0.9

Open
#4,140 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting response
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

Hello,
I met an error when compile the torchvision of c++ in linux.

The enviroment as belows:
cmake version 3.14.5
torch version 1.8.1+cpu

the command i excute:

the error log as belows:

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /environment/python/versions/miniconda3-4.7.12/lib/libpython3.7m.so (found version "3.7.4") found components: Development
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Torch: /environment/python/versions/miniconda3-4.7.12/lib/python3.7/site-packages/torch/lib/libtorch.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.34")
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80")
-- Configuring done
CMake Warning at CMakeLists.txt:73 (add_library):
Cannot generate a safe runtime search path for target torchvision because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libpng16.so.16] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /environment/python/versions/miniconda3-4.7.12/lib

Some of these libraries may not be found correctly.

-- Generating done
-- Build files have been written to: /home/featurize/work/yolov5-rt-stack/deployment/vision/build
make: Warning: File 'Makefile' has modification time 79 s in the future
make[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 79 s in the future
make[2]: Warning: File 'CMakeFiles/torchvision.dir/flags.make' has modification time 79 s in the future
Scanning dependencies of target torchvision
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Warning: File 'CMakeFiles/torchvision.dir/flags.make' has modification time 78 s in the future
[ 2%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/common_jpeg.cpp.o
[ 10%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_image.cpp.o
[ 10%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_jpeg.cpp.o
[ 10%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_png.cpp.o
[ 13%] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/encode_jpeg.cpp.o
c++: internal compiler error: Killed (program cc1plus)

Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-7/README.Bugs for instructions.
CMakeFiles/torchvision.dir/build.make:101: recipe for target 'CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_png.cpp.o' failed
make[2]: *** [CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_png.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-7/README.Bugs for instructions.
CMakeFiles/torchvision.dir/build.make:88: recipe for target 'CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_jpeg.cpp.o' failed
make[2]: *** [CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/decode_jpeg.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-7/README.Bugs for instructions.
CMakeFiles/torchvision.dir/build.make:114: recipe for target 'CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/encode_jpeg.cpp.o' failed
make[2]: *** [CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/encode_jpeg.cpp.o] Error 4
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/torchvision.dir/all' failed
make[1]: *** [CMakeFiles/torchvision.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the release/0.9 build using the reported CMake, PyTorch, compiler, and make -j4 environment. Start with CMakeLists.txt:73 and the failing image sources decode_png.cpp, decode_jpeg.cpp, and encode_jpeg.cpp; done means determining whether the failure is a torchvision build defect and providing a reproducible resolution or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, pytorch
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.