﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	phab_field
1147	Fix malformed TOC linker error on OS X	historic_bruno		"On OS X, after performing a build and editing some source code, errors like the following occur:
{{{
#!html
<pre class=""wiki"" style=""white-space: pre-wrap"">
ld: in ../../../binaries/system/libengine.a, malformed archive TOC entry for _MASK__PSRETURN_Scripting_SetupFailed, offset 164452311 is beyond end of file 14363576 for architecture x86_64
</pre>
}}}
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."	defect	new	Should Have	Alpha 9	Build & Packages		osx,linker	Yves	
