Hide Forgot
Since cmake-3.10.2/gcc8 was introduced, digikam FTBFS due to a crash running: cmake -E cmake_autogen ... build.log snippet: [ 1%] Automatic MOC for target mediaserver_src cd /builddir/build/BUILD/digikam-5.8.0/x86_64-redhat-linux-gnu/core/utilities/mediaserver && /usr/bin/cmake -E cmake_autogen /builddir/build/BUILD/digikam-5.8.0/x86_64-redhat-linux-gnu/core/utilities/mediaserver/CMakeFiles/mediaserver_src_autogen.dir release AutoMoc: Checking: /builddir/build/BUILD/digikam-5.8.0/core/utilities/mediaserver/dlnaserver.cpp AutoMoc: Checking: /builddir/build/BUILD/digikam-5.8.0/core/utilities/mediaserver/dlnaserverdelegate.cpp AutoMoc: Checking: /builddir/build/BUILD/digikam-5.8.0/core/utilities/mediaserver/dmediaserver.cpp AutoMoc: Checking: /builddir/build/BUILD/digikam-5.8.0/core/utilities/mediaserver/dmediaserverdlg.cpp AutoMoc: Checking: /builddir/build/BUILD/digikam-5.8.0/core/utilities/mediaserver/dmediaservermngr.cpp make[2]: Leaving directory '/builddir/build/BUILD/digikam-5.8.0/x86_64-redhat-linux-gnu' make[2]: *** [core/utilities/mediaserver/CMakeFiles/mediaserver_src_autogen.dir/build.make:61: core/utilities/mediaserver/CMakeFiles/mediaserver_src_autogen] Aborted (core dumped) Full log, https://koji.fedoraproject.org/koji/buildinfo?buildID=1052751 Tested building with various cmake versions: cmake-3.10.2-2.fc28 fails cmake-3.10.2-1.fc28 fails cmake-3.10.1-11.fc28 succeeds (last version built with gcc7)
It'd be good to do the build in a mock chroot, get the actual core dump out, and gdb it. I'll try and do that later today.
Created attachment 1404572 [details] backtrace Here's a backtrace I got by running the crashing cmake command through gdb.
(In reply to Adam Williamson from comment #2) > Created attachment 1404572 [details] > backtrace > > Here's a backtrace I got by running the crashing cmake command through gdb. Frames 2 and 3 looks like an assertion failure inside std::string::front: /** * Returns a read/write reference to the data at the first * element of the %string. */ reference front() { __glibcxx_assert(!empty()); return operator[](0); } Looks like frame 4 (ReadFile in cmake-3.10.2-2.fc29.x86_64/Source/cmQtAutoGenerators.cxx) is trying to get at the first char of a string, but the string is empty, hence the assertion failure.
Hi. I'm the current maintainer of AUTOMOC. Thanks for the backtrace. There's a CMake issue now: https://gitlab.kitware.com/cmake/cmake/issues/17793
jwakely: I believe this assert dates back to 2015-09-09 and is controlled by #if defined(_GLIBCXX_ASSERTIONS) Is _GLIBCXX_ASSERTIONS normally defined, or is that something that we only turn on during bring-up of a new version of gcc? Thanks.
Florian enabled it in rawhide recently, as it's like the libstdc++ equivalent of _FORTIFY_SOURCE.
(and it's useful, because it finds undefined behaviour like this package bug).
Thanks
(In reply to Sebastian Holtermann from comment #4) > Hi. I'm the current maintainer of AUTOMOC. > > Thanks for the backtrace. > > There's a CMake issue now: > https://gitlab.kitware.com/cmake/cmake/issues/17793 You could also avoid calling front() entirely: content.reserve(length); content.assign(std::istreambuf_iterator<char>{ifs}, {});
I've gone with Jonathan's change (I think): diff -up cmake-3.10.2/Source/cmQtAutoGenerators.cxx.automoc cmake-3.10.2/Source/cmQtAutoGenerators.cxx --- cmake-3.10.2/Source/cmQtAutoGenerators.cxx.automoc 2018-01-18 07:48:42.000000000 -0700 +++ cmake-3.10.2/Source/cmQtAutoGenerators.cxx 2018-03-08 21:09:50.451726324 -0700 @@ -80,8 +80,8 @@ static bool ReadFile(std::string& conten std::size_t const length = cmSystemTools::FileLength(filename); cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary)); if (ifs) { - content.resize(length); - ifs.read(&content.front(), content.size()); + content.reserve(length); + content.assign(std::istreambuf_iterator<char>{ifs}, {}); if (ifs) { success = true; } else { for 3.10.2 for now as upstream's fix is for 3.11 and the relevant code appears to have been refactored significantly. It's building now in rawhide. Let me know if it fixes the digikam build and I'll make an update for f28.
After I actually pushed and built Orion's change, fix confirmed: digikam built successfully for F29. Please send to F28.
cmake-3.10.2-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2d5a4c2dab
cmake-3.10.2-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2d5a4c2dab
cmake-3.11.0-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e899ee34bf
cmake-3.11.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-926e88d126
cmake-3.11.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d9a3a285b1
cmake-3.11.0-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e899ee34bf
cmake-3.11.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-926e88d126
cmake-3.11.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d9a3a285b1
cmake-3.10.2-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
cmake-3.11.0-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
cmake-3.11.0-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
cmake-3.11.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.