Libtorch JNI loading

This problem is very similar to this issue, but in a different context. I’m trying to use libtorch 1.0 on ubuntu in java via JNI. All of my stuff compiles and runs perfectly fine in C++, and there is no problem at compile time in java, but I’m getting the same error message as the above issue:

undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE

My gcc version is 7.3.0.

Since I’m not in python, the fix in the linked issue won’t work for me, so I was hoping for more details about what “import torch” is doing in python to fix this problem.

Thanks!

@temerick I’m having the same problem as you, did you find a solution?