我正在尝试在MIPS平台上交叉编译Zeromq库。 我已经尝试过版本2.2,3.2.4,4.0.4,但所有这些都无法通过配置检查
设置环境变量CC,CPP,CXX,LD,AR,RANLIB。 然后我运行./configure --host = mips
Linux内核:2.6.31
gcc版本:4.3.3
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether the C compiler works... yes
checking whether we are using Intel C compiler... no
checking whether we are using Sun Studio C compiler... no
checking whether we are using clang C compiler... no
checking whether we are using gcc >= 4 C compiler... yes
checking whether the C++ compiler works... yes
checking whether we are using Intel C++ compiler... no
checking whether we are using Sun Studio C++ compiler... no
checking whether we are using clang C++ compiler... no
checking whether we are using gcc >= 4 C++ compiler... yes
checking whether to enable debugging information... no
checking whether to enable code coverage... no
checking for pthread_create in -lpthread... yes
checking for clock_gettime in -lrt... yes
configure: error: unsupported system: elf
答案 0 :(得分:0)
首先,如果你犯了错误,请禁用epoll
配置前功能未实现(epoll.cpp:41)
中止
导出CXXFLAGS = -DZMQ_FORCE_POLL
开始交叉编译
使用
./ configure --host = mips-linux
键入make
时可能会出错make[1]: Leaving directory `/home/justinyu/Development/project/askey_cc/zeromq-3.2.4'
justinyu@justinyu-ubuntu:~/Development/project/askey_cc/zeromq-3.2.4$ make
Making all in src
make[1]: Entering directory `/home/justinyu/Development/project/askey_cc/zeromq-3.2.4/src'
make all-am
make[2]: Entering directory `/home/justinyu/Development/project/askey_cc/zeromq-3.2.4/src'
CXX libzmq_la-address.lo
CXX libzmq_la-clock.lo
CXX libzmq_la-ctx.lo
In file included from ctx.hpp:31,
from ctx.cpp:32:
array.hpp:142:41: error: macro "index" requires 2 arguments, but only 1 given
In file included from ctx.hpp:31,
from ctx.cpp:32:
array.hpp:142: error: function definition does not declare parameters
make[2]: *** [libzmq_la-ctx.lo] Error 1
make[2]: Leaving directory `/home/justinyu/Development/project/askey_cc/zeromq-3.2.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/justinyu/Development/project/askey_cc/zeromq-3.2.4/src'
make: *** [all-recursive] Error 1
通过在array.hpp中添加一行来修复它
#ifdef index
#undef index
#endif
#ifndef __ZMQ_ARRAY_INCLUDED__
#define __ZMQ_ARRAY_INCLUDED__
#include <vector>
#include <algorithm>
namespace zmq
{