Operating System - Linux
1830899 Members
3302 Online
110017 Solutions
New Discussion

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.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

yes, your are absolutely correct. I need to put a check for __ia64. And it goes ahead.
but it does not make .o file. it gives the following error:

//=====================================
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
aCC: warning 901: unknown option: `+DA1.1': use +help for online documentation.
Warning #4074-D: unrecognized argument '2.0' to +DS option, using 'blended' inst
ead

Error #12000: Unable to create output file `/disk/nkhemkar/VOD_BUILD/aCC_6.15_bu
ild/kernel/7.0.1.4/HP-UX_32bit/dbg//o/vslclk.o'

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

Any suggestion ?

Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>but it does not make .o file. it gives the following error:
Error #12000: Unable to create output file /disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/vslclk.o

Most likely you don't have write permission to the file or directory. Or execute/read permission to any of the directory paths.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

clean build works. In addition just want to know, why i am getting assembler messages with new 06.15 version, the same file was compiled smoothly without any error with older 03.57 version.

The error is:
//======================================
/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/mchtsl
.s: Assembler messages:
/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/mchtsl
.s:1: Error: Unknown opcode `mchtsl.s,v 1.2 93/09/15 13:52:12 stephen Exp $'
/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/mchtsl
.s:3: Error: Unknown opcode `mchtsl.s Machine Dependent Test and Set Latch(Sun-4
)'
/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/mchtsl
.s:5: Error: Unknown opcode `c declaration:'
/disk/nkhemkar/VOD_BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/mchtsl
.s:6: Error: Unknown opcode `o_4b mchtsl(o_ptr)'
//======================================

The "mchtsl.s" file is attached for reference.

Thanks in advance for your suggestions and help.

Neel.
Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>why i am getting assembler messages with new A.06.15 version

You are invoking the assembler, nothing to do with the compiler. You need to ask about the assembler.

But the real reason, PA-RISC != IPF.
Your assembly file must be completely rewritten for the new architecture!

You should take advantage of aCC's inline assembly with real atomic instructions:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=4308e2f5bde02110e2f5bde02110275d6e10RCRD
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

First of all, I am newbee and do now know the meaning of PA & IPF.

On my Hp-UX machine uname -a shows:
HP-UX B.11.23 U ia64 2917453674

So, it is IPF architecture?

And, Do i need to rewrite the complete assembly file for the above architecture? Is there any whay to port the same file, w/o rewriting?

Thanks,
Neel
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi Dennis,

Sorry, for asking stupid questions. I got a nice pdf which describe about IPF and all.

http://h50236.www5.hp.com/solutions/copartner/IA64/reference/Porting_Tuning/itanium_wp_final.pdf

Now, i want help, regarding the above attached assembly file, can you give me some clue how should i start rewriting the same file for IPF?

Thanks,
Neel
Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>Do i need to rewrite the complete assembly file for the above architecture?
>can you give me some clue how should i start rewriting the same file for IPF?

Everything in the file is useless except for the comments.
As I mentioned with the above link, you should toss your assembly file and write it in C or C++.
You should also consider not using your current atomic primitive.

#include
// Sets lock to 0
// Returns:
// 0 If "lock" is available
// nonzero If "lock" is busy
int mchtsl(int *p) {
return (int)_Asm_xchg(_SZ_W, p, 0ULL, _LDHINT_NONE);
}
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

ok, thanks. now my mchtsl.c file contains:

#include
/* Sets lock to 0
* Returns:
* 0 If "lock" is available
* nonzero If "lock" is busy
*/
int mchtsl(int *p) {
return (int)_Asm_xchg(_SZ_W, p, 0ULL, _LDHINT_NONE);
}

And its succesfully compile with aCC 06.15.
so i have changed the earlier assembly file to .c file and put the above function, thats all need to be change right? OR do i need to take care of anything more in order to replace earlier assembly file? Could you please have a look and let me know.

Thanks,
Neel

Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

thanks. now my mchtsl.c file contains:

#include
/* Sets lock to 0
* Returns:
* 0 If "lock" is available
* nonzero If "lock" is busy
*/
int mchtsl(int *p) {
return (int)_Asm_xchg(_SZ_W, p, 0ULL, _LDHINT_NONE);
}

And its succesfully compile with aCC 06.15.
so i have changed the earlier assembly .s file to .c file and put the above function, thats all need to be change, right? OR do i need to take care of anything more in order to replace earlier assembly file? Could you please have a look and let me know incase if am doing something wrong.

Thanks,
Neel

Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>now my mchtsl.c file contains:
>* Returns:

This should really say: Returns old value of lock

>OR do I need to take care of anything more in order to replace earlier assembly file?

Well, there was some silly stuff in the .s file:
The subI instruction toggles the return value 0 <-> 1 so that it will match the SUN mchtsl return value.

If you need that, you need to have:
return 1 - (int)_Asm_xchg(_SZ_W, p, 0ULL, _LDHINT_NONE);

Where is your code to unlock the lock?
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Ok, thanks for your input. I will confirm and let you know.

Thanks for your help.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi,

Please correct me if am wrong:

$uname -a
HP-UX B.11.23 U ia64 2917453674

if uname -a returns the above o/p then can I set ARCHITECTURE=HP_IA64

And
$uname -a
HP-UX B.11.11 U 9000/800 109092009

returns the above o/p then can i set ARCHITECTURE=PA_RISC

Also, want to confirm that HP_IA64 is correct
or do i need to use something else?

Thanks,
Neel
Dennis Handly
Acclaimed Contributor

Re: error #2266: "input_iterator_tag with aCC 6.15

>HP-UX B.11.23 U ia64
>if uname -a returns the above o/p then can I set ARCHITECTURE=HP_IA64

I have no idea about ARCHITECTURE. But __ia64 is set.

>HP-UX B.11.11 U 9000/800
>returns the above o/p then can i set ARCHITECTURE=PA_RISC

Here __hppa is set.

Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Ok,

Thanks for your response.

Neel.
Neel2
Regular Advisor

Re: error #2266: "input_iterator_tag with aCC 6.15

Hi,

I am getting the following error:

//=====================================
aCC -o /disk/nkhemkar/BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//bin/register -Wl,+s -Wl,-E -l:libdld.sl /disk/nkhemkar/BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/register.o -lpthread -lm -lcl
ld: Can't find library or mismatched ABI for -llibdld.sl
Fatal error.
//======================================

And to resolve the same error, i refer
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1177438

where suggested to use:
//=====================================
aCC -o /disk/nkhemkar/BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//bin/register -Wl,-a,archive_shared -E -l:libdld.sl /disk/nkhemkar/BUILD/aCC_6.15_build/kernel/7.0.1.4/HP-UX_32bit/dbg//o/register.o -lpthread -lm -lcl
//=======================================

Now, it does resolved the issue, but could you please let me know significance of
using "-a, archive_shared" flags.

And, do i need to change my old flags OR the above error can be resolve changing shlib_path or any other way?

please suggest?

Neel