FreeBSD6.2下编译ACE5.6.4

来源:互联网 发布:羊毛大衣 知乎 编辑:程序博客网 时间:2024/04/30 02:56

FreeBSD6.2下编译ACE5.6.4

遇到两个错误: 1、

In file included from ../../ace/OS_NS_signal.h:149,                 from ../../ace/Signal.h:29,                 from ../../ace/Dev_Poll_Reactor.cpp:5:../../ace/OS_NS_signal.inl: In function ‘int ACE_OS::pthread_sigmask(int, const sigset_t*, sigset_t*)’:../../ace/OS_NS_signal.inl:31: error: ‘::pthread_sigmask’ has not been declaredgmake[3]: *** [libACE_la-Dev_Poll_Reactor.lo] 错误 1gmake[3]: Leaving directory `/data0/install/ACE_wrappers/objdir/ace’gmake[2]: *** [all-recursive] 错误 1gmake[2]: Leaving directory `/data0/install/ACE_wrappers/objdir/ace’gmake[1]: *** [all] 错误 2gmake[1]: Leaving directory `/data0/install/ACE_wrappers/objdir/ace’gmake: *** [all-recursive] 错误 1

解决办法: 打开ACE_wrappers/ace/OS_NS_signal.inl,在头部添加 #include <pthread.h> #include <signal.h>

2、

In file included from ../../ace/OS_NS_netdb.h:142,                 from ../../ace/ICMP_Socket.cpp:9:../../ace/OS_NS_netdb.inl: In function ‘hostent* ACE_OS::gethostbyaddr_r(const char*, int, int, hostent*, char*, int*)’:../../ace/OS_NS_netdb.inl:189: error: cannot convert ‘int*’ to ‘hostent**’ for argument ‘7′ to ‘int gethostbyaddr_r(const void*, socklen_t, int, hostent*, char*, size_t, hostent**, int*)’../../ace/OS_NS_netdb.inl: In function ‘hostent* ACE_OS::gethostbyname_r(const char*, hostent*, char*, int*)’:

解决办法: 打开ACE_wrappers/build/ace/config.h,在其中添加 #define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS 注释ACE_wrappers是刚才使用命令(tar xzf ACE-5.6.4.tar.gz)解压出来的文件 整个安装过程如下:

tar xzf ACE-5.6.4.tar.gzcd ACE_wrappersmkdir buildcd build../configure -enable-staticee ace/config.h( 在这里加入:#define ACE_LACKS_CDR_ALIGNMENT 和 #define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS )ee ../ace/OS_NS_signal.inl( 在这里加入:#include <pthread.h> 和 #include <signal.h> )makemake install
原创粉丝点击