Operating System - Linux
1753485 Members
4666 Online
108794 Solutions
New Discussion юеВ

Re: error #2266: "input_iterator_tag with aCC 6.15

 
SOLVED
Go to solution
Neel2
Regular Advisor

error #2266: "input_iterator_tag with aCC 6.15

Hi,

We are trying to port our product from aCC 3.57 to 6.15 on HP-UX B.11.23 U ia64, and we stuck up with the following errors:

Also, can anyone point me to the documentation which will guide us how to port application from aCC 3.57 to 6.15(or any latest compiler version), and what all flags need to add/delete for succesfull compilation with latest compiler version on HP-UX aCC 6.15.

thanks,
Neel

//=======================================
/5.0.6/HP-UXB.11.23_32bit_aCC_A.06.15/dbg
+DA1.1 +DS2.0 -ext +Z +u4 -g0 -DOS_
HPUX_11_00 -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_ENABLE_MEMBER_TEMPLATE_FEATURES
-DOS_NO_ALLOCATORS -DOS_MULTI_THREADED -DOS_HPUX_PTHREADS -DOS_PTHREADS -D_HPUX
_SOURCE -D_REENTRANT -D_THREAD_SAFE -c +Z vector.cpp
aCC: warning 901: unknown option: `+DA1.1': use +help for online documentation.
Warning #4074-D: unrecognized argument '2.0' to +DS option, using 'blended' instead

"/5.0.6/HP-UXB.11.23_32bit_aCC_A.
06.15/dbg/ospace/osstd/iterator.h", line 60: error #2266: "input_iterator_tag" is ambiguous
inline os_input_iterator_tag
^

"/5.0.6/HPUXB.11.23_32bit_aCC_A.06.15/dbg/ospace/osstd/iterator.h", line 116: erro #2266: "output_iterator_tag"
is ambiguous inline os_output_iterator_tag
//========================================
83 REPLIES 83
Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

You need to remove your use of the foreign devil STL ospace. There is a conflict between the input_iterator_tag in the global? namespace and the official one in std.

You should also remove +DA1.1 +DS2.0.
Remove -D_REENTRANT -D_THREAD_SAFE and replace by -mt.

I see you have already noticed a similar issue in this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1121782

Without a .i file created from -E -.i, I can't help.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi Dennis,

Please find attached .i file.

The following cmd line thru which its been generated.

//=======================================
/opt/aCC.06.15/opt/aCC/bin/aCC -I/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/toolkit/5.0.6/HP- UXB.11.23_32bit_aCC_A.06.15/dbg -ext +Z +u4 -g0 -DOS_HPUX_11_00 -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS -DOS_MULTI_THREADED -DOS_HPUX_PTHREADS -DOS_PTHREADS -D_HPUX_SOURCE -mt -E -.i -c +Z vector.cpp
//=======================================

Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>The following cmd line thru which its been generated.

You are mixing RW's STL with your ospace STL.
You can only have one or the other but not both.

Why aren't you using the HP supplied C++ Standard Library?

If this worked on PA, it was only because the default is -AP there. On IPF, the default is almost -AA.

You could try compiling with -AP??
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi Dennis,

It works, thanks. Could you please tell me the significance of "-AP" flag, or a weblink will do.

And now i stuck up with following errors like:
//===================================
"/vobs/vslclk.c", line 69: error #2131: expression must have pointer-to-class type
dtStruct->dt_hour = tmPtr->tm_hour;

"../h/vsl.h", line 1524: error #2077-D: this declaration has no storage class or
type specifier
ERROR_MACHINE_IS_UNKNOWN
^
"../h/vsl.h", line 1530: error #2065: expected a ";"
typedef struct vs_dateTimeRec {
^
//=======================================

-E -.i file is attached for your reference.


Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Ok, nice i have found a link, which describe about "-AA" & "-AP" flag at:http://docs.hp.com/en/10946/faq.htm

Thanks,
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi Dennis,

In addition to the above post the following cmd line i tried:
---------------------------------------------
aCC -I. -I../h -I../om/h -I../sm/h -I../../thirdparty/dbghelp -I../../thirdparty
/psapi -DDEBUG -g -c +Z +DA1.1 +DS2.0 -DHP11 -mt -DVS_USE_64_CALLS -D_LARGEFIL
E64_SOURCE -o /disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32b
it/dbg//o/vslclk.o /vobs/kernel/vsl/vslclk.c
---------------------------------------------

and got the following errors:

vslclk.c", line 69: error #2131: expression must have pointer-to-class type
dtStruct->dt_hour = tmPtr->tm_hour;

"../h/vsl.h", line 1524: error #2077-D: this declaration has no storage class or
type specifier
ERROR_MACHINE_IS_UNKNOWN
^
"../h/vsl.h", line 1530: error #2065: expected a ";"
typedef struct vs_dateTimeRec {
^
//========================================//
the same -E -.i file is attached for reference.



Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

vslclk.c: error #2131: expression must have pointer-to-class type
dtStruct->dt_hour = tmPtr->tm_hour;

You haven't declared vs_dateTimeRec so dtStruct isn't of the right type.

vsl.h: error #2077-D: this declaration has no storage class or type specifier

This isn't in the .i file. In fact, since there aren't 10000s of lines there, your attached .i file is suspect. (Only 4666 bytes.) You may have to gzip it if very big.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

ok, after digging, i found the location in source code from where i am getting the first error:

"../h/vsl.h", line 1524: error #2077-D: this declaration has no storage class or
type specifier
ERROR_MACHINE_IS_UNKNOWN
^

The snippet of .h is:
//===========================================

/*
* hp9000s700/hp9000s800: address of segments will be determined by system,
* shmat() will only accept a pre-determined address if the segment has
* already been attached
*/
/* to use shared memory */
#if defined (__hp9000s700_shm) || defined (__hp9000s800_shm)
#define VSL_CXX_BASE 0x00000000
#else /* defined (__hp9000s700_shm) || defined (__hp9000s800_shm) */
#if defined(_64BIT_)
#define VSL_CXX_BASE 0x8000030000000000
#else
#define VSL_CXX_BASE 0x50000000
#endif /* _64BIT_ */
#define USE_MMAP /* use mmap for C++ */
#endif /* defined (__hp9000s700_shm) || defined (__hp9000s800_shm) */
#else /* sun3/4 */
ERROR_MACHINE_IS_UNKNOWN
#endif /* sun3/4 */

//=========================================

Hence, I am getting an error #2077 "ERROR_MACHINE_IS_UNKNOWN", could you please suggest what needs to modify/add to use shared memory (which macro need to defined )?

Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

vsl.h: error #2077-D: this declaration has no storage class or type specifier
ERROR_MACHINE_IS_UNKNOWN

This seems broken. Why not use: #error "This machine doesn't have #if set correctly"

>could you please suggest what needs to modify/add to use shared memory (which macro need to defined)?

You probably could get away with using __hp9000s800_shm.

You should probably find where __hp9000s800_shm is set and add some code there that also checks __ia64.