<div dir="ltr">On Wed, May 14, 2014 at 1:49 PM, Aron Xu <<a href="mailto:aron@debian.org">aron@debian.org</a>> wrote:<br>><br>> No they aren't architecture-independent even they are installed to<br>> /usr/share. Also, RIME itself does not build on many architectures,<br>
> and I believe this could be a more worthy priority.<br>><br>> Thanks,<br>> Aron<br><br><div>I've built librime and tried to build brise, under sparc. And it just failed</div><div>with a bus error (SIGBUS), similar to many other architectures.[1]</div>
<div><br></div><div>It appears to be a misaligned access, thus probably a bug in g++. (I've tried both g++-4.8 and g++-4.9)</div><div><br></div><div><div>$ gdb rime_deployer</div><div>GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1.1)</div>
<div>Copyright (C) 2013 Free Software Foundation, Inc.</div><div>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></div><div>This is free software: you are free to change and redistribute it.</div>
<div>There is NO WARRANTY, to the extent permitted by law.  Type "show copying"</div><div>and "show warranty" for details.</div><div>This GDB was configured as "sparc-linux-gnu".</div><div>For bug reporting instructions, please see:</div>
<div><<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>...</div><div>Reading symbols from /usr/bin/rime_deployer...Reading symbols from /usr/lib/debug/.build-id/33/a0ab4c492de00481dff12c37037b20b8d26b64.debug...done.</div>
<div>done.</div><div>(gdb) run --build  /mnt/sdb2/pkg2/ime/brise/data</div><div>Starting program: /usr/bin/rime_deployer --build  /mnt/sdb2/pkg2/ime/brise/data</div><div>[Thread debugging using libthread_db enabled]</div>
<div>Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".</div><div><br></div><div>Program received signal SIGBUS, Bus error.</div><div>0xf7e795bc in rime::Table::BuildHeadIndex (this=this@entry=0x37b4c, vocabulary=..., num_syllables=num_syllables@entry=422)</div>
<div>    at /mnt/sdb2/pkg2/ime/librime/src/dict/table.cc:300</div><div>300       for (const auto& v : vocabulary) {</div><div>(gdb) x/i $pc</div><div>=> 0xf7e795bc <rime::Table::BuildHeadIndex(rime::Vocabulary const&, unsigned int)+188>: st  %i2, [ %l2 + %l1 ]</div>
<div>(gdb) p $l2</div><div>$1 = -243040256</div><div>(gdb) p/x $l2</div><div>$2 = 0xf1838000  </div><div>(gdb) p/x $l1</div><div>$3 = 0xdca  </div><div>(gdb) x/i $npc</div><div>   0xf7e795c0 <rime::Table::BuildHeadIndex(rime::Vocabulary const&, unsigned int)+192>: add  %fp, -12, %i2</div>
<div>(gdb) p $i2</div><div>$4 = 422</div></div><div><br></div><div>Because (%l2 + %l1) % 4 != 0, the instruction </div><div>"st  %i2, [ %l2 + %l1 ]" generated a SIGBUS,</div><div><br></div><div>arm* and mips* are also RISC with stricter memory</div>
<div>alignment requirement, so the other FTBFSes could</div><div>be of the same reason.</div><div><br></div><div>[1] <a href="https://buildd.debian.org/status/package.php?p=brise">https://buildd.debian.org/status/package.php?p=brise</a></div>
<div><br></div><div>Yixuan</div></div>