0

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.

When I try to compile using the g++ version 4.4.7 I get the following errors (more complete output here

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.

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?

Iliketoproveit
  • 445
  • 6
  • 15
  • 1
    What‘s the problem simply compiling it with the current compiler? –  Dec 21 '17 at 16:17
  • Are you trying to compile the library or use it? – molbdnilo Dec 21 '17 at 17:06
  • You can tell gcc to compile 32-bit code using `-m32`. – stark Dec 21 '17 at 17:06
  • @manni66 I updated the question to include an error that is happening when trying to compile with my current set up – Iliketoproveit Dec 21 '17 at 17:22
  • @molbdnilo I am trying to compile it – Iliketoproveit Dec 21 '17 at 17:22
  • Why can’t you use a current version of ACE/TAO? –  Dec 21 '17 at 17:29
  • @stark I just tried adding the -m32 flag but no luck. [Here](https://pastebin.com/uFyv0rmg) is the error output. Upon closed inspection it looks that this code is looking for a file called new.h in the standard library – Iliketoproveit Dec 21 '17 at 17:33
  • @manni66 This is the version that has all of the required files for me to proceed – Iliketoproveit Dec 21 '17 at 17:34
  • If you compile it with gcc 2.96, you will only be able to *use* it with gcc 2.96 or thereabouts. Do you really want that? – n. m. could be an AI Dec 21 '17 at 17:36
  • You do not have 32-bit support installed. https://www.centos.org/forums/viewtopic.php?t=6069 – stark Dec 21 '17 at 17:38
  • @n.m. No which I am asking if there is a way to use the compatibility libraries offered by Redhat to compile it – Iliketoproveit Dec 21 '17 at 17:40
  • AFAICT compatibility libraries offered by Redhat don't let you compile anything, they are for binary compatibility only. – n. m. could be an AI Dec 21 '17 at 18:11
  • @stark So I tried to install the library by running `yum install libstdc++.i686` and then running `make` with the `-m32` flag added. Still I get the same error that it is missing a file called `new.h`. Error output [here](https://pastebin.com/YEH8Q4uL) – Iliketoproveit Dec 21 '17 at 18:12
  • GCC **2.96**? Gotta love compiler modifications that the GNU folks have [specifically disavowed](https://gcc.gnu.org/gcc-2.96.html). – genpfault Dec 21 '17 at 19:12
  • @genpfault The writeup there mentions that g++ 2.7.2 is what is they actually had for this release. I figured 2.96 would work just as well since red hat seems to kinda/sorta support it. Is there any hope of compiling this library with 4.4.7 seeing as it has been developed for 2.7.2? – Iliketoproveit Dec 21 '17 at 21:12

1 Answers1

0

Answering my own post since I was able to install it.

After installing the relevant 32bit libraries, the -m32 flag needed to get added. Then we needed to add a -DACE_LACKS_NEW_H flag since my system does not contain the <new.h> file. After that I just needed add a forward declaration and the library compiled.

Iliketoproveit
  • 445
  • 6
  • 15