<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114030>114030</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
boitet2002
</td>
</tr>
</table>
<pre>
We put this bug report already on stack overflow, but got no solution.
Since then, we reinstalled llvm and lld with Homebrew, as suggested by somebody who got
the same problem before, to no avail.
That is blocking us since a month or so!
-------------------------------------------------------------------------------------------------
We got this message: ...tried: '/usr/local/lib/libInterface.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')
CPPFLAGS contains "-arch arm64" to force this architecture on our .o files
We checked (using file /some/file) our .o files. They are indeed all 'arm64'.
**We could not find why we "need 'x86_64'" **
That is blocking us since we migrated from a Macbook/x86 under Ventura to a Macbook M3/arm64 under Sequoia.
--- More details ---
The complete message is:
**dlopen() failed: dlopen(libInterface.dylib, 0x0001): tried: '/usr/local/lib/libInterface.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), ... [other files tried, with failure] **
All our .o are 'arm64' and the dylib in question is also arm64:
**...Client: file /usr/local/lib/libInterface.dylib /usr/local/lib/libInterface.dylib: Mach-O 64-bit dynamically linked shared library arm64 **
If there is a known reason for that "need 'x86_64'", maybe we can remedy it. If not, if we could compile that .dylib into the 'x86_64' architecture, we could produce a fat version (using lipo -create .dylib .dylib -output .dylib)
But we found no tool to do this conversion (arm64 -> x86_64).
Thanks in advance!
Christian & Jean-Claude
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVluP2zYT_TX0y8CCTN8f_LDxfv6aoosGSNA8FiNxZLFLcRxe7OjfFyPZW2-6AfISoAtDFKjhXM6cM1yM0R490U4t36nl4wRzajnsKraJki5LPanY9LvPBKecILU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