Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
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.
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #2 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
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:

Code:
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:

Code:
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:

Code:
  -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()
Attached Files
File Type: txt tru64-ice-makefile.patch.txt (1.8 KB, 69 views)
__________________
Karl Vogel
Seagha CV

Last edited by kvogel : 02-07-2006 at 06:28 AM.
Reply With Quote
  #3 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
Tru64 patches for Ice V3.0.0 #3

This patch fixes errors like this:

Code:
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/
Attached Files
File Type: txt tru64-ice-operator.patch.txt (1,021 Bytes, 63 views)
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #4 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
Tru64 patches for Ice V3.0.0 #4

Patch to fix:

Code:
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.
Attached Files
File Type: txt tru64-ice-class-def-reorder.patch.txt (1.9 KB, 72 views)
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #5 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
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:
Code:
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".
Attached Files
File Type: txt tru64-ice-vector-initialisation.patch.txt (2.2 KB, 69 views)
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #6 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
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.
Attached Files
File Type: txt tru64-ice-socklen.patch.txt (351 Bytes, 61 views)
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #7 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
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.
Attached Files
File Type: txt tru64-ice-signal-macro.patch.txt (645 Bytes, 59 views)
__________________
Karl Vogel
Seagha CV
Reply With Quote
  #8 (permalink)  
Old 02-07-2006
kvogel kvogel is offline
Registered User
 
Name: Karl Vogel
Organization: SEAGHA cv
Project: Internal projects
 
Join Date: Feb 2006
Posts: 10
One last remark, for which I didn't make a patch yet. Compiling the code generates warnings for almost every assert() statement:

Code:
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);
__________________
Karl Vogel
Seagha CV
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
generateUUID on Tru64 bernard Help Center 1 09-07-2005 11:00 PM
Install Ice2.12 on Tru64 myer Patches 1 08-16-2005 11:32 AM
SPARC mutex assembler: patches & new code fmccor Patches 0 03-07-2003 11:55 AM


All times are GMT -4. The time now is 12:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.