Bug #43747
closedmaster FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS
0%
Description
For some time, master s390x build has been failing with:
[ 5288s] [ 89%] Linking CXX executable ../../../bin/rbd [ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_store_16' [ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_load_16' [ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_compare_exchange_16' [ 5293s] collect2: error: ld returned 1 exit status [ 5293s] make[2]: *** [src/tools/rbd/CMakeFiles/rbd.dir/build.make:783: bin/rbd] Error 1 [ 5293s] make[1]: *** [CMakeFiles/Makefile2:5781: src/tools/rbd/CMakeFiles/rbd.dir/all] Error 2
So far, we suspect that this is due to the use of boost::lockfree in the Ceph code base. Although the build failure occurs when linking bin/rbd, the problem is almost certainly not limited to RBD.
Files
Updated by Nathan Cutler over 4 years ago
- File s390x_build.log s390x_build.log added
Updated by Nathan Cutler over 4 years ago
As suggested by Kefu and Ulrich, I compiled the following program on a s390x machine running SLE-15-SP1 (gcc-7-3.3.22.s390x):
#include <atomic> #include <cstdint> int main() { std::atomic<uint8_t> w1; std::atomic<uint16_t> w2; std::atomic<uint32_t> w4; std::atomic<uint64_t> w8; #ifdef __s390x__ // Boost needs 16-byte atomics for tagged pointers. std::atomic<unsigned __int128> w16; #else #define w16 0 #endif return w1 + w2 + w4 + w8 + w16; }
I am attaching the resulting test.s to this ticket.
Updated by Nathan Cutler over 4 years ago
- File new_build.log new_build.log added
On top of master, I added the following patch to the spec file:
--- a/ceph.spec.in +++ b/ceph.spec.in @@ -1190,6 +1190,9 @@ ${CMAKE} .. \ -DBOOST_J=$CEPH_SMP_NCPUS \ -DWITH_GRAFANA=ON +cat ./CMakeFiles/CMakeOutput.log +cat ./CMakeFiles/CMakeError.log + make "$CEPH_MFLAGS_JOBS"
In other words, immediately after cmake finishes, it dumps the contents of the two cmake log files.
The resulting build log ("new_build.log") is uploaded to this ticket.
Updated by Nathan Cutler over 4 years ago
- Status changed from New to Fix Under Review
- Assignee set to Nathan Cutler
- Pull request ID set to 32800
Many thanks to Ulrich Weigand for finding the root cause of this bug!
Updated by Nathan Cutler over 4 years ago
- Subject changed from master FTBFS on s390x possibly due to use of boost::lockfree to master FTBFS on s390x in openSUSE Build Service due to hard -O2 setting in RPM_OPT_FLAGS
Updated by Nathan Cutler over 4 years ago
- Subject changed from master FTBFS on s390x in openSUSE Build Service due to hard -O2 setting in RPM_OPT_FLAGS to master FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS
Updated by Nathan Cutler over 4 years ago
- Assignee deleted (
Nathan Cutler) - Pull request ID changed from 32800 to 32802
Updated by Nathan Cutler over 4 years ago
- Status changed from Fix Under Review to Resolved
Updated by Kefu Chai about 4 years ago
- Status changed from Resolved to Pending Backport
- Backport set to nautilus
Updated by Kefu Chai about 4 years ago
- Copied to Backport #44413: nautilus: FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS added
Updated by Nathan Cutler about 4 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".