Open sjindel-google opened 5 years ago
As I mentioned I think this is a bug in clang which is triggered by the symbols which we declare in our .S
file, e.g. consider removing all the symbols - leaving only only necessary ones.
@truongsinh, please run flutter build profile --verbose >logs 2>&logs
and upload the logs, and in addition the .S
files which may be discovered via:
find build -name *.S
If you run find build -name *.S
in the root directory of your Flutter project, it will list all the files we need.
FYI, I have to adjust the command a little bit: flutter build ios --profile --verbose >logs 2>logs
Please find the zipped file, which contains logs
file and build/aot/arm64/snapshot_assembly.S
in the attachment
@truongsinh I can reproduce the crash from your archive.
It appears that the error is actually when the compiled static library snapshot_assembly.o
is linked into the App. There are 32776
symbols in snapshot_assembly.o
, but if I strip it (strip -x
), the crash disappears.
Perhaps the linker assumes there are fewer than 2**15 symbols, e.g. by representing symbols with an int16_t
.
I don't think the problem is with the number of symbols. Flutter gallery has over 65K, and LD still crashes if I remove just the the Precompiled_*
symbols, reducing the symbol count by 31%.
Hi guys, I have a similar issue (I think) when trying to vendor a static library as mylibrary.a with mylibrary.h (generated with rust cargo-lipo). My bindings work on Android but not ios ( the library has bean loaded) and the error message is Invalid arguments : failed to lookup symbol dlsym(0x10b538ba8,search)
. My repo
Crash report from @truongsinh:
/cc @mraleph @mkustermann