<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - internal error: atom not found in symbolIndex(___bzero) for architecture x86_64"
href="http://llvm.org/bugs/show_bug.cgi?id=16763">16763</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>internal error: atom not found in symbolIndex(___bzero) for architecture x86_64
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hanauska@equinux.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>This is the error I get when trying to link a binary, built with LTO enabled,
with a static library, that has also been built with clang (same version), that
has been built without LTO enabled, using a "single object prelink" (all .o
files are prelinked to a single .o file), and which has been built as universal
binary for 32 and 64 bit.
All I need to do is disabling LTO and it links without an error (and there is
also no error when I execute it). I can also disable "single object prelink"
for the library and it links without an error.
Things get even worse if I also enable LTO for the static library, in which
case several other symbols are reported missing (this time from the Objective-C
runtime - very unlikely that those symbols are really missing).
However, if I enable LTO for the static library and disable "single object
prelink", everything works again.
Other people have reported similar problems. For example, here is a post from
the Apple mailing list (and I'm pretty sure it is the same issue I am
experiencing, yet the reporter does not mention LTO explicitly):
<a href="http://lists.apple.com/archives/xcode-users/2012/Jul/msg00327.html">http://lists.apple.com/archives/xcode-users/2012/Jul/msg00327.html</a>
Here is an issue reported on StackOverflow (already a bit older, yet this
reporter *DOES* mention LTO explicitly):
<a href="http://stackoverflow.com/questions/9544452/llvm-3-0-bug-of-lto-in-xcode-4-2">http://stackoverflow.com/questions/9544452/llvm-3-0-bug-of-lto-in-xcode-4-2</a>
I discovered this issue first with clang 3.2, but today I verified that it
still exits in 3.3.
I have already reported a bug to Apple regarding LTO and single object prelink
not playing well together for static libraries. I even sent them a sample Xcode
project that demonstrates the issue very well. As the error claims that Obj-C
runtime symbols are missing, I thought that this is rather an Apple bug than a
LLVM bug. Maybe this was a wrong conclusion.
This time clang says "internal error" and its inability to find "bzero" seems
rather a more generic bug than an Apple Xcode bug.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>