I was able to recover ~/SailfishOS/vmshare
and ~/SailfishOS/mersdk
directories from one week old backup. Now I can 100% confirm that recent master of OSM Scout is buildable with previous version of SDK and I am able to do experiments in both versions…
The issue seems to be similar to this one:
https://bug-binutils.gnu.narkive.com/WXEOToHz/question-about-invalid-string-offset-could-not-read-symbols-malformed-archive-linker-errors
cd rpmbuilddir-arm.sdk3.2/
$ find . -name \*.a -exec arm-linux-gnueabihf-objdump -p {} \; > /dev/null
arm-linux-gnueabihf-objdump: warning: ./libmarisa.a(agent.cc.o) has a corrupt section with a size (8aabfe9d) larger than the file size
arm-linux-gnueabihf-objdump: warning: ./libmarisa.a(agent.cc.o) has a corrupt section with a size (35cd2d57) larger than the file size
arm-linux-gnueabihf-objdump: warning: ./libmarisa.a(agent.cc.o) has a corrupt section with a size (8aabfe9d) larger than the file size
arm-linux-gnueabihf-objdump: warning: ./libmarisa.a(agent.cc.o) has a corrupt section with a size (35cd2d57) larger than the file size
arm-linux-gnueabihf-objdump: agent.cc.o: file format not recognized
mkdir -p tmp
cd tmp
$ unar ../libmarisa.a
../libmarisa.a: Ar
reader.cc.o (77536 B)... OK.
mapper.cc.o (32084 B)... OK.
writer.cc.o (77944 B)... OK.
tail.cc.o (270372 B)... OK.
louds-trie.cc.o (823868 B)... OK.
bit-vector.cc.o (99532 B)... OK.
trie.cc.o (141520 B)... OK.
agent.cc.o (97756 B)... OK.
keyset.cc.o (52676 B)... OK.
Successfully extracted to "libmarisa".
$ arm-linux-gnueabihf-objdump -p libmarisa/agent.cc.o
arm-linux-gnueabihf-objdump: warning: libmarisa/agent.cc.o has a corrupt section with a size (8aabfe9d) larger than the file size
arm-linux-gnueabihf-objdump: warning: libmarisa/agent.cc.o has a corrupt section with a size (35cd2d57) larger than the file size
arm-linux-gnueabihf-objdump: warning: libmarisa/agent.cc.o has a corrupt section with a size (8aabfe9d) larger than the file size
arm-linux-gnueabihf-objdump: warning: libmarisa/agent.cc.o has a corrupt section with a size (35cd2d57) larger than the file size
arm-linux-gnueabihf-objdump: libmarisa/agent.cc.o: file format not recognized
$ arm-linux-gnueabihf-objdump -p ../CMakeFiles/marisa.dir/dependencies/marisa-trie/lib/marisa/agent.cc.o
../CMakeFiles/marisa.dir/dependencies/marisa-trie/lib/marisa/agent.cc.o: file format elf32-littlearm
private flags = 5000000: [Version5 EABI]
$ file libmarisa/agent.cc.o
... /agent.cc.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
$ file ../CMakeFiles/marisa.dir/dependencies/marisa-trie/lib/marisa/agent.cc.o
... /agent.cc.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
It seems that object file is malformed by ar or ranlib tool during “linking” static library archive. But both SDKs seems to use same ar and ranlib binaries (GNU Binutils 2.32).