Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 820282 - qpid-cpp Fails To Build From Source on Fedora 17 (and Rawhide) for ARM architectures
Summary: qpid-cpp Fails To Build From Source on Fedora 17 (and Rawhide) for ARM archit...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qpid-cpp
Version: 18
Hardware: arm
OS: Linux
high
high
Target Milestone: ---
Assignee: Darryl L. Pierce
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 836736 (view as bug list)
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2012-05-09 14:08 UTC by Niels de Vos
Modified: 2015-06-22 00:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-28 11:41:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log from the latest failed build on arm.koji.fedoraproject.org (217.04 KB, text/plain)
2012-05-09 14:08 UTC, Niels de Vos
no flags Details
build.log from the failed build without RDMA support on arm.koji.fedoraproject.org (324.48 KB, text/plain)
2012-05-09 14:11 UTC, Niels de Vos
no flags Details
build.log of qpid-cpp-0.16 when configured --without-rdma (6.70 MB, text/plain)
2012-06-28 06:56 UTC, Niels de Vos
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-3650 0 None None None Never

Description Niels de Vos 2012-05-09 14:08:00 UTC
Created attachment 583302 [details]
build.log from the latest failed build on arm.koji.fedoraproject.org

Description of problem:
Building qpid fails with the following error:
qpid/sys/rdma/RdmaClient.cpp:119:58: error: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Werror=cast-align]

This issue is already mentioned upstream, but not solved yet:
https://issues.apache.org/jira/browse/QPID-3650

Version-Release number of selected component (if applicable):
qpid-cpp-0.14-1.fc17.2

How reproducible:
100%

Steps to Reproduce:
1. fedpkg clone qpid-cpp
2. cd qpid-cpp
3. arm-koji build --scratch f17 $(fedpkg giturl)
  
Actual results:
Build fails.

Expected results:
Build succeeds.

Additional info:
The build error happens on RDMA/InfiniBand code, disabling building these parts on ARM might be a (temporary?) solution. I do not think ARM is currently a target for RMDA hardware.

The build http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=816758 contains the following patch in the spec file:

--- a/qpid-cpp.spec
+++ b/qpid-cpp.spec
@@ -68,7 +68,7 @@
 %global client_devel_docs %{MRG_core}
 %global server_devel      %{MRG_core}
 %global qmf_devel         %{MRG_core}
-%ifnarch s390 s390x
+%ifnarch s390 s390x %{arm}
 %global client_rdma       %{MRG_non_core}
 %global server_rdma       %{MRG_non_core}
 %else

Comment 1 Niels de Vos 2012-05-09 14:11:26 UTC
Created attachment 583308 [details]
build.log from the failed build without RDMA support on arm.koji.fedoraproject.org

Ai, even disabling RDMA is not sufficient. The attached log contains the output of the build. This is the error that caused the build to fail:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include -I. -I=. -Werror -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/libexec/qpid\" -DBOOST_FILESYSTEM_VERSION=2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -DNDEBUG -O3 -Wno-unused-result -c qpid/sys/posix/SocketAddress.cpp  -fPIC -DPIC -o qpid/sys/posix/.libs/SocketAddress.o
qpid/sys/posix/SocketAddress.cpp: In static member function 'static uint16_t qpid::sys::SocketAddress::getPort(const sockaddr*)':
qpid/sys/posix/SocketAddress.cpp:87:30: error: cast from 'const sockaddr*' to 'const sockaddr_in*' increases required alignment of target type [-Werror=cast-align]
qpid/sys/posix/SocketAddress.cpp:88:31: error: cast from 'const sockaddr*' to 'const sockaddr_in6*' increases required alignment of target type [-Werror=cast-align]
qpid/sys/posix/SocketAddress.cpp: In member function 'void qpid::sys::SocketAddress::setAddrInfoPort(uint16_t)':
qpid/sys/posix/SocketAddress.cpp:115:39: error: cast from 'sockaddr*' to 'sockaddr_in*' increases required alignment of target type [-Werror=cast-align]
qpid/sys/posix/SocketAddress.cpp:116:40: error: cast from 'sockaddr*' to 'sockaddr_in6*' increases required alignment of target type [-Werror=cast-align]
cc1plus: all warnings being treated as errors

Comment 2 Niels de Vos 2012-06-28 06:56:21 UTC
Created attachment 594951 [details]
build.log of qpid-cpp-0.16 when configured --without-rdma

After disabling RDMA, the next issue is a problem in store-0.16:

DEBUG: libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -I/builddir/build/BUILD/qpid-0.16/cpp/include -I/builddir/build/BUILD/qpid-0.16/cpp/src -I./gen -DRHM_CLEAN -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -DNDEBUG -c StorePlugin.cpp  -fPIC -DPIC -o .libs/StorePlugin.o
DEBUG: In file included from ./jrnl/rcvdat.hpp:38:0,
DEBUG:                  from ./jrnl/fcntl.hpp:47,
DEBUG:                  from jrnl/jcntl.hpp:47,
DEBUG:                  from JournalImpl.h:29,
DEBUG:                  from MessageStoreImpl.h:33,
DEBUG:                  from StorePlugin.cpp:29:
DEBUG: ./jrnl/jcfg.hpp:49:2: error: #error endian?
DEBUG: make[3]: *** [StorePlugin.lo] Error 1
DEBUG: make[3]: Leaving directory `/builddir/build/BUILD/store-0.16.4509/lib'

It seems that there is no defined(__arm__) check to set the right number of bits and endianness.

Comment 3 Darryl L. Pierce 2012-10-12 19:42:27 UTC
*** Bug 836736 has been marked as a duplicate of this bug. ***

Comment 4 Peter Robinson 2012-10-17 12:11:19 UTC
Still a problem in F-18 and rawhide with version qpid-cpp-0.18-5.fc18

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1204375

Comment 5 Peter Robinson 2012-11-02 10:02:54 UTC
The actual error is:

qpid/sys/rdma/RdmaClient.cpp: In function 'void qpid::tests::write(Rdma::AsynchIO&)':
qpid/sys/rdma/RdmaClient.cpp:100:62: error: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Werror=cast-align]
qpid/sys/rdma/RdmaClient.cpp: In function 'void qpid::tests::data(qpid::sys::Poller::shared_ptr, Rdma::AsynchIO&, Rdma::Buffer*)':
qpid/sys/rdma/RdmaClient.cpp:119:58: error: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Werror=cast-align]

Though there seem to be errors regarding ARM GCC that should be addressed as well by that package.

Darryl: any movement of fixing the alignment errors?

Comment 6 Darryl L. Pierce 2012-11-02 13:36:18 UTC
(In reply to comment #5)
> Darryl: any movement of fixing the alignment errors?

I will start on this now.

Comment 7 Peter Robinson 2012-11-02 13:44:00 UTC
Thanks!

Comment 8 Peter Robinson 2012-11-25 18:41:31 UTC
any update?

Comment 9 Darryl L. Pierce 2012-11-26 16:18:28 UTC
(In reply to comment #8)
> any update?

Sorry, no. With the holiday and other tasks I was pulled off of this. Have you looked into fixes for this? My ARM-fu is weak.

Comment 10 Peter Robinson 2013-01-08 22:16:10 UTC
Any status update?

Comment 11 Darryl L. Pierce 2013-01-11 21:25:33 UTC
(In reply to comment #10)
> Any status update?

I won't repeat the holiday line again (was off for two weeks). I'm planning to have something with the 0.20 release. I have access to some ARM hardware now so should hopefully have something shortly.

Comment 12 Darryl L. Pierce 2013-01-14 15:44:38 UTC
I just attempted a build using cmake on one of our ARM systems against tip (0.20 + recent commits) without a problem. I also performed a build using the autotool chain with the same result.

What can I do to help recreate the problem?

Comment 13 Niels de Vos 2013-01-15 14:51:39 UTC
Hi Darryl,

it is easy to reproduce with the latest version in rawhide (qpid-cpp-0.18), no
need to run these commands on an ARM box:

$ fedkg clone -a qpid-cpp ; cd qpid-cpp
$ arm-koji build --scratch f18 $(fedpkg giturl | grep ^git)
Created task: 1371619
Task info: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1371619
-> http://arm.koji.fedoraproject.org/koji/getfile?taskID=1371628&name=build.log

Or, if you have an arm system with mock available:
$ fedkg clone -a qpid-cpp ; cd qpid-cpp
$ fedpkg mockbuild --root fedora-18-arm

Or, on an ARM development system:
$ fedkg clone -a qpid-cpp ; cd qpid-cpp
$ fedpkg local

Now, you write that qpid-cpp-0.20 contains fixes for this build issues. That
gives at least two possible ways to go forward:
a) update to qpid-cpp-0.20
b) cherry-pick the patches that fix the issue and include them in the RPM

Note that qpid-cpp is not available on any Fedora ARM platform at the moment.
This prevents other packages that depend on qpid-cpp from being built as well.
Therefore it would be much appreciated to solve this Bug in Fedora 18 and in
Rawhide.

I've briefly looked at updating qpid-cpp to 0.20 for test-building. But the
.spec refers to some subversion revisions, and I am not able to judge which
revision would be suitable.

Comment 14 Darryl L. Pierce 2013-01-15 15:51:17 UTC
We're about to release 0.20 soon. You can grab the latest release of it from:

http://www.apache.org/dyn/closer.cgi/qpid/0.20/qpid-0.20.tar.gz

I'm trying to do a build of the 0.20 code using arm-koji and it failed with the same error. Strange since building tip on a machine worked without error.

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1371655

I'll do some patching on top of 0.20 to fix this.

Comment 15 Peter Robinson 2013-01-15 23:19:49 UTC
(In reply to comment #14)
> We're about to release 0.20 soon. You can grab the latest release of it from:

We build the NVRs that are tagged in mainline so once it lands in mainline our build sync scripts will pick it up.

> I'm trying to do a build of the 0.20 code using arm-koji and it failed with
> the same error. Strange since building tip on a machine worked without error.
> 
> http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1371655
> 
> I'll do some patching on top of 0.20 to fix this.

If you're seeing the error on 0.20 in koji as well once you have a fix can we have it on F-18 too please.h

Comment 16 Fedora Update System 2013-01-24 14:14:29 UTC
qpid-cpp-0.20-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/qpid-cpp-0.20-1.fc17

Comment 17 Fedora Update System 2013-01-24 15:09:12 UTC
qpid-cpp-0.20-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qpid-cpp-0.20-1.fc18

Comment 18 Fedora Update System 2013-01-25 21:32:22 UTC
Package qpid-cpp-0.20-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qpid-cpp-0.20-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1488/qpid-cpp-0.20-1.fc17
then log in and leave karma (feedback).

Comment 19 Niels de Vos 2013-01-26 13:10:18 UTC
Scratch build succeeded:
- https://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1388154

Now we'll have to wait for koji-shadow to catch up and qpid-cpp will be available
for ARM. Quite some packages can be build as well then.

Thanks for looking into this!

Comment 20 Peter Robinson 2013-01-26 13:22:49 UTC
That build is failing on mainline F-19/rawhide

http://koji.fedoraproject.org/koji/buildinfo?buildID=380421

Comment 21 Darryl L. Pierce 2013-01-28 11:23:38 UTC
(In reply to comment #20)
> That build is failing on mainline F-19/rawhide
> 
> http://koji.fedoraproject.org/koji/buildinfo?buildID=380421

We have the same problem with x86 platforms as well. Something seems to have changed with (I assume) GCC 4.8.0 since Qpid builds on all but F19, unrelated to the ARM fix.

Comment 22 Peter Robinson 2013-01-28 11:27:53 UTC
> We have the same problem with x86 platforms as well. Something seems to have
> changed with (I assume) GCC 4.8.0 since Qpid builds on all but F19,
> unrelated to the ARM fix.

Or glibc or a number of other changes have gone into rawhide of late. It still needs to be investigated and fixed.

Comment 23 Darryl L. Pierce 2013-01-28 11:41:09 UTC
(In reply to comment #22)
> > We have the same problem with x86 platforms as well. Something seems to have
> > changed with (I assume) GCC 4.8.0 since Qpid builds on all but F19,
> > unrelated to the ARM fix.
> 
> Or glibc or a number of other changes have gone into rawhide of late. It
> still needs to be investigated and fixed.

Agreed.

Since the ARM issue is fixed, I'm going to close this BZ.

Comment 24 Fedora Update System 2013-01-28 15:48:06 UTC
qpid-cpp-0.20-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qpid-cpp-0.20-2.fc18

Comment 25 Fedora Update System 2013-01-28 16:43:42 UTC
qpid-cpp-0.20-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/qpid-cpp-0.20-2.fc17

Comment 26 Fedora Update System 2013-02-08 02:02:16 UTC
qpid-cpp-0.20-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2013-02-08 02:33:32 UTC
qpid-cpp-0.20-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.