You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Dmitriy Kargapolov <dm...@gmail.com> on 2008/12/05 01:26:36 UTC

M4 beta c++ compilation error

Hi, I'm trying to compile qpid cpp from M4 beta:
http://people.apache.org/~rhs/qpid-incubating-M4-beta/
and getting following error:

 g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -Werror -pedantic -Wall -Wextra
-Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
-Winvalid-pch -Wno-system-headers -Woverloaded-virtual
-I/opt/home/drpdev/qpid-tools/include -MT qpid/acl/Acl.lo -MD -MP -MF
qpid/acl/.deps/Acl.Tpo -c qpid/acl/Acl.cpp  -fPIC -DPIC -o
qpid/acl/.libs/Acl.o
In file included from ./qpid/framing/AMQFrame.h:29,
                 from ./qpid/framing/amqp_framing.h:22,
                 from ./qpid/framing/FrameSet.h:23,
                 from ./qpid/broker/MessageAdapter.h:27,
                 from ./qpid/broker/Message.h:26,
                 from ./qpid/broker/Consumer.h:24,
                 from ./qpid/broker/Queue.h:25,
                 from ./qpid/broker/Deliverable.h:24,
                 from ./qpid/broker/Exchange.h:26,
                 from ./qpid/broker/DirectExchange.h:26,
                 from ./qpid/broker/Broker.h:27,
                 from qpid/acl/Acl.cpp:22:
./qpid/framing/BodyHolder.h:65: error: `template<class T> typename
qpid::framing::DisableInPlace<T, qpid::framing::BodyHolder&>::type
qpid::framing::BodyHolder::operator=(const T&)' and `template<class
InPlace> typename qpid::framing::EnableInPlace<InPlace,
qpid::framing::BodyHolder&>::type
qpid::framing::BodyHolder::operator=(const InPlace&)' cannot be
overloaded
./qpid/framing/Blob.h: In instantiation of `qpid::framing::Blob<148u,
qpid::framing::AMQBody>':
./qpid/framing/BodyHolder.h:83:   instantiated from here
./qpid/framing/Blob.h:172: error: `template<class T> typename
qpid::framing::DisableInPlace<T, qpid::framing::Blob<Size,
BaseType>&>::type qpid::framing::Blob::operator=(const T&) [with T =
T, unsigned int Size = 148u, BaseType = qpid::framing::AMQBody]' and
`template<class InPlace> typename
qpid::framing::EnableInPlace<InPlace, qpid::framing::Blob<Size,
BaseType>&>::type qpid::framing::Blob::operator=(const InPlace&) [with
InPlace = InPlace, unsigned int Size = 148u, BaseType =
qpid::framing::AMQBody]' cannot be overloaded

Compiler version:
g++ (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Copyright (C) 2004 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.

Do I need to adjust some CXX flags?

Re: M4 beta c++ compilation error

Posted by Gordon Sim <gs...@redhat.com>.
Dmitriy Kargapolov wrote:
> Compiler version:
> g++ (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
> Copyright (C) 2004 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.

Are you able to upgrade the compiler version? I suspect that will be the 
simplest solution.

Re: M4 beta c++ compilation error

Posted by Dmitriy Kargapolov <dm...@gmail.com>.
On Wed, Dec 10, 2008 at 4:13 AM, Gordon Sim <gs...@redhat.com> wrote:
> Dmitriy Kargapolov wrote:
>>
> I'm using boost 1.33 and gcc 4.1.1 [20070105 (Red Hat 4.1.1-51)] at present;
> I use boost 1.33 and gcc 4.1.2 as well and that also works.
>
Thank you, I'll try that.

>> I'm not sure what caused this sort of problems - boost specifics like
>> using template techniques highly sensitive to compiler standard
>> conformance and other features, or qpid code specifics, but there
>> should be way to solve this...
>
> Is the older boost version removed from the system?
>
I used explicit flags to point to includes and libraries in custom dir.

Re: M4 beta c++ compilation error

Posted by Gordon Sim <gs...@redhat.com>.
Dmitriy Kargapolov wrote:
> Recently I've made one more try to build Qpid. Used GCC 4.1.2, Boost
> 1.35. Both built from src.
> I did manage to avoid Qpid compilation errors _only_ by removing
> "-pedantic" flag from compiler flags (in configure.ac). Binary qpidd
> made this way crashdumped at start somewhere in
> boost::program_options::options_description::add ()...
> 
> I have RHEL3/4 (not sure - multiple updates were made to this server
> through its life), so I have to build GCC/Boost from sources if I need
> upgrade. It would be worth to know which compiler version and boost
> version developers use to build Qpid. Details including GCC spec would
> be highly appreciated.

I'm using boost 1.33 and gcc 4.1.1 [20070105 (Red Hat 4.1.1-51)] at 
present; I use boost 1.33 and gcc 4.1.2 as well and that also works.

> I'm not sure what caused this sort of problems - boost specifics like
> using template techniques highly sensitive to compiler standard
> conformance and other features, or qpid code specifics, but there
> should be way to solve this...

Is the older boost version removed from the system?


Re: M4 beta c++ compilation error

Posted by Dmitriy Kargapolov <dm...@gmail.com>.
Recently I've made one more try to build Qpid. Used GCC 4.1.2, Boost
1.35. Both built from src.
I did manage to avoid Qpid compilation errors _only_ by removing
"-pedantic" flag from compiler flags (in configure.ac). Binary qpidd
made this way crashdumped at start somewhere in
boost::program_options::options_description::add ()...

I have RHEL3/4 (not sure - multiple updates were made to this server
through its life), so I have to build GCC/Boost from sources if I need
upgrade. It would be worth to know which compiler version and boost
version developers use to build Qpid. Details including GCC spec would
be highly appreciated.
I'm not sure what caused this sort of problems - boost specifics like
using template techniques highly sensitive to compiler standard
conformance and other features, or qpid code specifics, but there
should be way to solve this...

Re: M4 beta c++ compilation error

Posted by Dmitriy Kargapolov <dm...@gmail.com>.
On Fri, Dec 5, 2008 at 2:25 PM, Gordon Sim <gs...@redhat.com> wrote:
> Dmitriy Kargapolov wrote:
>>
>> I'm pretty sure upgrading compiler will help.

1. Installed gcc version 4.3.2, boost v1.37, tried to build.
---
 g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -Werror -pedantic -Wall -Wextra
-Wno-shadow -Wpointer-arith -Wcast-qual -Wc
ast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch
-Wno-system-headers -Woverloaded-virtual -I/usr/loc
al/include/boost-1_37 -MT qpid/acl/Acl.lo -MD -MP -MF
qpid/acl/.deps/Acl.Tpo -c qpid/acl/Acl.cpp  -fPIC -DPIC -o q
pid/acl/.libs/Acl.o
cc1plus: warnings being treated as errors
In file included from
/usr/local/include/boost-1_37/boost/ptr_container/ptr_map_adapter.hpp:19,
                 from
/usr/local/include/boost-1_37/boost/ptr_container/ptr_map.hpp:20,
                 from ./qpid/broker/DtxManager.h:24,
                 from ./qpid/broker/Broker.h:28,
                 from qpid/acl/Acl.cpp:22:
/usr/local/include/boost-1_37/boost/ptr_container/detail/map_iterator.hpp:52:
error: type qualifiers ignored on fu
nction return type
---

2. Re-configured with --disable-warning, make still failed:
---
 g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -I/usr/local/include/boost-1_37
-MT qpid/broker/Message.lo -MD -MP -MF qpid/broker/.deps/Message.Tpo
-c qpid/broker/Message.cpp  -fPIC -DPIC -o qpid/broker/.libs/Message.o
qpid/broker/Message.cpp: In member function 'virtual void
qpid::broker::Message::allEnqueuesComplete()':
qpid/broker/Message.cpp:349: error: no matching function for call to
'swap(boost::function<void ()(const
boost::intrusive_ptr<qpid::broker::Message>&)>*&, boost::function<void
()(const boost::intrusive_ptr<qpid::broker::Message>&)>*&)'
---

Re: M4 beta c++ compilation error

Posted by Gordon Sim <gs...@redhat.com>.
Dmitriy Kargapolov wrote:
> I'm pretty sure upgrading compiler will help.
> I've just confused by INSTALL doc which stated:
> 
> Qpid has been built using the GNU C++ compiler:
>  * gcc     <http://gcc.gnu.org/>                        (3.2.3)
> 
> so INSTALL seems to be not up-to-date?

Yes, it probably needs updated. I can verify it works with gcc 3.4.6 I 
believe, albeit with the boost-1.32-support patch applied (with a later 
boost that patch would not be required).

I'll update it to that.

Re: M4 beta c++ compilation error

Posted by Dmitriy Kargapolov <dm...@gmail.com>.
On Fri, Dec 5, 2008 at 8:53 AM, Carl Trieloff <cc...@redhat.com> wrote:
> Aidan Skinner wrote:
>>
>> On Fri, Dec 5, 2008 at 2:32 AM, Carl Trieloff <cc...@redhat.com>
>> wrote:
>>
>>
>>>
>>> I looks like you are building RHEL3?  The builds I know
>>> work are all later versions, so it might be complier & stl version
>>> related.
>>>
>>
>> Is 2.6.9 not RHEL4? I'm almost 100% certain that RHEL3 was still using
>> a 2.4 kernel, although the memories are a bit horrific.
>
> if it is RHEL 4 it should work. maybe check you are uptodate.
>
> Carl.
>

I'm pretty sure upgrading compiler will help.
I've just confused by INSTALL doc which stated:

Qpid has been built using the GNU C++ compiler:
 * gcc     <http://gcc.gnu.org/>                        (3.2.3)

so INSTALL seems to be not up-to-date?

Thank you all for help.

Re: M4 beta c++ compilation error

Posted by Carl Trieloff <cc...@redhat.com>.
Aidan Skinner wrote:
> On Fri, Dec 5, 2008 at 2:32 AM, Carl Trieloff <cc...@redhat.com> wrote:
>
>   
>> I looks like you are building RHEL3?  The builds I know
>> work are all later versions, so it might be complier & stl version
>> related.
>>     
>
> Is 2.6.9 not RHEL4? I'm almost 100% certain that RHEL3 was still using
> a 2.4 kernel, although the memories are a bit horrific.
if it is RHEL 4 it should work. maybe check you are uptodate.

Carl.

Re: M4 beta c++ compilation error

Posted by Aidan Skinner <ai...@apache.org>.
On Fri, Dec 5, 2008 at 2:32 AM, Carl Trieloff <cc...@redhat.com> wrote:

> I looks like you are building RHEL3?  The builds I know
> work are all later versions, so it might be complier & stl version
> related.

Is 2.6.9 not RHEL4? I'm almost 100% certain that RHEL3 was still using
a 2.4 kernel, although the memories are a bit horrific.

It's probably necessary to apply the boost-1.32-support stuff (cd
qpid/cpp/boost-1.32-support && make apply) then re-run boostrap,
configure and make.

- Aidan

-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://cwiki.apache.org/qpid
"Have we anything resembling a plan?" "Mm-hm. Ride till we find
them... and kill them all." - The 13th Warrior

Re: M4 beta c++ compilation error

Posted by Carl Trieloff <cc...@redhat.com>.
Dmitriy,

I looks like you are building RHEL3?  The builds I know
work are all later versions, so it might be complier & stl version
related.

It might be worth a few experiments in that regard.

I know it builds on RHEL 4.7, 5,1 5,2 5,3 on FC 7,8,9,10 and rawhide +
other distros with similar versions of GCC etc.

I'm on g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)

Carl.

Dmitriy Kargapolov wrote:
> On Thu, Dec 4, 2008 at 7:59 PM, Steve Huston <sh...@riverace.com> wrote:
>   
>> Hi Dmitriy,
>>
>>     
>>> Hi, I'm trying to compile qpid cpp from M4 beta:
>>> http://people.apache.org/~rhs/qpid-incubating-M4-beta/
>>> and getting following error:
>>>       
>> Ok... Do you maybe have the rest of the build output, particularly the beginning?
>>     
>
> Yes. Please see attached logs.
>
>   
>>> Do I need to adjust some CXX flags?
>>>       
>> What hardware are you running on?
>>     
>
> Linux <hostname> 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006
> i686 i686 i386 GNU/Linux
>
>   
>> Try deleting:
>>
>> qpid/cpp/src/generate_MaxMethodBodySize_h
>> qpid/cpp/src/qpid/framing/MaxMethodBodySize.h
>>
>> Then re-run the build.
>>
>>     
> Same stuff. Log in MMM-1.log inside tarball attached.
>
>   
>> -Steve
>>
>> --
>> Steve Huston, Riverace Corporation
>> Check out my networked programming blog at
>> http://stevehuston.wordpress.com/
>>
>>     
>
> -dk-
>   


Re: M4 beta c++ compilation error

Posted by Dmitriy Kargapolov <dm...@gmail.com>.
On Thu, Dec 4, 2008 at 7:59 PM, Steve Huston <sh...@riverace.com> wrote:
> Hi Dmitriy,
>
>> Hi, I'm trying to compile qpid cpp from M4 beta:
>> http://people.apache.org/~rhs/qpid-incubating-M4-beta/
>> and getting following error:
>
> Ok... Do you maybe have the rest of the build output, particularly the beginning?

Yes. Please see attached logs.

>>
>> Do I need to adjust some CXX flags?
>
> What hardware are you running on?

Linux <hostname> 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006
i686 i686 i386 GNU/Linux

>
> Try deleting:
>
> qpid/cpp/src/generate_MaxMethodBodySize_h
> qpid/cpp/src/qpid/framing/MaxMethodBodySize.h
>
> Then re-run the build.
>
Same stuff. Log in MMM-1.log inside tarball attached.

> -Steve
>
> --
> Steve Huston, Riverace Corporation
> Check out my networked programming blog at
> http://stevehuston.wordpress.com/
>

-dk-

RE: M4 beta c++ compilation error

Posted by Steve Huston <sh...@riverace.com>.
Hi Dmitriy,

> Hi, I'm trying to compile qpid cpp from M4 beta:
> http://people.apache.org/~rhs/qpid-incubating-M4-beta/
> and getting following error:

Ok... Do you maybe have the rest of the build output, particularly the
beginning?

>  g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -Werror -pedantic -Wall
-Wextra
> -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
> -Winvalid-pch -Wno-system-headers -Woverloaded-virtual
> -I/opt/home/drpdev/qpid-tools/include -MT qpid/acl/Acl.lo -MD -MP
-MF
> qpid/acl/.deps/Acl.Tpo -c qpid/acl/Acl.cpp  -fPIC -DPIC -o
> qpid/acl/.libs/Acl.o
> In file included from ./qpid/framing/AMQFrame.h:29,
>                  from ./qpid/framing/amqp_framing.h:22,
>                  from ./qpid/framing/FrameSet.h:23,
>                  from ./qpid/broker/MessageAdapter.h:27,
>                  from ./qpid/broker/Message.h:26,
>                  from ./qpid/broker/Consumer.h:24,
>                  from ./qpid/broker/Queue.h:25,
>                  from ./qpid/broker/Deliverable.h:24,
>                  from ./qpid/broker/Exchange.h:26,
>                  from ./qpid/broker/DirectExchange.h:26,
>                  from ./qpid/broker/Broker.h:27,
>                  from qpid/acl/Acl.cpp:22:
> ./qpid/framing/BodyHolder.h:65: error: `template<class T> typename
> qpid::framing::DisableInPlace<T, qpid::framing::BodyHolder&>::type
> qpid::framing::BodyHolder::operator=(const T&)' and `template<class
> InPlace> typename qpid::framing::EnableInPlace<InPlace,
> qpid::framing::BodyHolder&>::type
> qpid::framing::BodyHolder::operator=(const InPlace&)' cannot be
> overloaded
> ./qpid/framing/Blob.h: In instantiation of
`qpid::framing::Blob<148u,
> qpid::framing::AMQBody>':
> ./qpid/framing/BodyHolder.h:83:   instantiated from here
> ./qpid/framing/Blob.h:172: error: `template<class T> typename
> qpid::framing::DisableInPlace<T, qpid::framing::Blob<Size,
> BaseType>&>::type qpid::framing::Blob::operator=(const T&) [with T =
> T, unsigned int Size = 148u, BaseType = qpid::framing::AMQBody]' and
> `template<class InPlace> typename
> qpid::framing::EnableInPlace<InPlace, qpid::framing::Blob<Size,
> BaseType>&>::type qpid::framing::Blob::operator=(const InPlace&)
[with
> InPlace = InPlace, unsigned int Size = 148u, BaseType =
> qpid::framing::AMQBody]' cannot be overloaded
> 
> Compiler version:
> g++ (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
> Copyright (C) 2004 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.
> 
> Do I need to adjust some CXX flags?

What hardware are you running on?

Try deleting:

qpid/cpp/src/generate_MaxMethodBodySize_h
qpid/cpp/src/qpid/framing/MaxMethodBodySize.h

Then re-run the build.

-Steve

--
Steve Huston, Riverace Corporation
Check out my networked programming blog at
http://stevehuston.wordpress.com/