[omniORB] omniORB-4.0.3 omniNames compilation error on HPUX

Nitin Kashyap nitin at adobe.com
Fri Apr 2 10:25:52 BST 2004


Well I worked out another solution.

The code in log.cc has the alternate code (not using an attach call
) but inside a #ifdef. But sadly that #ifdef is not turned on by default
when we run configure on HPUX.
That is do because configure by default on HPUX does not use -AA flags for
compilation and hence assumes that C++ Style Standard Library is  not
supported.

Therefore if we run configure with the options CXXFLAGS=-AA and LDFLAGS=-AA
it correctly detects, and enables the #defines in the necessary makefiles,
so that the code compiles without any problem!!!

I guess the configure can be upgraded to use aCC -AA by default for C++
compilations and aCC -Ae for C compilations.

Sincerely
Nitin Kashyap
             
Member Technical Staff       
e-paper division                 
Adobe Systems India Pvt. Ltd.
Noida
91-120-2537681 extn: 34150                                  
 
 

> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com [mailto:omniorb-list-
> bounces at omniorb-support.com] On Behalf Of Alex Tingle
> Sent: Thursday, April 01, 2004 1:08 PM
> To: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] omniORB-4.0.3 omniNames compilation error on HPUX
> 
> The -AA option turns off attach(). You can't possibly expect it to
> compile! Why not rewrite it to not use attach()?
> 
> The old style library usage is becoming a problem in omniORB. The style
> guidelines essentially say 'pretend it's 1995' - on the theory that
> older style code is more portable. These days, some more modern
> compilers are phasing out the older idiom, making the code LESS
> portable! iostream is probably the worst for this.
> 
> A solution I suggested earlier applies in this case. If we split up the
> various components of omniORB, that would make it easier to deal with
> problems like this... You don't need omniNames compiled with -AA, It's a
> standalone program. It should be possible to build omniidl, omniNames,
> catior & the rest separately from the libraries. That would help porting
> by allowing us to do it a piece at a time.
> 
> On the other hand, perhaps I should be complaining about the HP
> compiler, with its myriad of incompatible modes. grr...
> 
> -Alex Tingle
> 
> --
> On Thu, 01 Apr 2004 12:21:46 +0530
> Nitin Kashyap <nitin at adobe.com> wrote:
> 
> > Hello everybody..
> >
> > I am also facing the exact similar error. did any body find any
> > solution???
> >
> >
> >
> > aCC  -c -O -AA -w +inst_v +DAportable -mt -I. -D__OMNIORB4__
> > -I../../../stub-D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
> > -DDEFAULT_LOGDIR='"/var/omninames"'-I.
> > -I../../../../src/appl/omniNames
> > -I../../../include-I../../../../include -D__OSVERSION__=11 -D__hpux__
> > -D__hppa__ -o log.o../../../../src/appl/omniNames/log.cc
> >
> > Error 187: "../../../../src/appl/omniNames/log.cc", line 381 #
> > Referenced object 'attach' is not a member of class
> > basic_ofstream<char,std::char_traits<char> >
> >     ["/opt/aCC/include_std/fstream", line 373].
> >           logf.attach(fd);
> >                ^^^^^^
> > Error 187: "../../../../src/appl/omniNames/log.cc", line 533 #
> > Referenced object 'attach' is not a member of class
> > basic_ofstream<char,std::char_traits<char> >
> >     ["/opt/aCC/include_std/fstream", line 373].
> >       logf.attach(fd);
> >            ^^^^^^
> > Error 187: "../../../../src/appl/omniNames/log.cc", line 657 #
> > Referenced object 'attach' is not a member of class
> > basic_ofstream<char,std::char_traits<char> >
> >     ["/opt/aCC/include_std/fstream", line 373].
> >         ckpf.attach(fd);
> >              ^^^^^^
> > Error 187: "../../../../src/appl/omniNames/log.cc", line 778 #
> > Referenced object 'attach' is not a member of class
> > basic_ofstream<char,std::char_traits<char> >
> >     ["/opt/aCC/include_std/fstream", line 373].
> >       logf.attach(fd);
> >            ^^^^^^
> > gmake[3]: *** [log.o] Error 2
> > gmake[3]: Leaving directory
> > `/home/nitin/mail-india/omniORB-4.0.3/build_hpux/src/appl/omniNames'
> > gmake[2]: *** [export] Error 1
> > gmake[2]: Leaving directory
> > `/home/nitin/mail-india/omniORB-4.0.3/build_hpux/src/appl'
> > gmake[1]: *** [export] Error 1
> > gmake[1]: Leaving directory
> > `/home/nitin/mail-india/omniORB-4.0.3/build_hpux/src'
> > gmake: *** [all] Error 1
> >
> >
> > I also need the -AA flag to link with my own -AA code.
> >
> >
> >
> > sincderely
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Member Technical Staff
> >
> > e-paper division
> >
> > Adobe Systems India Pvt. Ltd.
> >
> > Noida
> >
> >
> >
> >
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list