[求助]ACE环境的搭建问题
我想在一个Linux系统上搭建ACE环境,我的系统信息是:Linux vig 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 athlon i386 GNU/Linux我是按照这个步骤进行配置的:我曾经在Ubuntu上成功的配置过
1. 下载ACE包
下载下来tar.gz包,解开,操作完后将会在当前目录下有ACE_wrappers目录。
2. 设置环境变量
修改登陆脚本.bash_profile ,如下所示:
添加
PATH=$PATH:$HOME/bin;export PATH
ACE_ROOT=/home/baoxd/ACE_wrappers;export ACE_ROOT #修改用户名
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/ace:$ACE_ROOT/lib:$ACE_ROOT/bin:/lib:/usr/lib:/usr/local/lib;export LD_LIBRARY_PATH
PATH=$PATH:$ACE_ROOT/ace:$ACE_ROOT/lib:$ACE_ROOT/bin:/usr/vacpp/bin;export PATH
修改后,source .base_profile 执行一下,环境变量设置好。
3. 修改文件
进入$ACE_ROOT/ace/下,修改config.h
添加
#include "ace/config_linux.h"
保存退出
进入$ACE_ROOT/include/makeinclude/下,建立platform_macros.GNU
$vi platform_macros.GNU
include $ACE_ROOT/include/makeinclude/platform_linux.GNU
保存退出
4. 编译
进入$ACE_ROOT/ace下make。
在编译过程中出现了问题 编译的出错信息是:
make: Entering directory `/home/baoxd/ACE/ACE_wrappers/ace'
GNUmakefile: /home/baoxd/ACE/ACE_wrappers/ace/GNUmakefile.ACE MAKEFLAGS=w
g++ -fvisibility=hidden -fvisibility-inlines-hidden -DACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS=1 -W -Wall -Wpointer-arith-O3 -ggdb -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -I/home/baoxd/ACE/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I.. -DACE_BUILD_DLL-c -fPIC -o .shobj/Local_Name_Space.o Local_Name_Space.cpp
In file included from /home/baoxd/ACE/ACE_wrappers/ace/config-macros.h:24,
from /home/baoxd/ACE/ACE_wrappers/ace/config-lite.h:24,
from /home/baoxd/ACE/ACE_wrappers/ace/ACE_export.h:11,
from /home/baoxd/ACE/ACE_wrappers/ace/Malloc.h:18,
from /home/baoxd/ACE/ACE_wrappers/ace/Malloc_T.h:18,
from /home/baoxd/ACE/ACE_wrappers/ace/Local_Name_Space.h:20,
from Local_Name_Space.cpp:1:
/home/baoxd/ACE/ACE_wrappers/ace/config.h:1:30: error: ace/config_linux.h: No such file or directory
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/new.h:33,
from /home/baoxd/ACE/ACE_wrappers/ace/Global_Macros.h:912,
from /home/baoxd/ACE/ACE_wrappers/ace/Log_Msg.h:23,
from /home/baoxd/ACE/ACE_wrappers/ace/Malloc.h:24,
from /home/baoxd/ACE/ACE_wrappers/ace/Malloc_T.h:18,
from /home/baoxd/ACE/ACE_wrappers/ace/Local_Name_Space.h:20,
from Local_Name_Space.cpp:1:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_signal.h:242: error: declaration of C function 鈥榠nt sigwait(sigset_t*)鈥?conflicts with
/usr/include/signal.h:272: error: previous declaration 鈥榠nt sigwait(const sigset_t*, int*)鈥?here
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_ucontext.h:40: error: conflicting declaration 鈥榯ypedef int ucontext_t鈥?
/usr/include/sys/ucontext.h:127: error: 鈥榰context_t鈥?has a previous declaration as 鈥榯ypedef struct ucontext ucontext_t鈥?
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_time.h:58: error: redefinition of 鈥榮truct timespec鈥?
/usr/include/time.h:122: error: previous definition of 鈥榮truct timespec鈥?
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_time.h:64: error: invalid type in declaration before 鈥?鈥?token
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_sched.h:47: error: conflicting declaration 鈥榯ypedef struct cpu_set_t cpu_set_t鈥?
/usr/include/bits/sched.h:114: error: 鈥榗pu_set_t鈥?has a previous declaration as 鈥榯ypedef struct cpu_set_t cpu_set_t鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_signal.h:51: error: using typedef-name 鈥榮iginfo_t鈥?after 鈥榮truct鈥?
/usr/include/bits/siginfo.h:108: error: 鈥榮iginfo_t鈥?has a previous declaration here
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl: In member function 鈥榲oid ACE_Time_Value::set(const timespec_t&)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl:114: error: request for member 鈥榯v_sec鈥?in 鈥榯v鈥? which is of non-class type 鈥榗onst int鈥?
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl:115: error: request for member 鈥榯v_nsec鈥?in 鈥榯v鈥? which is of non-class type 鈥榗onst int鈥?
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl: In member function 鈥楢CE_Time_Value::operator timespec_t() const鈥?
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl:289: error: request for member 鈥榯v_sec鈥?in 鈥榯v鈥? which is of non-class type 鈥榯imespec_t鈥?
/home/baoxd/ACE/ACE_wrappers/ace/Time_Value.inl:291: error: request for member 鈥榯v_nsec鈥?in 鈥榯v鈥? which is of non-class type 鈥榯imespec_t鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_unistd.inl: In function 鈥榠nt ACE_OS::sleep(const ACE_Time_Value&)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_unistd.inl:968: error: invalid conversion from 鈥榗onst timeval*鈥?to 鈥榯imeval*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_unistd.inl:968: error: initializing argument 5 of 鈥榠nt select(int, fd_set*, fd_set*, fd_set*, timeval*)鈥?
/usr/include/sys/time.h: In function 鈥楢CE_Time_Value ACE_OS::gettimeofday()鈥?
/usr/include/sys/time.h:74: error: too few arguments to function 鈥榠nt gettimeofday(timeval*, timezone*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_time.inl:81: error: at this point in file
/home/baoxd/ACE/ACE_wrappers/ace/os_include/sys/os_socket.h: At global scope:
/home/baoxd/ACE/ACE_wrappers/ace/os_include/sys/os_socket.h:44: error: redefinition of 鈥榮truct msghdr鈥?
/usr/include/bits/socket.h:216: error: previous definition of 鈥榮truct msghdr鈥?
/home/baoxd/ACE/ACE_wrappers/ace/os_include/os_stropts.h:93: error: redefinition of 鈥榮truct strbuf鈥?
/usr/include/bits/stropts.h:181: error: previous definition of 鈥榮truct strbuf鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl: In function 鈥楢CE_HANDLE ACE_OS::accept(ACE_HANDLE, sockaddr*, int*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:74: error: invalid conversion from 鈥楢CE_SOCKET_LEN*鈥?to 鈥榮ocklen_t*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:74: error: initializing argument 3 of 鈥榠nt accept(int, sockaddr*, socklen_t*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl: In function 鈥榠nt ACE_OS::getpeername(ACE_HANDLE, sockaddr*, int*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:223: error: invalid conversion from 鈥楢CE_SOCKET_LEN*鈥?to 鈥榮ocklen_t*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:223: error: initializing argument 3 of 鈥榠nt getpeername(int, sockaddr*, socklen_t*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl: In function 鈥榠nt ACE_OS::getsockname(ACE_HANDLE, sockaddr*, int*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:269: error: invalid conversion from 鈥楢CE_SOCKET_LEN*鈥?to 鈥榮ocklen_t*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:269: error: initializing argument 3 of 鈥榠nt getsockname(int, sockaddr*, socklen_t*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl: In function 鈥榠nt ACE_OS::getsockopt(ACE_HANDLE, int, int, char*, int*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:292: error: invalid conversion from 鈥楢CE_SOCKET_LEN*鈥?to 鈥榮ocklen_t*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:292: error: initializing argument 5 of 鈥榠nt getsockopt(int, int, int, void*, socklen_t*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl: In function 鈥榠nt ACE_OS::recvfrom(ACE_HANDLE, char*, size_t, int, sockaddr*, int*)鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:408: error: invalid conversion from 鈥楢CE_SOCKET_LEN*鈥?to 鈥榮ocklen_t*鈥?
/home/baoxd/ACE/ACE_wrappers/ace/OS_NS_sys_socket.inl:408: error: initializing argument 6 of 鈥榠nt recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)鈥?
make: *** [.shobj/Local_Name_Space.o] Error 1
make: Leaving directory `/home/baoxd/ACE/ACE_wrappers/ace'
make: *** Error 2
不知道是什么原因 请大家帮忙下 谢谢 /home/baoxd/ACE/ACE_wrappers/ace/config.h:1:30: error: ace/config_linux.h: No such file or directory
找不到文件。 解决了 参见http://www.cnblogs.com/motadou/archive/2009/11/05/1596726.html
页:
[1]