You can work around the warning/error with this patch:
----------------------------
diff --git a/qpid/cpp/src/qpid/RefCountedBuffer.cpp
b/qpid/cpp/src/qpid/RefCountedBuffer.cpp
index 40d620f..28961ca 100644
--- a/qpid/cpp/src/qpid/RefCountedBuffer.cpp
+++ b/qpid/cpp/src/qpid/RefCountedBuffer.cpp
@@ -34,7 +34,7 @@ BufferRef RefCountedBuffer::create(size_t n) {
new(store) RefCountedBuffer;
char* start = store+sizeof(RefCountedBuffer);
return BufferRef(
-
boost::intrusive_ptr<RefCounted>(reinterpret_cast<RefCountedBuffer*>(store)),
+
boost::intrusive_ptr<RefCounted>(reinterpret_cast<RefCountedBuffer*>((void*)store)),
start, start+n);
}
----------------------------
The hope is that the new(store) returns an address that will not cause a bus
fault when
referenced as a boost::intrusive_ptr.
I'll create a jira and attach this patch to it.
-Chuck
----- Original Message -----
> From: "Cajus Pollmeier" <[email protected]>
> To: [email protected]
> Sent: Monday, October 10, 2011 10:43:21 AM
> Subject: Building qpid-cpp on non i386/amd64
>
> Hi,
>
> I've a problem with building qpid-cpp on powerpc and arm in the
> moment.
> In the first case, the compiler bails out with:
>
> /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
> -I.
> -I../include -I../include -I. -I=. -Werror -pedantic -Wall -Wextra
> -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
> -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
> -Woverloaded-virtual -DQPID_LIBEXEC_DIR=\"/usr/lib/qpid-cpp/qpid\"
> -DBOOST_FILESYSTEM_VERSION=2 -g -O2 -c -o qpid/RefCountedBuffer.lo
> qpid/RefCountedBuffer.cpp
> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include
> -I. -I=. -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith
> -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var
> -Winvalid-pch -Wno-system-headers -Woverloaded-virtual
> -DQPID_LIBEXEC_DIR=\"/usr/lib/qpid-cpp/qpid\"
> -DBOOST_FILESYSTEM_VERSION=2 -g -O2 -c qpid/RefCountedBuffer.cpp
> -fPIC
> -DPIC -o qpid/.libs/RefCountedBuffer.o
> qpid/RefCountedBuffer.cpp: In static member function 'static
> qpid::BufferRef qpid::RefCountedBuffer::create(size_t)':
> qpid/RefCountedBuffer.cpp:37:83: error: cast from 'char*' to
> 'qpid::RefCountedBuffer*' increases required alignment of target type
> [-Werror=cast-align]
> cc1plus: all warnings being treated as errors
>
> make[4]: *** [qpid/RefCountedBuffer.lo] Error 1
> make[4]: Leaving directory
> `/build/buildd-qpid-cpp_0.12-1-armel-IVahfn/qpid-cpp-0.12/src'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/build/buildd-qpid-cpp_0.12-1-armel-IVahfn/qpid-cpp-0.12/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/build/buildd-qpid-cpp_0.12-1-armel-IVahfn/qpid-cpp-0.12/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/build/buildd-qpid-cpp_0.12-1-armel-IVahfn/qpid-cpp-0.12'
>
>
> Complete log is here:
>
>
> https://buildd.debian.org/status/fetch.php?pkg=qpid-cpp&arch=armel&ver=0.12-1&stamp=1318195580
>
>
> In the second case, the build itself is running fine, but valgrind
> reports (maybe false) problems during the tests:
>
>
> https://buildd.debian.org/status/fetch.php?pkg=qpid-cpp&arch=powerpc&ver=0.12-1&stamp=1318087164
>
>
> I'm no arm/valgrind guru: are these easily fixeable, or should I just
> disable those architectures in the build?
>
> Thanks,
> Cajus
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:[email protected]
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]