Archived
This forum has been archived. Please start a new discussion on GitHub.
Tru64 patches for Ice V3.0.0 #1
The following posts contain patches to be able to build Ice on Tru64 V5.1B using the HP/Compaq C++ V6.5 compiler. I will be posting 1 message per patch with a description of what the patch does and why it was needed.
With the correct compiler flags, Ice already build using the GNU Compiler, however the GNU C++ compiler isn't ABI compatible with the Compaq C++ (default system) compiler, which means it's impossible to link the GNU compiled ICE library with a 3rd party C++ library (e.g. Oracle's OCCI library).
Hopefully these can be incorporated in the standard release, since most are modest corrections.
With the correct compiler flags, Ice already build using the GNU Compiler, however the GNU C++ compiler isn't ABI compatible with the Compaq C++ (default system) compiler, which means it's impossible to link the GNU compiled ICE library with a 3rd party C++ library (e.g. Oracle's OCCI library).
Hopefully these can be incorporated in the standard release, since most are modest corrections.
0
Comments
-
Tru64 patches for Ice V3.0.0 #2
Patch against Make.conf.OSF1
* use cxx as the default compiler
* define CC to include a preprocessor define (-D__osf1__), since the icecpp makefile doesn't pass CFLAGS. Fixes:make[2]: Entering directory `src/icecpp' cc -I. -c cccp.c cc: Error: config.h, line 80: #error "unsupported operating system or platform" (errormessage) # error "unsupported operating system or platform" ----^
* compiler flags suppress certain warning messages. These are:cxx: Warning: lex.yy.c, line 1553: statement is unreachable (D:codeunreachable) if ( ! yy_did_buffer_switch_on_eof ) ----------------------------------------^ == cxx: Warning: PythonUtil.cpp, line 1245: statement either is unreachable or causes unreachable code (D:codcauunr) _out << "'" << value << "'"; ----------------^ == cxx: Warning: Grammar.tab.c, line 1342: code can never be executed at label "yyerrorlab". (D:labelnotreach) yyerrorlab: ^
* use -D__USE_STD_IOSTREAM -- from the man page of cxx:-D__[NO_]USE_STD_IOSTREAM Use or don't use the standard iostreams. If -D__USE_STD_IOSTREAM is specified, this forces the inclusion of the ANSI standard version of the iostream header file. This is the default in strict_ansi and strict_ansi_errors mode of the compiler. Otherwise the pre-standard AT&T-compatible version of iostreams is used.
* ICEUTIL_OS_LIBS link with -lrt which enables usage of nanosleep()0 -
Tru64 patches for Ice V3.0.0 #3
This patch fixes errors like this:cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/algorithm.cc, line 103: no operator "!=" matches these operands operand types are: DictIndex != const DictIndex detected during instantiation of "InputIterator std::find(InputIterator, InputIterator, const T &) [with InputIterator=DictIndex *, T=DictIndex]" while (first != last && *first != value) -----------------------------------^ cxx: Info: 1 error detected in the compilation of "Main.cpp".
The Standard Template class of the Compaq C++ compiler apparently needs an explicit definition of a != operator, if you use != on the class/struct.
Interesting note:
The STL of Compaq C++ is based on the STL from Rogue Wave.
Rogue Wave has recently released their STL as open source (and has been picked up by the Apache Foundation). I'm not sure if the current release of RW STL (or Apache stdcxx) still requires this.. but might be worth checking out.
http://www.roguewave.com/standard-library/
http://incubator.apache.org/stdcxx/0 -
Tru64 patches for Ice V3.0.0 #4
Patch to fix:cxx -c -I../../include -I.. -DICE_GRID_API_EXPORTS -DGPL_BUILD -pthread -std gnu -D_REENTRANT -D__osf1__ -pthread -D__USE_STD_IOSTREAM -g ServerI.cpp cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/memory, line 174: incomplete type is not allowed detected during: instantiation of "size _RWrwstd::_RWrw_allocation_size(T *, size, size) [with T=std::vector<IceGrid::ServiceInstanceHelper, std::allocator<IceGrid::ServiceInstanceHelper>>::value_ty pe, size=unsigned long]" at line 238 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "void std::vector<T, Allocator>::_RWinit() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 249 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "std::vector<T, Allocator>::vector(const Allocator &) [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 143 of "../IceGrid/DescriptorHelper.h" return (_RWSTD_CONTAINER_BUFFER_SIZE)*(1+((sizeof(T)-1)/_RWSTD_CONTAINER_BUFFER_SIZE)) / sizeof(T); --------------------------------------------------------^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/memory, line 174: incomplete type is not allowed detected during: instantiation of "size _RWrwstd::_RWrw_allocation_size(T *, size, size) [with T=std::vector<IceGrid::ServiceInstanceHelper, std::allocator<IceGrid::ServiceInstanceHelper>>::value_ty pe, size=unsigned long]" at line 238 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "void std::vector<T, Allocator>::_RWinit() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 249 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "std::vector<T, Allocator>::vector(const Allocator &) [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 143 of "../IceGrid/DescriptorHelper.h" return (_RWSTD_CONTAINER_BUFFER_SIZE)*(1+((sizeof(T)-1)/_RWSTD_CONTAINER_BUFFER_SIZE)) / sizeof(T); ------------------------------------------------------------------------------------------------------^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/memory, line 246: pointer to incomplete class type is not allowed detected during: instantiation of "void _RWrwstd::_RWdestroy(T *) [with T=IceGrid::ServiceInstanceHelper]" at line 471 instantiation of "void std::allocator<T>::destroy(T *) [with T=IceGrid::ServiceInstanceHelper]" at line 207 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "void std::vector<T, Allocator>::_RWdestroy(std::vector<T, Allocator>::iterator, std::vector<T, Allocator>::iterator) [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 459 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "std::vector<T, Allocator>::~vector() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 143 of "../IceGrid/DescriptorHelper.h" pointer->~T(); ----^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector, line 207: expression must be a pointer to a complete object type detected during: instantiation of "void std::vector<T, Allocator>::_RWdestroy(std::vector<T, Allocator>::iterator, std::vector<T, Allocator>::iterator) [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 459 instantiation of "std::vector<T, Allocator>::~vector() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>] " at line 143 of "../IceGrid/DescriptorHelper.h" _RWvalue_alloc_type(_RWend_of_storage).destroy(start++); -------------------------------------------------------^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector, line 460: expression must be a pointer to a complete object type detected during instantiation of "std::vector<T, Allocator>::~vector() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>]" at line 143 of "../IceGrid/DescriptorHelper.h" _RWvalue_alloc_type(_RWend_of_storage).deallocate(_RWstart,_RWend_of_storage.data()-_RWstart); -----------------------------------------------------------------^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector, line 460: expression must be a pointer to a complete object type detected during instantiation of "std::vector<T, Allocator>::~vector() [with T=IceGrid::ServiceInstanceHelper, Allocator=std::allocator<IceGrid::ServiceInstanceHelper>]" at line 143 of "../IceGrid/DescriptorHelper.h" _RWvalue_alloc_type(_RWend_of_storage).deallocate(_RWstart,_RWend_of_storage.data()-_RWstart); ------------------------------------------------------------------------------------------^ cxx: Info: 6 errors detected in the compilation of "ServerI.cpp". make: *** [ServerI.o] Error 1
Strangely.. it seems the order of defining the class is important here.0 -
Tru64 patches for Ice V3.0.0 #5
Vector initializers need to be of the correct type for the Compaq C++ STL.
Fix for following errors:cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/iterator, line 354: no instance of overloaded function "std::_RWiterator_category" matches the argument list (nomatchingfun) argument types are: (int) detected during: instantiation of "void std::distance(ForwardIterator, ForwardIterator, Distance &) [with ForwardIterator=int, Distance=std::vector<Ice::Byte, std::allocator<Ice::Byte>>::size_type]" at line 289 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "std::vector<T, Allocator>::vector(InputIterator, InputIterator, const Allocator &) [with T=Ice::Byte, Allocator=std::allocator<Ice::Byte>, InputIterator=int]" at line 1384 of "ConnectionI.cpp" _RWdistance(first, last, n, _RWiterator_category(first)); --------------------------------^ cxx: Error: /usr/lib/cmplrs/cxx/V6.5-014/include/cxx/memory, line 864: operand of "*" must be a pointer (badindopn) detected during: instantiation of "ForwardIterator std::uninitialized_copy(InputIterator, InputIterator, ForwardIterator) [with InputIterator=int, ForwardIterator=Ice::Byte *]" at line 293 of "/usr/lib/cmplrs/cxx/V6.5-014/include/cxx/vector" instantiation of "std::vector<T, Allocator>::vector(InputIterator, InputIterator, const Allocator &) [with T=Ice::Byte, Allocator=std::allocator<Ice::Byte>, InputIterator=int]" at line 1384 of "ConnectionI.cpp" __RWSTD::_RWconstruct(result++, *first++); ------------------------------------------^ cxx: Info: 2 errors detected in the compilation of "ConnectionI.cpp".
0 -
Tru64 patches for Ice V3.0.0 #6
With default compiler flags, socklen_t isn't known. Normally defining _XOPEN_SOURCE=500 should resolve this, however it seems to cause other errors in include files. Therefor use a typedef for socklen_t like on windows.0 -
Tru64 patches for Ice V3.0.0 #7
Aweful patch for an aweful problem. Somehow signal() is defined as a macro in a system header, which by itself shouldn't be a problem, weren't it for a bug in the compiler causing it to replace _condVar->signal() by the macro definition
At least, I think this is a bug. Workaround is to undefine the signal() macro.0 -
One last remark, for which I didn't make a patch yet. Compiling the code generates warnings for almost every assert() statement:
cxx: Warning: ConnectionI.cpp, line 920: conversion from pointer to smaller integer (D:narrowptr) assert(_exception.get()); ------------^
This can be fixed by writing a comparison to NULL, like:
assert(_exception.get() != NULL);0