Skip to content

Error building from source on macOS #2220

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

Closed
fepegar opened this issue May 15, 2020 · 8 comments · Fixed by #2224
Closed

Error building from source on macOS #2220

fepegar opened this issue May 15, 2020 · 8 comments · Fixed by #2224

Comments

@fepegar
Copy link
Contributor

fepegar commented May 15, 2020

🐛 Bug

I can't build torchvision from source. I get the following error in the log:

/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:258:26: error: implicit instantiation of undefined template 'std::__1::array<char, 1024>'
  std::array<char, 1024> buffer;

To Reproduce

Steps to reproduce the behavior:

$ conda create -n tv python -y && conda activate tv
$ git clone --depth 1 [email protected]:pytorch/vision.git
$ cd vision
$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
Output

Building wheel torchvision-0.7.0a0+348dd5a
running install
running bdist_egg
running egg_info
creating torchvision.egg-info
writing torchvision.egg-info/PKG-INFO
writing dependency_links to torchvision.egg-info/dependency_links.txt
writing requirements to torchvision.egg-info/requires.txt
writing top-level names to torchvision.egg-info/top_level.txt
writing manifest file 'torchvision.egg-info/SOURCES.txt'
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/utils/cpp_extension.py:304: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'torchvision.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
writing manifest file 'torchvision.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/torchvision
copying torchvision/version.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision
copying torchvision/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision
copying torchvision/utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision
copying torchvision/extension.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/flickr.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/coco.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/cityscapes.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/video_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/vision.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/stl10.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/lsun.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/usps.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/folder.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/imagenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/sbd.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/ucf101.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/svhn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/celeba.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/semeion.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/cifar.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/voc.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/hmdb51.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/sbu.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/caltech.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/fakedata.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/kinetics.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/phototour.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/mnist.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
copying torchvision/datasets/omniglot.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/io
copying torchvision/io/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/io
copying torchvision/io/_video_opt.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/io
copying torchvision/io/video.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/io
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/shufflenetv2.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/googlenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/mnasnet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/vgg.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/squeezenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/densenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/inception.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/mobilenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/resnet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/alexnet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
copying torchvision/models/_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/functional_tensor.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/transforms.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/_functional_video.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/functional.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
copying torchvision/transforms/_transforms_video.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/transforms
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/deform_conv.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/misc.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/poolers.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/roi_align.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/boxes.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/roi_pool.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/feature_pyramid_network.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/ps_roi_align.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/_register_onnx_ops.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/new_empty_tensor.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/ps_roi_pool.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
copying torchvision/ops/_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/ops
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets/samplers
copying torchvision/datasets/samplers/clip_sampler.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets/samplers
copying torchvision/datasets/samplers/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/datasets/samplers
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/models/video
copying torchvision/models/video/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/video
copying torchvision/models/video/resnet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/video
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
copying torchvision/models/segmentation/fcn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
copying torchvision/models/segmentation/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
copying torchvision/models/segmentation/deeplabv3.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
copying torchvision/models/segmentation/_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
copying torchvision/models/segmentation/segmentation.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/segmentation
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/shufflenetv2.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/googlenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/inception.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/mobilenet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/resnet.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
copying torchvision/models/quantization/utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/quantization
creating build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/rpn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/faster_rcnn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/generalized_rcnn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/backbone_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/transform.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/mask_rcnn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/image_list.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/keypoint_rcnn.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/roi_heads.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
copying torchvision/models/detection/_utils.py -> build/lib.macosx-10.9-x86_64-3.8/torchvision/models/detection
running build_ext
building 'torchvision._C' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/private
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/vision.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/DeformConv_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/DeformConv_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/ROIAlign_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/ROIPool_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/PSROIPool_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/PSROIPool_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/PSROIAlign_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/PSROIAlign_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/nms_cpu.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/nms_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang++ -bundle -undefined dynamic_lookup -L/usr/local/Caskroom/miniconda/base/envs/tv/lib -arch x86_64 -L/usr/local/Caskroom/miniconda/base/envs/tv/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/vision.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/DeformConv_cpu.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/ROIAlign_cpu.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/ROIPool_cpu.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/PSROIPool_cpu.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/PSROIAlign_cpu.o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/nms_cpu.o -L/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.macosx-10.9-x86_64-3.8/torchvision/_C.so
building 'torchvision.video_reader' extension
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/video_reader
creating build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/decoder
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc/cpu/decoder -I/private/tmp/vision/torchvision/csrc/cpu/video_reader -I/usr/local/include -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=video_reader -D_GLIBCXX_USE_CXX11_ABI=0
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:95:3: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and
      'std::__1::vector<ffmpeg::DecoderOutputMessage, std::__1::allocator<ffmpeg::DecoderOutputMessage> >::size_type' (aka 'unsigned long') [-Wsign-compare]
  CHECK_EQ(framePts.size(0), msgs.size());
  ^        ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:133:51: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)
                                      ~~~~  ~~~~  ^
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:128:20: note: expanded from macro 'CHECK_OP'
  FATAL_IF(((val1) op (val2)))                        \
             ~~~~  ^   ~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:110:3: note: expanded from macro 'FATAL_IF'
  condition ? (void)0                  \
  ^~~~~~~~~
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:590:17: warning: unused variable 'media' [-Wunused-variable]
    const auto& media = header.format;
                ^
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:95:3: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and
      'std::__1::vector<ffmpeg::DecoderOutputMessage, std::__1::allocator<ffmpeg::DecoderOutputMessage> >::size_type' (aka 'unsigned long') [-Wsign-compare]
  CHECK_EQ(framePts.size(0), msgs.size());
  ^        ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:133:51: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)
                                      ~~~~  ~~~~  ^
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:128:20: note: expanded from macro 'CHECK_OP'
  FATAL_IF(((val1) op (val2)))                        \
             ~~~~  ^   ~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:110:3: note: expanded from macro 'FATAL_IF'
  condition ? (void)0                  \
  ^~~~~~~~~
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:128:10: note: in instantiation of function template specialization 'video_reader::fillTensor<unsigned char>'
      requested here
  return fillTensor<uint8_t>(msgs, videoFrame, videoFramePts, num, den);
         ^
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:95:3: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and
      'std::__1::vector<ffmpeg::DecoderOutputMessage, std::__1::allocator<ffmpeg::DecoderOutputMessage> >::size_type' (aka 'unsigned long') [-Wsign-compare]
  CHECK_EQ(framePts.size(0), msgs.size());
  ^        ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:133:51: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)
                                      ~~~~  ~~~~  ^
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:128:20: note: expanded from macro 'CHECK_OP'
  FATAL_IF(((val1) op (val2)))                        \
             ~~~~  ^   ~~~~
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/c10/util/logging_is_not_google_glog.h:110:3: note: expanded from macro 'FATAL_IF'
  condition ? (void)0                  \
  ^~~~~~~~~
/private/tmp/vision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:137:10: note: in instantiation of function template specialization 'video_reader::fillTensor<float>' requested
      here
  return fillTensor<float>(msgs, audioFrame, audioFramePts, num, den);
         ^
4 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc/cpu/decoder -I/private/tmp/vision/torchvision/csrc/cpu/video_reader -I/usr/local/include -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/decoder/seekable_buffer.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/decoder/seekable_buffer.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=video_reader -D_GLIBCXX_USE_CXX11_ABI=0
/private/tmp/vision/torchvision/csrc/cpu/decoder/seekable_buffer.cpp:69:24: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long')
      [-Wsign-compare]
  while (!eof_ && end_ < maxBytes && (hasTime = watcher())) {
                  ~~~~ ^ ~~~~~~~~
/private/tmp/vision/torchvision/csrc/cpu/decoder/seekable_buffer.cpp:74:16: warning: comparison of integers of different signs: 'long' and 'std::__1::vector<unsigned char,
      std::__1::allocator<unsigned char> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      if (end_ == buffer_.size()) {
          ~~~~ ^  ~~~~~~~~~~~~~~
2 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc/cpu/decoder -I/private/tmp/vision/torchvision/csrc/cpu/video_reader -I/usr/local/include -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/decoder/cc_stream.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/decoder/cc_stream.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=video_reader -D_GLIBCXX_USE_CXX11_ABI=0
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/usr/local/Caskroom/miniconda/base/envs/tv/include -arch x86_64 -I/private/tmp/vision/torchvision/csrc/cpu/decoder -I/private/tmp/vision/torchvision/csrc/cpu/video_reader -I/usr/local/include -I/private/tmp/vision/torchvision/csrc -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/TH -I/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torch/include/THC -I/usr/local/Caskroom/miniconda/base/envs/tv/include/python3.8 -c /private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp -o build/temp.macosx-10.9-x86_64-3.8/private/tmp/vision/torchvision/csrc/cpu/decoder/util.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=video_reader -D_GLIBCXX_USE_CXX11_ABI=0
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:52:25: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          s += sizeof(y.pict.linesize[i]);
                        ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:52:30: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          s += sizeof(y.pict.linesize[i]);
                             ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:53:18: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          s += y.pict.linesize[i];
                 ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:53:23: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          s += y.pict.linesize[i];
                      ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:96:41: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          if (!serializeItem(d, l, p, x.pict.linesize[i])) {
                                        ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:96:46: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          if (!serializeItem(d, l, p, x.pict.linesize[i])) {
                                             ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:99:21: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          if (p + x.pict.linesize[i] > l) {
                    ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:99:26: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          if (p + x.pict.linesize[i] > l) {
                         ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:102:27: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          memcpy(d + p, x.pict.data[i], x.pict.linesize[i]);
                          ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:102:32: warning: 'data' is deprecated [-Wdeprecated-declarations]
          memcpy(d + p, x.pict.data[i], x.pict.linesize[i]);
                               ^
/usr/local/include/libavcodec/avcodec.h:3867:5: note: 'data' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:102:43: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          memcpy(d + p, x.pict.data[i], x.pict.linesize[i]);
                                          ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:102:48: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          memcpy(d + p, x.pict.data[i], x.pict.linesize[i]);
                                               ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:103:18: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          p += x.pict.linesize[i];
                 ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:103:23: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          p += x.pict.linesize[i];
                      ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:175:43: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          if (!deserializeItem(y, l, p, x.pict.linesize[i])) {
                                          ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:175:48: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          if (!deserializeItem(y, l, p, x.pict.linesize[i])) {
                                               ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:178:21: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          if (p + x.pict.linesize[i] > l) {
                    ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:178:26: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          if (p + x.pict.linesize[i] > l) {
                         ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:181:13: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          x.pict.data[i] = (uint8_t*)av_malloc(x.pict.linesize[i]);
            ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:181:18: warning: 'data' is deprecated [-Wdeprecated-declarations]
          x.pict.data[i] = (uint8_t*)av_malloc(x.pict.linesize[i]);
                 ^
/usr/local/include/libavcodec/avcodec.h:3867:5: note: 'data' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:181:50: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          x.pict.data[i] = (uint8_t*)av_malloc(x.pict.linesize[i]);
                                                 ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:181:55: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          x.pict.data[i] = (uint8_t*)av_malloc(x.pict.linesize[i]);
                                                      ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:182:20: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          memcpy(x.pict.data[i], y + p, x.pict.linesize[i]);
                   ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:182:25: warning: 'data' is deprecated [-Wdeprecated-declarations]
          memcpy(x.pict.data[i], y + p, x.pict.linesize[i]);
                        ^
/usr/local/include/libavcodec/avcodec.h:3867:5: note: 'data' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:182:43: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          memcpy(x.pict.data[i], y + p, x.pict.linesize[i]);
                                          ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:182:48: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          memcpy(x.pict.data[i], y + p, x.pict.linesize[i]);
                                               ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:183:18: warning: 'pict' is deprecated [-Wdeprecated-declarations]
          p += x.pict.linesize[i];
                 ^
/usr/local/include/libavcodec/avcodec.h:3909:5: note: 'pict' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:183:23: warning: 'linesize' is deprecated [-Wdeprecated-declarations]
          p += x.pict.linesize[i];
                      ^
/usr/local/include/libavcodec/avcodec.h:3869:5: note: 'linesize' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
/private/tmp/vision/torchvision/csrc/cpu/decoder/util.cpp:258:26: error: implicit instantiation of undefined template 'std::__1::array<char, 1024>'
  std::array<char, 1024> buffer;
                         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
28 warnings and 1 error generated.
error: command 'clang' failed with exit status 1

Expected behavior

Successful build.

Environment

PyTorch version: 1.5.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.15.4
GCC version: Could not collect
CMake version: version 3.17.2

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.18.4
[pip] torch==1.5.0
[conda] numpy                     1.18.4                   pypi_0    pypi
[conda] torch                     1.5.0                    pypi_0    pypi

Additional context

$  clang --version                                                                                               
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I'm building from source to try the video_reader backend: #2216 (comment).

@bjuncek
Copy link
Contributor

bjuncek commented May 15, 2020

Interestingly, was trying to replicate your error and got something completely different:

error
``` Traceback (most recent call last): File "setup.py", line 233, in setup( File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 173, in run cmd = self.call_command('install_lib', warn_dir=0) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 159, in call_command self.run_command(cmdname) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/command/install_lib.py", line 107, in build self.run_command('build_ext') File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run _build_ext.run(self) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 580, in build_extensions build_ext.build_extensions(self) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 208, in build_extension _build_ext.build_extension(self, ext) File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension objects = self.compiler.compile(sources, File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 414, in unix_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1135, in _write_ninja_file_and_compile_objects _run_ninja_build( File "/Users/bkorbar/opt/anaconda3/envs/tv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1413, in _run_ninja_build raise RuntimeError(message) RuntimeError: Error compiling objects for extension ```

I'll take a look into this a bit later next week, but here is the workaround I found

conda create -n tv python -y && conda activate tv
conda install -c conda-forge av
conda install pytorch -c pytorch
git clone https://github.com/pytorch/vision.git
cd vision; git checkout tags/v0.6.0
$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

a few things of note @fepegar :
I think it's crucial to install ffmpeg/pyav before trying to build TV from source.
Try building pyav with conda install -c conda-forge av, and continue with the build as is. It worked for me in the end.

Maybe we should document the build process better? :)

@fepegar
Copy link
Contributor Author

fepegar commented May 15, 2020

Thanks @bjuncek,

I just tried the following commands with the same luck:

conda create -n tv python -y && conda activate tv
conda install -c conda-forge av -y
conda install pytorch -c pytorch -y
git clone https://github.com/pytorch/vision.git --depth 1
cd vision
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

@fmassa
Copy link
Member

fmassa commented May 18, 2020

@fepegar thanks for opening this issue.

This should be fixed with #2224, can you pull it and give it a try?

@fepegar
Copy link
Contributor Author

fepegar commented May 18, 2020

Silly question, but how do I pull your branch?

@fmassa
Copy link
Member

fmassa commented May 18, 2020

It would be something like

git remote add fmassa [email protected]:fmassa/vision-1.git
git fetch fmassa
git checkout fix-missing-include-decoder

but I've just merged this on master, so you can just pull from torchvision again.

The issue got auto-closed due to the merge, but let me know if it doesn't compile for you

@fepegar
Copy link
Contributor Author

fepegar commented May 18, 2020

Thanks. I ran the lines form #2220 (comment). Build seems OK.

Then I ran python -c "import torchvision; torchvision.set_video_backend('video_reader')" and got the error I mentioned in #2216 (comment).

@fmassa
Copy link
Member

fmassa commented May 18, 2020

@fepegar this is a different issue, and I have a couple of ideas of what the problem might be:

  • you had some parts of the old torchvision that got compiled, and only recompiled the video_reader backend at a later attempt, where the pytorch version might have changed in between. If you could do python setup.py clean and then re-compile torchvision, this would let us know if that's indeed the case or not (my guess is that this should fix it)
  • something else is messing up with the torchscript (like virtualenv? although you seen to be using conda). We will be removing explicit torchscript annotations from torchvision very soon, so this will not show up at import time, although the issue might still be there hidden, which is that your compiled library is not picking the right files.

@fepegar
Copy link
Contributor Author

fepegar commented May 18, 2020

clean didn't help. Also, I clone the repo every time I retry, so it should be clean at the beginning anyway.

I'll open a new issue.

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

Successfully merging a pull request may close this issue.

3 participants