
It seems that pion-network-library can't be built with gcc 4.3.0. In particular, here's the error thrown by the compiler:
[...]
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../common/include/pion -I/home/lorenzo/builds/pion-net-0.5.6/common/include -I../include -pthread -D_REENTRANT -I/usr/include/boost-1_35 -DPION_NETWORK_LIBRARY -O2 -Wall -Wno-strict-aliasing -DNDEBUG-MT HTTPTypes.lo -MD -MP -MF .deps/HTTPTypes.Tpo -c -o HTTPTypes.lo HTTPTypes.cpp
g++ -DHAVE_CONFIG_H -I. -I../../common/include/pion -I/home/lorenzo/builds/pion-net-0.5.6/common/include -I../include -pthread -D_REENTRANT -I/usr/include/boost-1_35 -DPION_NETWORK_LIBRARY -O2 -Wall -Wno-strict-aliasing -DNDEBUG -MT HTTPTypes.lo -MD -MP -MF .deps/HTTPTypes.Tpo -c HTTPTypes.cpp -fPIC -DPIC -o .libs/HTTPTypes.o
In file included from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/backward/hash_map:64,
from /home/lorenzo/builds/pion-net-0.5.6/common/include/pion/PionHashMap.hpp:36,
from ../include/pion/net/HTTPTypes.hpp:16,
from HTTPTypes.cpp:12:
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
In file included from HTTPTypes.cpp:13:
../include/pion/net/HTTPTypes.hpp:149: error: ISO C++ forbids declaration of 'hash_multimap' with no type
../include/pion/net/HTTPTypes.hpp:149: error: expected ';' before '<' token
../include/pion/net/HTTPTypes.hpp:153: error: ISO C++ forbids declaration of 'hash_multimap' with no type
../include/pion/net/HTTPTypes.hpp:153: error: expected ';' before '<' token
../include/pion/net/HTTPTypes.hpp:156: error: 'StringDictionary' does not name a type
../include/pion/net/HTTPTypes.hpp:159: error: 'StringDictionary' does not name a type
../include/pion/net/HTTPTypes.hpp:188: error: expected ',' or '...' before '&' token
../include/pion/net/HTTPTypes.hpp:188: error: ISO C++ forbids declaration of 'QueryParams' with no type
HTTPTypes.cpp:296: error: expected ',' or '...' before '&' token
HTTPTypes.cpp:296: error: ISO C++ forbids declaration of 'QueryParams' with no type
HTTPTypes.cpp: In static member function 'static std::string pion::net::HTTPTypes::make_query_string(int)':
HTTPTypes.cpp:299: error: 'QueryParams' is not a class or namespace
HTTPTypes.cpp:299: error: expected `;' before 'i'
HTTPTypes.cpp:299: error: 'i' was not declared in this scope
HTTPTypes.cpp:299: error: 'query_params' was not declared in this scope
make[2]: *** [HTTPTypes.lo] Error 1
make[2]: Leaving directory `/home/lorenzo/builds/pion-net-0.5.6/net/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lorenzo/builds/pion-net-0.5.6/net'
make: *** [all-recursive] Error 1
The main error, AFAIK, is that the compiler can't find hash_multimap. It seems to be correctly define in ext/hash_map although for some strange reason the compiler is not able to resolve that symbol.
Some information about my toolchain and system:
[lorenzo@andromeda ~]$ cat /etc/redhat-release
Fedora release 9 (Sulphur)
[lorenzo@andromeda ~]$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[lorenzo@andromeda ~]$ /lib/libc.so.6
GNU C Library stable release version 2.8, by Roland McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.0 20080428 (Red Hat 4.3.0-8).
Compiled on a Linux >>2.6.18-53.1.14.el5xen<< system on 2008-05-05.
Available extensions:
The C stubs add-on version 2.1.2.
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
RT using linux kernel aio
Hope to solve the problem, since I need this library for a project

I decided to switch over to using unordered_map instead of hash_map for gcc versions greater than 4.1 (it doesn't seem to work properly in 4.0). With this change and some others, everything appears to be working properly now for gcc 4.0 through 4.3.
- Login or register to post comments
Submitted by Mike Dickey on Sun, 07/13/2008 - 17:31.I created a new ticket in trac for this. We haven't really spent any cycles trying out gcc 4.3 yet, mainly because it wasn't supported yet by our dependencies (namely Boost). I think Boost supports it now, though..
http://trac.atomiclabs.com/ticket/241
- Login or register to post comments
Submitted by Mike Dickey on Wed, 07/02/2008 - 10:36.I've made a patch to let it build correctly:
Index: common/include/pion/PionHashMap.hpp
===================================================================
--- common/include/pion/PionHashMap.hpp (revision 217)
+++ common/include/pion/PionHashMap.hpp (working copy)
@@ -40,8 +40,15 @@
#define PION_HASH_STRING stdext::hash_compare >
#define PION_HASH(TYPE) stdext::hash_compare >
#else
- #define PION_HASH_MAP hash_map
- #define PION_HASH_MULTIMAP hash_multimap
+ #if __GNUC__ >= 3
+ #include
+ #define PION_HASH_MAP __gnu_cxx::hash_map
+ #define PION_HASH_MULTIMAP __gnu_cxx::hash_multimap
+ #else
+ #include
+ #define PION_HASH_MAP hash_map
+ #define PION_HASH_MULTIMAP hash_multimap
+ #endif
#define PION_HASH_STRING boost::hash
#define PION_HASH(TYPE) boost::hash
#endif
It can be found at: http://rafb.net/p/cjkqRg53.txt
- Login or register to post comments
Submitted by lvillani on Mon, 06/30/2008 - 12:40.