8 | | We've been working around this by performing `make clean` every time, but that's a slow and frustrating process. Apparently the problem is the library table of contents needs to be updated and this isn't happening automatically with `ld`. A suggested fix is [http://stackoverflow.com/questions/7500901/malformed-archived-toc-entry-on-creating-staticlib running ranlib after ar and before ld] which I can confirm works (run `ranlb` on the affected library after you get the error, then `make` again and it works). I don't know about the other suggestion of using the -s option for `ar`, but that's worth testing too. |
| 8 | or equally disturbing: |
| 9 | {{{ |
| 10 | #!html |
| 11 | <pre class="wiki" style="white-space: pre-wrap"> |
| 12 | ld: in ../../../binaries/system/libengine.a(!<arch> #1/20), archive member '!<arch> #1/20' with length 100644 is not mach-o or llvm bitcode for architecture x86_64 |
| 13 | </pre> |
| 14 | }}} |
| 15 | We've been working around this by performing `make clean` every time, but that's a slow and frustrating process. Apparently the problem is the library table of contents needs to be updated after a rebuild, and this isn't happening automatically with `ld`. A suggested fix is [http://stackoverflow.com/questions/7500901/malformed-archived-toc-entry-on-creating-staticlib running ranlib after ar and before ld] which I can confirm works (run `ranlb` on the affected library after you get the error, then `make` again and it works). I don't know about the other suggestion of using the -s option for `ar`, but that's worth testing too. |