构建和安装应用程序的Brew是x86_64的,而不是i386的?(Build and install

2019-06-25 06:08发布

当我这样做:

BREW安装的git

我这样做:

这混帐

返回:

在/ usr / local / bin目录/混帐

那么我这样做:

文件在/ usr / local / bin目录/混帐

返回:

在/ usr / local / bin目录/混帐:的Mach-O可执行i386的

我需要酿造安装的x86_64的。

我怎么能强迫BREW编译和安装我的应用程序如x86_64的?

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

$ 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

Answer 1:

这已经得到解决。

我通过在App Store安装的Xcode 4.3.2和安装命令行工具,但我有一个现有的Xcode 3.1从年前安装。 我Google了一圈,发现这些命令:

sudo /Developer/Library/uninstall-devtools –mode=all

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

那治好了我的问题后,我这样做,编译器改变了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安装现在好多了:

$ which git
/usr/local/bin/git

$ file /usr/local/bin/git
/usr/local/bin/git: Mach-O 64-bit executable x86_64


Answer 2:

与尝试

xcode-select --install


文章来源: Build and install Brew apps that are x86_64 instead of i386?