Bug 820282 - qpid-cpp Fails To Build From Source on Fedora 17 (and Rawhide) for ARM architectures
qpid-cpp Fails To Build From Source on Fedora 17 (and Rawhide) for ARM archit...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: qpid-cpp (Show other bugs)
18
arm Linux
high Severity high
: ---
: ---
Assigned To: Darryl L. Pierce
Fedora Extras Quality Assurance
:
: 836736 (view as bug list)
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2012-05-09 10:08 EDT by Niels de Vos
Modified: 2015-06-21 20:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-28 06:41:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
build.log from the latest failed build on arm.koji.fedoraproject.org (217.04 KB, text/plain)
2012-05-09 10:08 EDT, 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 10:11 EDT, 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 02:56 EDT, Niels de Vos
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-3650 None None None Never

  None (edit)
Description Niels de Vos 2012-05-09 10:08:00 EDT
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 10:11:26 EDT
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 02:56:21 EDT
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 15:42:27 EDT
*** Bug 836736 has been marked as a duplicate of this bug. ***
Comment 4 Peter Robinson 2012-10-17 08:11:19 EDT
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 06:02:54 EDT
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 09:36:18 EDT
(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 09:44:00 EDT
Thanks!
Comment 8 Peter Robinson 2012-11-25 13:41:31 EST
any update?
Comment 9 Darryl L. Pierce 2012-11-26 11:18:28 EST
(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 17:16:10 EST
Any status update?
Comment 11 Darryl L. Pierce 2013-01-11 16:25:33 EST
(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 10:44:38 EST
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 09:51:39 EST
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 10:51:17 EST
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 18:19:49 EST
(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 09:14:29 EST
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 10:09:12 EST
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 16:32:22 EST
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 08:10:18 EST
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 08:22:49 EST
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 06:23:38 EST
(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 06:27:53 EST
> 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 06:41:09 EST
(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 10:48:06 EST
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 11:43:42 EST
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-07 21:02:16 EST
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-07 21:33:32 EST
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.