centos7编译ace

  sre

下载

cd 
wget http://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_3/ACE-6.5.3.tar.gz
tar zxvf ACE-6.5.3.tar.gz
mv ACE_wrappers /usr/local/

环境变量 vim /etc/profile,内容如下:

ACE_ROOT=/usr/local/ACE_wrappers
export ACE_ROOT
LD_LIBARY_PATH=ACE_ROOT/ace:LD_LIBARY_PATH
export LD_LIBARY_PATH

config.h配置

cd /usr/local/ACE_wrappers
vim ace/config.h 内容为:

#define ACE_HAS_EVENT_POLL
#define ACE_HAS_PTHREAD_SCHEDPARAM
#define ACE_HAS_PTHREADS_STD

#include "ace/config-linux.h"

platform_macros.GNU

新建文件 /usr/local/ACE_wrappers/include/makeinclude/platform_macros.GNU 内容为
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
更改:

vim /include/makeinclude/platform_linux.GNU 
ifeq ((buildbits),32)
FLAGS_C_CC += -m32
LDFLAGS += -m32
endif
ifeq ((buildbits),64)
FLAGS_C_CC += -m64
LDFLAGS += -m64
endif

改为:

ifeq ((buildbits),32)
FLAGS_C_CC += -m32
LDFLAGS += -m32
endif
ifeq ((buildbits),64)
FLAGS_C_CC += -m64
FLAGS_C_CC += -fPIC
LDFLAGS += -m64
endif

编译:

cd 
make -j 8
make install

创建软连接

cd  /etc/ld.so.conf.d/
vi ace.conf
/usr/local/ACE_wrappers/lib
ldconfig

One Reply to “centos7编译ace”

LEAVE A COMMENT

Captcha Code