Libc10.a has the symbols but I sill get linker errors


Building static c++ libtorch and co libraries from source code using cmake inside a ubuntu20.04 based arm64 docker container. The libs build fine, but when I try to link to my. simple application code, I get a bunch of undefined reference linker errors from libc10 related symbols. When I do a nm -C libc10.a | grep , I find it. Only thing is its mangled, is linker looking for unmangled exact symbol matches?. Appreciate any help. thanks

Its the link order, I had to link to libtorch.a and libtorch_cpu.a and then link to libc10.a plus other static libs for my program to compiel and link correctly. The link order matters.

But now I am stuck with run time error, linking libtorch_cpu.a with --whole-archive linker option did not help to get past the run time error.