quarnster/SublimeClang — Issue #28: Bad CPU type error on 32bit intel macs
Author: aberghage
Created: 2012-02-03 06:38:08+00:00
State: open

Trying to open the output panel on a 32bit intel mac (MacBook 1,1) in snow leopard w/ XCode 4's installation of clang on the path gives the following error in the sublime console:

Traceback (most recent call last):
File "./sublime_plugin.py", line 351, in run_
File "./sublimecp.py", line 115, in run
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 86] Bad CPU type in executable

Static analysis runs using the tools on my path, but I can't get the in-editor features to work (even if I replace the libclang.dylib that ships with the plugin with the one from my system install (/Developer/usr/clang-ide/lib/libclang.dylib).

I had SublimeClang working with a homebrew install of llvm + clang, with the exception of some includes (stdint, for some reason, was not resolving), so I removed that installation of llvm and reinstalled SublimeClang, and here I am. I've confirmed that the dylib shipped in the plugin does not include an x86 build, and that mine does, but I still (strangely) get the error...

/Users/aberghage/Library/Application Support/Sublime Text 2/Packages/SublimeClang [aberghage@atb-macbook] [1:33]
> file libclang.dylib.orig
libclang.dylib.orig: Mach-O 64-bit dynamically linked shared library x86_64

/Users/aberghage/Library/Application Support/Sublime Text 2/Packages/SublimeClang [aberghage@atb-macbook] [1:33]
> file libclang.dylib
libclang.dylib: Mach-O universal binary with 2 architectures
libclang.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
libclang.dylib (for architecture i386): Mach-O dynamically linked shared library i386