生成并安装x86_64而不是i386的Brew应用程序? [英] Build and install Brew apps that are x86_64 instead of i386?
问题描述
完成此操作后:
简单安装git
brew install git
我这样做:
哪个git
which git
返回:
/usr/local/bin/git
/usr/local/bin/git
然后我这样做:
文件/usr/local/bin/git
file /usr/local/bin/git
返回:
/usr/local/bin/git:Mach-O可执行文件i386
/usr/local/bin/git: Mach-O executable i386
我需要brew安装为x86_64.
I need brew to install as x86_64.
如何强制brew以x86_64的形式构建和安装我的应用?
How can I force brew to build and install my apps as x86_64?
酿造--config
brew --config
返回此:
HOMEBREW_VERSION: 0.9
HEAD: 1c64a6624ed83ef17af6e98638b8165400e9e908
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.4
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11: /usr/X11
System Ruby: 1.8.7-357
Which Perl: /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby: /Users/tdewell/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
更新:添加brew --env
Update: adding brew --env
$ brew --env
CC: /usr/bin/xcrun gcc-4.2 => /Developer/usr/bin/gcc-4.2
CXX: /usr/bin/xcrun g++-4.2 => /Developer/usr/bin/g++-4.2
LD: /usr/bin/xcrun gcc-4.2 => /Developer/usr/bin/gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4
CXXFLAGS: -Os -w -pipe -march=core2 -msse4
MAKEFLAGS: -j4
推荐答案
此问题已解决.
我通过App Store安装了Xcode 4.3.2,并安装了命令行工具,但是几年前我已经安装了现有的Xcode 3.1.我在Google周围搜索了以下命令:
I installed Xcode 4.3.2 via the App Store and installed the Command Line Tools, but I had an existing Xcode 3.1 installed from years ago. I Googled around and found these commands:
sudo /Developer/Library/uninstall-devtools –mode=all
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
这解决了我的问题,在我这样做之后,编译器更改为brew:
That cured my problem and after I did that the compilers changed for brew:
$ brew --env
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j4
现在的安装情况要好得多:
brew installs are much better now:
$ which git
/usr/local/bin/git
$ file /usr/local/bin/git
/usr/local/bin/git: Mach-O 64-bit executable x86_64
这篇关于生成并安装x86_64而不是i386的Brew应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!