Paper-Cranes-Ltd / big2-stack

This is a middleware repository that eases up the work with BGFX, GLFW, IMGUI and GLM.
https://paper-cranes-ltd.github.io/big2-stack/
The Unlicense
41 stars 1 forks source link

Linux Ubuntu 22.04 build failure at 93% #4

Closed truedat101 closed 7 months ago

truedat101 commented 8 months ago

error: no match for call to ‘(big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>) (const big2::GlfwEvent&, big2::GlfwEvent&)’

Ubuntu22.04 gcc 11.4.0

Build failure against main, v0.0.9, v0.0.8

[ 93%] Building CXX object big2/CMakeFiles/BIG2.dir/src/event_queue.cpp.o
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/array:40,
                 from /home/dkords/dev/repos/big2-stack/build/_deps/microsoft-gsl-src/include/gsl/util:22,
                 from /home/dkords/dev/repos/big2-stack/build/_deps/microsoft-gsl-src/include/gsl/span:22,
                 from /home/dkords/dev/repos/big2-stack/build/_deps/microsoft-gsl-src/include/gsl/algorithm:21,
                 from /home/dkords/dev/repos/big2-stack/build/_deps/microsoft-gsl-src/include/gsl/gsl:20,
                 from /home/dkords/dev/repos/big2-stack/big2/include/big2/event_queue.h:9,
                 from /home/dkords/dev/repos/big2-stack/big2/src/event_queue.cpp:5:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of ‘constexpr bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = const big2::GlfwEvent; _Iterator = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _Compare = big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>]’:
/usr/include/c++/11/bits/stl_algo.h:2041:14:   required from ‘constexpr _ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _Tp = big2::GlfwEvent; _Compare = __gnu_cxx::__ops::_Val_comp_iter<big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)> >]’
/usr/include/c++/11/bits/stl_algo.h:2108:32:   required from ‘constexpr _FIter std::upper_bound(_FIter, _FIter, const _Tp&, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _Tp = big2::GlfwEvent; _Compare = big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>]’
/usr/include/c++/11/pstl/parallel_backend_tbb.h:1014:40:   required from ‘__pstl::__tbb_backend::__task* __pstl::__tbb_backend::__merge_func<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, _Cleanup, _LeafMerge>::split_merging(__pstl::__tbb_backend::__task*) [with _RandomAccessIterator1 = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _RandomAccessIterator2 = big2::GlfwEvent*; _Compare = big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>; _Cleanup = __pstl::__utils::__serial_destroy; _LeafMerge = __pstl::__utils::__serial_move_merge]’
/usr/include/c++/11/pstl/parallel_backend_tbb.h:923:20:   required from ‘__pstl::__tbb_backend::__task* __pstl::__tbb_backend::__merge_func<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, _Cleanup, _LeafMerge>::merge_ranges(__pstl::__tbb_backend::__task*) [with _RandomAccessIterator1 = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _RandomAccessIterator2 = big2::GlfwEvent*; _Compare = big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>; _Cleanup = __pstl::__utils::__serial_destroy; _LeafMerge = __pstl::__utils::__serial_move_merge]’
/usr/include/c++/11/pstl/parallel_backend_tbb.h:1053:16:   required from ‘__pstl::__tbb_backend::__task* __pstl::__tbb_backend::__merge_func<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, _Cleanup, _LeafMerge>::operator()(__pstl::__tbb_backend::__task*) [with _RandomAccessIterator1 = __gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >; _RandomAccessIterator2 = big2::GlfwEvent*; _Compare = big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>; _Cleanup = __pstl::__utils::__serial_destroy; _LeafMerge = __pstl::__utils::__serial_move_merge]’
/usr/include/c++/11/pstl/parallel_backend_tbb.h:620:33:   required from ‘__pstl::__tbb_backend::__task* __pstl::__tbb_backend::__func_task<_Func>::execute(tbb::detail::d1::execution_data&) [with _Func = __pstl::__tbb_backend::__merge_func<__gnu_cxx::__normal_iterator<big2::GlfwEvent*, std::vector<big2::GlfwEvent> >, big2::GlfwEvent*, big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>, __pstl::__utils::__serial_destroy, __pstl::__utils::__serial_move_merge>]’
/usr/include/c++/11/pstl/parallel_backend_tbb.h:616:5:   required from here
/usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to ‘(big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>) (const big2::GlfwEvent&, big2::GlfwEvent&)’
  240 |         { return bool(_M_comp(__val, *__it)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~
truedat101 commented 8 months ago

Curious, should I be building with clang? If so, what version?

object71 commented 8 months ago

I will check it out.

truedat101 commented 8 months ago

Not that it solves anything, but this appears to have broken cross platform functionality between v0.0.4 ->v0.0.5 tags. v0.0.4 compiles perfectly on Linux Ubuntu 22.04.

truedat101 commented 7 months ago

Did you test this on

Ubuntu22.04 gcc 11.4.0

not verified on my end, at least, there are other build issues, in addition to

/usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to ‘(big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>) (const big2::GlfwEvent&, big2::GlfwEvent&)’

...

/usr/include/c++/11/bits/predefined_ops.h:196:30: error: no match for call to ‘(big2::GlfwEventQueue::SortEventsByWindow()::<lambda(TRef, TRef)>) (big2::GlfwEvent&, const big2::GlfwEvent&)’

Do you have a CI server you can plug this into? I don't want to nag about the build. Assuming cross platform compatibility is a goal, it's somewhat harder to maintain between MSVC, gcc, and clang without enough people testing builds. Any way, I am somewhat sympathetic to the challenge since I've been using the bigg-ish combo of things on another project and it was a signficant lift to get it building well on 3 platforms. My finding was bleeding edge C++ made it harder to keep builds working (had to stick with C++17), and also clang and gcc were very picky vs MSVC, and just developing on Windows meant we still had a lot of verification of our framework to do on linux/mac to make sure it compiled. I was hoping someone else had figured out the "bigger" set of things in a better way than my team had done (which was conan/cmake). I am open to suggestions on how to best help.

object71 commented 7 months ago

I will setup a docker-cross on my end to test this fully. I didn't mean to close the issue only to refer to it sorry.

object71 commented 7 months ago

Should be fixed now. I tested it by compiling with dockcross linux x64

truedat101 commented 7 months ago

Great, will try this out tonight when I get back to the office linux system.

truedat101 commented 7 months ago

bueno - working and compiles.

truedat101 commented 7 months ago

Thanks!

truedat101 commented 7 months ago

A few samples won't run in my set up but I think this is a bgfx config thing. I will focus on the mac side now and figure out what is missing in the rendering since it is showing the blank screen.

object71 commented 7 months ago

Might be to link some library?

truedat101 commented 7 months ago

I need to add some debug on the bgfx side to make sure what renderer was selected . According to the sample, multi window support.

int main(int32_t, char**): 'The selected renderer doesn't support multiple windows through BGFX.' at '/big2-stack/examples/src/04_event_queue.cpp:37'