Overview
Features
Download
Documentation
Community
Add-Ons & Services

poco compile error on HP-UX PA-RISC

Please post support and help requests here.

poco compile error on HP-UX PA-RISC

Postby dsd@ugs.com » 24 Apr 2008, 21:23

I received the following error when compiling Poco on 32-bit HPUX, PA-RISC system with compilere at.

aCC: HP ANSI C++ B3910B A.03.65

HP-UX omfhp1 B.11.11 U 9000/785 2006649599 unlimited-user license

-dave
Code: Select all

** Compiling src/SimpleHashTableTest.cpp (debug, shared)
aCC -Iinclude -I/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include
-I/tc_work/dsd/iso/poco_hpp/poco-1.3.2/XML/include
-I/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Util/include
-I/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Net/include
-I/tc_work/dsd/iso/poco_hpp/poco-1.3.2/CppUnit/include -AA +W361 +W307 +W749
+W849 -DPOCO_BUILD_HOST=omfhp1  -Dhpux -D_REENTRANT -D_THREAD_SAFE
-D_RWSTD_MULTI_THREAD -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED
-D_POSIX_C_SOURCE=199506L +DD32 -g0 +d -D_DEBUG= +Z -c
src/SimpleHashTableTest.cpp -o
/tc_work/dsd/iso/poco_hpp/poco-1.3.2/plm/svnas/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/testsuite/obj/HP-UX/9000-785/debug_shared/SimpleHashTableTest.o
Error 224: "/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h",
line 119 # Arguments do not match with any function 'swap'.
                    swap(_entries, ht._entries);
                     ^ ^ ^ ^ ^ ^ ^ ^ ^
Error 212: "/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h", line 120 # Argument type 'unsigned long' does not match expected parameter type 'Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator > > > &'.
                    swap(_size, ht._size);
                          ^^^           
Error 181: "/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h",
line 120 # Expected 1 argument(s) for "void
Poco::SimpleHashTable,std::allocator
>,int,Poco::HashFunction,std::allocator
 > >
>::swap(Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > > > &)"; had 2 instead.
                    swap(_size, ht._size);
                     ^ ^ ^ ^ ^ ^ ^
Error 212:
"/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h", line 121 # Argument type 'unsigned int' does not match expected parameter type
'Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > > > &'.
                    swap(_capacity, ht._capacity);
                          ^ ^ ^               
Error 181:
"/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h",
line 121 # Expected 1 argument(s) for "void
Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > >
>::swap(Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > > > &)"; had 2 instead.
                    swap(_capacity, ht._capacity);
                     ^ ^ ^ ^ ^ ^ ^ ^ ^^^
Error 556:
"/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/include/Poco/SimpleHashTable.h",
line 363 # Unable to generate specialization "void
Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > >
>::swap(Poco::SimpleHashTable,std::allocator >,int,Poco::HashFunction,std::allocator
 > > > &)" due to errors during generation.
                            swap(tmp);
                             ^ ^ ^
Error 445: "src/SimpleHashTableTest.cpp", line 136 # Cannot recover from earlier errors.
    void SimpleHashTableTest::testResize()
     ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^^^
make[2]: *** [/tc_work/dsd/iso/poco_hpp/poco-1.3.2/plm/svnas/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/testsuite/obj/HP-UX/9000-785/debug_shared/SimpleHashTableTest.o]
 Error 2
make[2]: Leaving directory
`/plm/svnas/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/testsuite'
make[1]: *** [projects] Error 2
make[1]: Leaving directory
`/plm/svnas/tc_work/dsd/iso/poco_hpp/poco-1.3.2/Foundation/testsuite'
make: *** [Foundation-tests] Error 2
dsd@ugs.com
 
Posts: 5
Joined: 14 Feb 2008, 22:14

Re: poco compile error on HP-UX PA-RISC

Postby alex » 25 Apr 2008, 00:40

Sounds like a dumb compiler. I do not have that particular platform/compiler handy, but off the top of my head I'd propose the following patch (compiles fine with MSVC++ and gcc)

Code: Select all

+++ P:/poco/Foundation/include/Poco/SimpleHashTable.h   Thu Apr 24 18:29:51 2008
@@ -115,10 +115,9 @@
    
    void swap(SimpleHashTable& ht)
    {
-      using std::swap;
-      swap(_entries, ht._entries);
-      swap(_size, ht._size);
-      swap(_capacity, ht._capacity);
+      _entries.swap(ht._entries);
+      std::swap(_size, ht._size);
+      std::swap(_capacity, ht._capacity);
    }
 
    void clear()


Alex
alex
 
Posts: 1122
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: poco compile error on HP-UX PA-RISC

Postby guenter » 25 Apr 2008, 11:01

also, recent versions of the HP compiler should compile this fine.

I test POCO on one of the machines provided by the HP Test Drive program. I remember seeing this error once, but it seems to have been fixed in a recent release. The testdrive machines usually have the latest compiler versions installed, so unfortunately, due to a lack of a private HP machine, we cannot test with different compiler versions.
guenter
 
Posts: 1121
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron