Hello, I’ve built PyTorch 1.2 from sources for Arch Linux. C++ programs written with use of libtorch.so can be compiled and linked without any errors. But I can’t link even a simple program for Caffe2 library(libcaffe2.so), because I’m getting errors:
/usr/bin/ld: /somepath/lib/libcaffe2.so: undefined reference to `c10::Device::validate()'
/usr/bin/ld: /somepath/lib/libcaffe2.so: undefined reference to `c10::ThreadPool::ThreadPool(unsigned long, int)' 

My compilation command line looks like this one:
/usr/bin/g++  -msse3 -fopenmp -Wall -Wextra -Wno-unused-parameter -pthread -fopenmp -fPIC -ggdb -O0  -rdynamic main.cc.o  -o caffe2-load -Wl,-rpath,/somepath/lib /somepath/lib/libcaffe2.so /somepath/lib64/libprotobuf.a 

I would appreciate for any help.