I’m using pytorch and lib A in an app. LibA depends on pthreadpool, and pytorch seems to as well except it bundles what it needs into libtorch.a.
What this leads to is if I include pthreadpool as a dependency I get a “multiple definitions” error, because it’s defined in both libpthreadpool.a and libtorch.a. But when I don’t then libA is missing the definitions of functions it uses.
The only way I see out of this is to somehow stop the building process from including pthreadpool stuff into libtorch.a, but I can’t find out how it’s doing that, there are no references to pthreadpool in the main CMakeLists.txt