Closed kloczek closed 1 year ago
egads! it looks like this has to do with doctest. i'll get on it asap.
hrmmm, not running into this on debian unstable. what environment and g++ version?
I'm using gcc from Fedora rawhide gcc-12.1.1-3.fc37.x86_64 I also wtote https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/NW75YZ3VIXGO2TOPC33AS47VDJDVQKIE/
thanks; i'll bring up my fedora VM later today and see what's what.
Any update? 🤔
same error on arch, gcc 12.2.0
building worked after commenting out these lines:
./src/tests/bitmap.cpp:17-21
CHECK(0 < nc_->tcache.cellpxy);
CHECK(0 < nc_->tcache.cellpxx);
if(!nc_->tcache.pixel_draw_late){
CHECK(nc_->tcache.pixel_draw);
}
./src/tests/tabbed.cpp:398
CHECK(tabbedcb == nctab_cb(t1));
i don't want to say that this is a bug ion doctest, but i'm not sure exactly what's up. i fixed one problem. i hope to have this resolved today. thanks for your patience!
so all the failure points involve function pointers, and we break in this part of doctest:
/usr/include/doctest/doctest.h:1046:28: required from ‘static doctest::String doctest::detail::StringMakerBase<true>::convert(const T&) [with T = void (*)(nctab*, ncplane*, void*)]’
/usr/include/doctest/doctest.h:1079:35: required from ‘doctest::String doctest::toString(const T&) [with T = void (*)(nctab*, ncplane*, void*); typename detail::types::enable_if<(! detail::types::is_enum<T>::value), bool>::type <anonymous> = true]’
/usr/include/doctest/doctest.h:1318:49: required from ‘doctest::String doctest::detail::stringifyBinaryExpr(const L&, const char*, const R&) [with L = void(nctab*, ncplane*, void*); R = void (*)(nctab*, ncplane*, void*)]’
so it's trying to turn the expression into a string to show when it fails, and it's running into some problem:
/usr/include/doctest/doctest.h:1485:9: required from ‘decltype (((void)((declval<L>() == declval<R>())), (doctest::detail::Result)(<brace-enclosed initializer list>()))) doctest::detail::Expression_lhs<L>::operator==(R&&) [with R = void (*)(nctab*, ncplane*, void*); L = void (&)(nctab*, ncplane*, void*); decltype (((void)((declval<L>() == declval<R>())), (doctest::detail::Result)(<brace-enclosed initializer list>()))) = doctest::detail::Result]’
@Saalvage, would you mind taking a quick look at this? it started breaking with doctest 2.4.9. it might very well be my misuse of the library, but maybe you'll know quickly.
if i manually cast things to const void*
, they compile, e.g.:
[schwarzgerat](0) $ git diff
diff --git src/tests/bitmap.cpp src/tests/bitmap.cpp
index 9f56ea788..d0f39d80e 100644
--- src/tests/bitmap.cpp
+++ src/tests/bitmap.cpp
@@ -17,7 +17,7 @@ TEST_CASE("Bitmaps") {
CHECK(0 < nc_->tcache.cellpxy);
CHECK(0 < nc_->tcache.cellpxx);
if(!nc_->tcache.pixel_draw_late){
- CHECK(nc_->tcache.pixel_draw);
+ CHECK((const void*)nc_->tcache.pixel_draw);
}
}
diff --git src/tests/tabbed.cpp src/tests/tabbed.cpp
index 272b09e2d..9adc7ae7d 100644
--- src/tests/tabbed.cpp
+++ src/tests/tabbed.cpp
@@ -395,7 +395,7 @@ TEST_CASE("Tabbed") {
CHECK(0 == strcmp(sep, nctabbed_separator(nt)));
auto t1 = nctabbed_add(nt, nullptr, nullptr, tabbedcb, "tab1", nullptr);
nctab_set_cb(t1, tabbedcb);
- CHECK(tabbedcb == nctab_cb(t1));
+ CHECK((const void*)(tabbedcb) == (const void*)nctab_cb(t1));
nctab_set_userptr(t1, (void*) sep);
CHECK((void*) sep == nctab_userptr(t1));
const char* tname = "tab name";
[schwarzgerat](0) $
i think this might be https://github.com/doctest/doctest/issues/686, and if so, we're just gonna need to wait for 2.4.10, and mark that as a dep, ugh.
Yep, seems like an instance of that issue. Sorry for the inconvenience, looking to get 2.4.10 out of the door next week!
Yep, seems like an instance of that issue. Sorry for the inconvenience, looking to get 2.4.10 out of the door next week!
these things happen. thanks for the confirmation. i'll go ahead and exclude 2.4.9 in the CMake config.
i'm going to go ahead and put in a workaround to get things compiling again.
alright, imma cut a 3.0.9 to get us past this bullshit
Looks like recent gcc changes in gcc used in fedora rawhide are causing fails