简体   繁体   English

使用CentOS 6编译ACE / TAO 1.2库

[英]Compiling ACE/TAO 1.2 libraries with CentOS 6

I am on a 64 bit CentOS 6.7 machine with g++ 4.4.7 and I am trying to compile the ACE TAO library 1.2 that was compiled with g++ 2.96. 我在使用g ++ 4.4.7的64位CentOS 6.7机器上,并且尝试编译用g ++ 2.96编译的ACE TAO库1.2

When I try to compile using the g++ version 4.4.7 I get the following errors (more complete output here 当我尝试使用g ++版本4.4.7进行编译时,出现以下错误( 此处提供了更完整的输出)

g++ -W -Wall -Wpointer-arith -pipe -O3 -g -Wno-uninitialized -fno-implicit-templates   -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT   -I/home/oscarpelaoo/Downloads/ACE_wrappers -DACE_HAS_EXCEPTIONS  -c -fPIC -o .shobj/URL_Addr.o URL_Addr.cpp
In file included from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/ACE.h:17,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/INET_Addr.h:17,
                 from URL_Addr.h:20,
                 from URL_Addr.cpp:3:
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS.h:3110:27: error: new.h: No such file or directory
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward/strstream:47,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/streams.h:70,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS.h:3197,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/ACE.h:17,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/INET_Addr.h:17,
                 from URL_Addr.h:20,
                 from URL_Addr.cpp:3:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
In file included from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.h:191,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS.h:38,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/ACE.h:17,
                 from /home/oscarpelaoo/Downloads/ACE_wrappers/ace/INET_Addr.h:17,
                 from URL_Addr.h:20,
                 from URL_Addr.cpp:3:
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.inl: In static member function ‘static int ACE_OS_TLI::t_accept(ACE_HANDLE, ACE_HANDLE, t_call*)’:
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.inl:12: warning: the address of ‘call’ will never be NULL
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.inl:13: warning: the address of ‘reshandle’ will never be NULL
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.inl:14: warning: the address of ‘handle’ will never be NULL
/home/oscarpelaoo/Downloads/ACE_wrappers/ace/OS_TLI.inl: In static member function ‘static char* ACE_OS_TLI::t_alloc(ACE_HANDLE, int, int)’:

After a bit of research, I found that Red Hat offers some old libstdc++ libraries for CentOS 6 here . 经过一番研究,我发现Red Hat 在这里为CentOS 6提供了一些旧的libstdc ++库。

Is it possible to use an old version of g++ 2.96 which I don't believe has 64 bit support or can I somehow use the compatibility tools with g++ 4.4.7 to try to make something happen? 是否可以使用我不相信支持64位的g ++ 2.96的旧版本,或者我可以以某种方式将兼容性工具与g ++ 4.4.7结合使用以尝试使事情发生?

Answering my own post since I was able to install it. 自从我能够安装它以来,回答我自己的帖子。

After installing the relevant 32bit libraries, the -m32 flag needed to get added. 在安装了相关的32位库之后,需要添加-m32标志。 Then we needed to add a -DACE_LACKS_NEW_H flag since my system does not contain the <new.h> file. 然后,由于我的系统不包含<new.h>文件,因此我们需要添加-DACE_LACKS_NEW_H标志。 After that I just needed add a forward declaration and the library compiled. 之后,我只需要添加一个前向声明并编译该库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM