我没有在我的pi上编译数据库,因此我想在我的mac上编译它。
我主要遵循这个tutorial来构建我的交叉编译器。
我的Mac正在运行OS X El Capitan 10.11.3
uname -a
给了我:
Darwin Andreass-MacBook-Air-2.local 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
uname -a
:
Linux raspberrypi 4.1.14-v7+ #4 SMP PREEMPT Wed Mar 23 15:30:13 UTC 2016 armv7l GNU/Linux
在我要安装的数据库的文件夹中运行./configure --with-system-malloc --allow-fetch
,为我提供了其他信息:
* Detecting system configuration
Bash: 4.3.30(1)-release
Use ccache: no
C++ Compiler: GCC 4.9.2 (/usr/bin/c++)
Host System: arm-linux-gnueabihf
Build System: Linux 4.1.14-v7+ armv7l
Cross-compiling: no
Host Operating System: Linux
Build Architecture: armv7l
C++11: ok
Precompiled web assets: yes
Protobuf compiler: /usr/bin/protoc
python: python 2.7.9
Node.js package manager: /usr/local/bin/npm
coffee: external/coffee-script_1.10.0
Browserify: external/browserify_12.0.1
bluebird: external/bluebird_2.9.32
web UI dependencies: external/admin-deps_2.0.3
wget: /usr/bin/wget
curl: /usr/bin/curl
Google Test: external/gtest_1.7.0
termcap: no
boost_system: external/boost_1.56.0
protobuf: -lprotobuf
v8 javascript engine: external/v8_3.30.33.16
RE2: external/re2_20140111
z: -lz
crypto: external/openssl_1.0.1i
ssl: external/openssl_1.0.1i
curl: external/curl_7.40.0
malloc: system
Test protobuf: ok
Test boost: external/boost_1.56.0
Test OpenSSL: external/openssl_1.0.1i
Installation prefix: /usr/local
Configuration prefix: /usr/local/etc
Runtime data prefix: /usr/local/var
我安装了教程中所有必需的软件包并下载了
- binutils-2.26.51
- gcc-5.3.0
我将导出变量设置如下:
export CC=gcc-4.9
export CXX=g++-4.9
export CPP=cpp-4.9
export LD=gcc-4.9
export PREFIX="$HOME/opt/cross"
export TARGET="Linux 4.1.14-v7+"
export PATH="$PREFIX/bin:$PATH"
checking build system type... Invalid configuration `4.1.14-v7+': machine `4.1.14' not recognized
configure: error: /bin/sh ../binutils-2.26.51/config.sub 4.1.14-v7+ failed
在我遇到此错误之前,还需要指定主机。
1)目标的具体内容是什么?
2)从教程中还需要调整哪些内容才能使其正常工作?
编辑:
正如所建议的那样,交叉编译机器上的目标是目标机器:arm-linux-gnueabihf
我猜./bfd
来自此文件夹/Users/MasterG/opt/cross
=> /Users/MasterG/opt/cross/bfd
不存在,因为之前整个文件夹都不存在。