raven-os/feathers-deprecated

Compile error

Zeng-Zer opened this issue · 2 comments

I just updated claws/magma/feathers and for some reasons, feathers doesn't compile anymore.

Scanning dependencies of target feathers
[ 50%] Building CXX object CMakeFiles/feathers.dir/source/main.cpp.o
In file included from /home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:7,
                 from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/magma/include/magma/Surface.hpp:49:13: warning: no previous declaration for ‘magma::Surface<> magma::makeSurface(const magma::Instance&, vk::SurfaceKHR)’ [-Wmissing-declarations]
   Surface<> makeSurface(magma::Instance const &instance, vk::SurfaceKHR vkSurface)
             ^~~~~~~~~~~
In file included from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:18:5: error: invalid use of template-name ‘magma::Surface’ without an argument list
     magma::Surface surface;
     ^~~~~
In file included from /home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:7,
                 from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/magma/include/magma/Surface.hpp:47:56: note: ‘template<class Deleter> using Surface = claws::handle<magma::impl::Surface, Deleter>’ declared here
   using Surface = claws::handle<impl::Surface, Deleter>;
                                                        ^
In file included from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:25:5: error: invalid use of template-name ‘magma::Surface’ without an argument list
     magma::Surface const &getSurface()
     ^~~~~
In file included from /home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:7,
                 from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/magma/include/magma/Surface.hpp:47:56: note: ‘template<class Deleter> using Surface = claws::handle<magma::impl::Surface, Deleter>’ declared here
   using Surface = claws::handle<impl::Surface, Deleter>;
                                                        ^
In file included from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:1:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp: In lambda function:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:42:96: warning: unused parameter ‘version’ [-Wunused-parameter]
        (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version){
                                                                                       ~~~~~~~~~^~~~~~~
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp: In lambda function:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:50:18: warning: unused parameter ‘data’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
            ~~~~~~^~~~
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:50:44: warning: unused parameter ‘registry’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:50:63: warning: unused parameter ‘id’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
                                                      ~~~~~~~~~^~
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp: In constructor ‘display::WaylandSurface::WaylandSurface(const magma::Instance&)’:
/home/zeng_d/rendu/Raven/feathers/include/display/WaylandSurface.hpp:65:9: error: class ‘display::WaylandSurface’ does not have any field named ‘surface’
       , surface(instance, [&](){
         ^~~~~~~
In file included from /home/zeng_d/rendu/Raven/feathers/source/main.cpp:2:
/home/zeng_d/rendu/Raven/feathers/include/display/Display.ipp: In instantiation of ‘display::Display<SurfaceProvider>::Display() [with SurfaceProvider = display::WaylandSurface]’:
/home/zeng_d/rendu/Raven/feathers/source/main.cpp:7:45:   required from here
/home/zeng_d/rendu/Raven/feathers/include/display/Display.ipp:53:28: error: ‘class display::WaylandSurface’ has no member named ‘getSurface’; did you mean ‘wlSurface’?
            surfaceProvider.getSurface().isQueueFamilySuitable(physicalDevice, bestQueueIndex))
            ~~~~~~~~~~~~~~~~^~~~~~~~~~
            wlSurface
/home/zeng_d/rendu/Raven/feathers/include/display/Display.ipp:68:52: error: ‘class display::WaylandSurface’ has no member named ‘getSurface’; did you mean ‘wlSurface’?
     swapchain = magma::Swapchain<>(surfaceProvider.getSurface(), device, physicalDevice, swapchain);
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~
                                    wlSurface
make[2]: *** [CMakeFiles/feathers.dir/build.make:63: CMakeFiles/feathers.dir/source/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/feathers.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Also, i had to add a FindWayland.cmake file otherwise it won't even pass the cmake. (got the file from here https://github.com/rpavlik/cmake-modules/blob/master/FindWayland.cmake)

The FindWayland is something I had forgotten to add.
You probably have a more recent of claws / magma than feathers. I'll open a PR

Seems that i have almost the same issues even if somes errors are note exactly the same

[ 10%] Building CXX object CMakeFiles/feathers.dir/source/main.cpp.o
In file included from /home/riamon_v/Raven/feathers/source/main.cpp:5:0:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:18:5: error: invalid use of template-name ‘magma::Surface’ without an argument list
     magma::Surface surface;
     ^~~~~
In file included from /home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:7:0,
                 from /home/riamon_v/Raven/feathers/source/main.cpp:5:
/home/riamon_v/Raven/feathers/lib/magma/include/magma/Surface.hpp:47:56: note: ‘template<class Deleter> using Surface = claws::handle<magma::impl::Surface, Deleter>’ declared here
   using Surface = claws::handle<impl::Surface, Deleter>;
                                                        ^
In file included from /home/riamon_v/Raven/feathers/source/main.cpp:5:0:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:25:5: error: invalid use of template-name ‘magma::Surface’ without an argument list
     magma::Surface const &getSurface()
     ^~~~~
In file included from /home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:7:0,
                 from /home/riamon_v/Raven/feathers/source/main.cpp:5:
/home/riamon_v/Raven/feathers/lib/magma/include/magma/Surface.hpp:47:56: note: ‘template<class Deleter> using Surface = claws::handle<magma::impl::Surface, Deleter>’ declared here
   using Surface = claws::handle<impl::Surface, Deleter>;
                                                        ^
In file included from /home/riamon_v/Raven/feathers/source/main.cpp:5:0:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp: In lambda function:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:42:96: warning: unused parameter ‘version’ [-Wunused-parameter]
        (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version){
                                                                                                ^~~~~~~
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp: In lambda function:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:50:18: warning: unused parameter ‘data’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
                  ^~~~
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:50:44: warning: unused parameter ‘registry’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
                                            ^~~~~~~~
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:50:63: warning: unused parameter ‘id’ [-Wunused-parameter]
      }, [](void *data, struct wl_registry *registry, uint32_t id)
                                                               ^~
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp: In constructor ‘display::WaylandSurface::WaylandSurface(const magma::Instance&)’:
/home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:65:9: error: class ‘display::WaylandSurface’ does not have any field named ‘surface’
       , surface(instance, [&](){
         ^~~~~~~
/home/riamon_v/Raven/feathers/source/main.cpp: In function ‘int main(int, char**)’:
/home/riamon_v/Raven/feathers/source/main.cpp:8:15: warning: unused parameter ‘ac’ [-Wunused-parameter]
 int main (int ac, char **argv) {
               ^~
In file included from /home/riamon_v/Raven/feathers/source/main.cpp:6:0:
/home/riamon_v/Raven/feathers/include/display/Display.ipp: In instantiation of ‘display::Display<SurfaceProvider>::Display()::<lambda(vk::PhysicalDevice)> [with SurfaceProvider = display::WaylandSurface]’:
/home/riamon_v/Raven/feathers/include/display/Display.ipp:14:59:   required from ‘struct display::Display<SurfaceProvider>::Display() [with SurfaceProvider = display::WaylandSurface]::<lambda(class vk::PhysicalDevice)>’
/home/riamon_v/Raven/feathers/include/display/Display.ipp:14:10:   required from ‘display::Display<SurfaceProvider>::Display() [with SurfaceProvider = display::WaylandSurface]’
/home/riamon_v/Raven/feathers/source/main.cpp:11:45:   required from here
/home/riamon_v/Raven/feathers/include/display/Display.ipp:53:28: error: ‘class display::WaylandSurface’ has no member named ‘getSurface’; did you mean ‘wlSurface’?
            surfaceProvider.getSurface().isQueueFamilySuitable(physicalDevice, bestQueueIndex))
            ~~~~~~~~~~~~~~~~^~~~~~~~~~
            wlSurface
/home/riamon_v/Raven/feathers/include/display/Display.ipp: In instantiation of ‘display::Display<SurfaceProvider>::Display() [with SurfaceProvider = display::WaylandSurface]’:
/home/riamon_v/Raven/feathers/source/main.cpp:11:45:   required from here
/home/riamon_v/Raven/feathers/include/display/Display.ipp:14:10: error: use of ‘auto magma::Instance::selectDevice(SCORE_MAPPER) const [with SCORE_MAPPER = display::Display<SurfaceProvider>::Display() [with SurfaceProvider = display::WaylandSurface]::<lambda(vk::PhysicalDevice)>]’ before deduction of ‘auto’
     auto [physicalDevice, score] = instance.selectDevice([this](vk::PhysicalDevice physicalDevice)
          ^~~~~~~~~~~~~~~~~~~~~~~
/home/riamon_v/Raven/feathers/include/display/Display.ipp:64:31: error: no matching function for call to ‘vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo(<brace-enclosed initializer list>)’
     vk::DeviceQueueCreateInfo deviceQueueCreateInfo{{}, score.bestQueue, 1, priority};
                               ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/riamon_v/Raven/feathers/lib/magma/include/magma/VulkanHandler.hpp:3:0,
                 from /home/riamon_v/Raven/feathers/include/display/WaylandSurface.hpp:6,
                 from /home/riamon_v/Raven/feathers/source/main.cpp:5:
/usr/include/vulkan/vulkan.hpp:17340:5: note: candidate: vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo(const VkDeviceQueueCreateInfo&)
     DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs )
     ^~~~~~~~~~~~~~~~~~~~~
/usr/include/vulkan/vulkan.hpp:17340:5: note:   candidate expects 1 argument, 4 provided
/usr/include/vulkan/vulkan.hpp:17332:5: note: candidate: vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo(vk::DeviceQueueCreateFlags, uint32_t, uint32_t, const float*)
     DeviceQueueCreateInfo( DeviceQueueCreateFlags flags_ = DeviceQueueCreateFlags(), uint32_t queueFamilyIndex_ = 0, uint32_t queueCount_ = 0, const float* pQueuePriorities_ = nullptr )
     ^~~~~~~~~~~~~~~~~~~~~
/usr/include/vulkan/vulkan.hpp:17332:5: note:   conversion of argument 2 would be ill-formed:
/usr/include/vulkan/vulkan.hpp:17330:10: note: candidate: vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo(const vk::DeviceQueueCreateInfo&)
   struct DeviceQueueCreateInfo
          ^~~~~~~~~~~~~~~~~~~~~
/usr/include/vulkan/vulkan.hpp:17330:10: note:   candidate expects 1 argument, 4 provided
/usr/include/vulkan/vulkan.hpp:17330:10: note: candidate: vk::DeviceQueueCreateInfo::DeviceQueueCreateInfo(vk::DeviceQueueCreateInfo&&)
/usr/include/vulkan/vulkan.hpp:17330:10: note:   candidate expects 1 argument, 4 provided
In file included from /home/riamon_v/Raven/feathers/source/main.cpp:6:0:
/home/riamon_v/Raven/feathers/include/display/Display.ipp:68:52: error: ‘class display::WaylandSurface’ has no member named ‘getSurface’; did you mean ‘wlSurface’?
     swapchain = magma::Swapchain<>(surfaceProvider.getSurface(), device, physicalDevice, swapchain);
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~
                                    wlSurface
gmake[2]: *** [CMakeFiles/feathers.dir/build.make:63: CMakeFiles/feathers.dir/source/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/feathers.dir/all] Error 2
gmake: *** [Makefile:84: all] Error 2