c++ – Constructing for iOS, however linking in object file constructed for macOS


I am engaged on a program that must be linked to libtorch_lite, and Essentia, on iOS, and have had Essentia engaged on iOS for some time, however when attempting so as to add the torch dependency, which requires the -all_load linker flag to work at runtime, and I bought this error:

ld: in
/Customers/sylmorrison/JUCE_old/UserModules/kalide_extractors_juce/libs/iOS/arm64/libessentia.a(nnls.c.1.o),
constructing for iOS, however linking in object file constructed for macOS, file
‘/Customers/sylmorrison/JUCE_old/UserModules/kalide_extractors_juce/libs/iOS/arm64/libessentia.a’

A lipo -info on libessentia.a returns arm64 and arm7, and if I pass over the -all_load flag all the pieces works positive, however torch errors at runtime (undefined reference to aten::unsqueeze)

As a result of torch has a load of additional dependencies, and since I believed I simply wanted the -all_load flag someplace, I believed I would strive compiling it right into a static library, after which linking to that library, however doing that leads to the identical error. I additionally tried modifying Essentia’s construct script so as to add an all_load flag (out of desperation largely), which did not get me wherever. Any ideas could be superb, am at a loss about what is going on on, it is like Xcode, when the all_load flag is enabled, convinces itself it is a macOS static library. If it makes a distinction, I am utilizing an M1 Mac mini on Monterey