[3dprinter-general] Bug#972808: cura-engine FTBFS: error: ‘find_if’ is not a member of ‘std’

Helmut Grohne helmut at subdivi.de
Sat Oct 24 06:30:16 BST 2020


Source: cura-engine
Version: 1:4.7.1-1
Severity: serious
Tags: ftbfs

A native build of cura-engine on unstable amd64 ends with:

| [ 86%] Building CXX object CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o
| /usr/bin/c++ -DARCUS -DBUILD_TESTS -DBUILD_TESTS=1 -I/usr/include/polyclipping -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -Wall -static-libstdc++ -fopenmp -std=gnu++11 -o CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o -c /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp
| In file included from /usr/include/gtest/gtest.h:387,
|                  from /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:4:
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp: In member function ‘virtual void cura::GetNearbyTest_GetNearby_Test::TestBody()’:
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:48:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|    48 |         EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:54:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|    54 |         EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp: In member function ‘virtual void cura::GetNearbyTest_getNearbyLine2_Test::TestBody()’:
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:99:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|    99 |         EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:105:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|   105 |         EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp: In member function ‘virtual void cura::GetNearbyTest_getNearbyLine_Test::TestBody()’:
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:144:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|   144 |         EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| /<<PKGBUILDDIR>>/tests/utils/SparseGridTest.cpp:150:38: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
|   150 |         EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
|       |                                      ^~~~~~~
| make[3]: *** [CMakeFiles/SparseGridTest.dir/build.make:98: CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
| make[2]: *** [CMakeFiles/Makefile2:1295: CMakeFiles/SparseGridTest.dir/all] Error 2
| make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
| make[1]: *** [Makefile:185: all] Error 2
| make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
| dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j1 "INSTALL=install --strip-program=true" returned exit code 2
| make: *** [debian/rules:10: build] Error 25
| dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

This must be a very recent issue as neither crossqa (10 days ago) nor
reproducible builds (6 days ago) have run into this issue. It's reliably
reproducible anyhow. I'm unsure what might cause it. Neither gcc-10 nor
cura-engine were uploaded in that time. It would be a good idea to add
the missing #include <algorithm> any how.

Helmut



More information about the 3dprinter-general mailing list