Open c-villain opened 2 years ago
@bogo I've checked this out very thoroughly. It appears that the Yandex SDK has non-zero offsets in S_ZEROFILL sections before the modification. So the iPhone version also doesn't build. This is not a problem with the Transmogrifier.
I've additionally discovered some Unix horrors in the Yandex SDK:
ar
file format does not support file paths, only file names. GNU ar supports paths but macOS doesn't have it.ar
archive and the linker accepts this.ar x
, the files with the same filename overwrite each other so only one ends up extracted.Initialize.cpp.o
and initialize.cpp.o
).ar
directly. Only possible by a hack, e.g. extracting the first one using ar p
and then removing it using ar d
in a loop.ar crv
also conflates the different copies that have the same name. To append, ar cqv
needs to be used.I've made a hacked build of xcframework_converter
that handles all of this, plus the zero-fill patch: https://github.com/igor-makarov/XCFrameworkConverter/releases/tag/0.4.0-hack-zerofill
@igor-makarov Hey, Igor. Thanks for your work on converter. I tried the patched version to fix an issue for YandexMapsMobile, but still have same error on device build (arm64). I tried 0.7.0 version and 0.4.0-hack-zerofill separately. Same error!
I'm using converter from Podfile. I'm in Xcode 14.0.1 right now.
Hey @mixdesign! I haven't looked at the new versions of the Yandex SDK because I don't actually use it.
It appears that the Yandex company isn't maintaining it very well, and I'm not sure how sustainable it is to constantly work around its quirks. I haven't got bandwidth right now to check it again.
Sorry about the late reply, but I don't have an answer.
@mixdesign Although now that I recall it, the newest SDK versions are supposed to have XCFramework packaging and not require the converter.
@igor-makarov yeah, thanks for your time and thoughts. I just found that there are fresh libs based on xcframeworks :) Link: https://github.com/CocoaPods/Specs/tree/master/Specs/d/d/0/YandexMapsMobile
Hi, I am currently using ur tools to modify binary framework Yandex maps mobile... Link to framework is taken from here... Every time am getting zerofill error...
ld: in /Users/c-villain/Library/Developer/Xcode/DerivedData/Utkonos-flitswrpfdrvoncmykfarjwnxqce/Build/Products/Debug-iphonesimulator/YandexMapsMobile.framework/YandexMapsMobile(YMKSearchMasstransit2xObjectMetadata_Binding.mm.o), section __DATA/__bss has type zero-fill but non-zero file offset file '/Users/c-villain/Library/Developer/Xcode/DerivedData/Utkonos-flitswrpfdrvoncmykfarjwnxqce/Build/Products/Debug-iphonesimulator/YandexMapsMobile.framework/YandexMapsMobile' for architecture arm64
build on Xcode 13.3.1
any ideas what's going wrong?...