Error while compiling Libtorch 1.8 on Jetson AGX Xavier

Hi,
I’ve tried to compile pytorch with C++ front end. I install pytorch from this tutorials https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-8-0-now-available/72048 .
But when I build my program using CMAKE, I get error like this

And here is my CMakeLists

cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(ImageSeg) #Project name Take it yourself

add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
include_directories(/usr/local/include)
include_directories(/home/nvidia/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include)
include_directories(/home/nvidia/.local/lib/python3.6/site-packages/torch/include)

link_directories(/home/nvidia/.local/lib)
link_directories(/home/nvidia/.local/lib/python3.6/site-packages/torch/lib)

set(CMAKE_PREFIX_PATH /home/nvidia/.local/lib/python3.6/site-packages/torch)
set(Boost_USE_MULTITHREADED ON)
set(Torch_DIR /home/nvidia/.local/lib/python3.6/site-packages/torch)

find_package(Torch REQUIRED)
find_package(OpenCV REQUIRED)

add_executable(ImageSeg run.cpp model.cpp) #cpp file to be compiled
target_link_libraries(ImageSeg “{TORCH_LIBRARIES}") target_link_libraries(ImageSeg "{OpenCV_LIBRARIES}”)

set_property(TARGET ImageSeg PROPERTY CXX_STANDARD 11)

Thank You.

Hi,

Do you apply below change which mentioned in the Apply Patch steps of the topic you shared.

Thanks.

Hi AstaLLL
I have solved this problem. I think Pytorch 1.8 have minimum requirement for the C++ version. I just change version from C++11 to C++14 and it’s compiled safely.
Thank You.

Good to know this : )

Thank you