Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is failed on alpine linux, probably musl compatibility. #31

Closed
ahmadraniri1994 opened this issue Feb 20, 2024 · 3 comments · Fixed by #69
Closed

Build is failed on alpine linux, probably musl compatibility. #31

ahmadraniri1994 opened this issue Feb 20, 2024 · 3 comments · Fixed by #69

Comments

@ahmadraniri1994
Copy link

Hello, I'm trying to build on alpine linux. cmake .. didn't produce miracle-wm binary. I tried using these commands instead :

$ cmake -B build
$ cmake --build build

Then I got these error messages :

  8%] Building CXX object CMakeFiles/miracle-wm.dir/src/window_tree.cpp.o
/home/lidg/cmp/miracle-wm/src/window_tree.cpp: In member function 'void miracle::WindowTree::_handle_resize_request(const std::shared_ptr<miracle::Node>&, miracle::Direction, int)':
/home/lidg/cmp/miracle-wm/src/window_tree.cpp:548:38: error: 'floorf32' was not declared in this scope; did you mean 'floorf'?
  548 |         int height_for_others = (int)floorf32(-(float)resize_amount / static_cast<float>(nodes.size() - 1));
      |                                      ^~~~~~~~
      |                                      floorf
gmake[2]: *** [CMakeFiles/miracle-wm.dir/build.make:104: CMakeFiles/miracle-wm.dir/src/window_tree.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/miracle-wm.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Any clue to fix it ?

Also I need to comment main.cpp at line 60, if I don't I will get this error :

  8%] Building CXX object CMakeFiles/miracle-wm.dir/src/main.cpp.o
/home/lidg/cmp/miracle-wm/src/main.cpp: In function 'int main(int, const char**)':
/home/lidg/cmp/miracle-wm/src/main.cpp:60:26: error: 'class miral::X11Support' has no member named 'default_to_enabled'
   60 |             X11Support{}.default_to_enabled(),
      |                          ^~~~~~~~~~~~~~~~~~
/home/lidg/cmp/miracle-wm/src/main.cpp:48:27: error: cannot convert '<brace-enclosed initializer list>' to 'std::initializer_list<std::function<void(mir::Server&)> >'
   48 |     return runner.run_with(
      |            ~~~~~~~~~~~~~~~^
   49 |         {
      |         ~                  
   50 |             window_managers,
      |             ~~~~~~~~~~~~~~~~
   51 |             WaylandExtensions{}
      |             ~~~~~~~~~~~~~~~~~~~
   52 |                 .enable(miral::WaylandExtensions::zwlr_layer_shell_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   53 |                 .enable(miral::WaylandExtensions::zwlr_foreign_toplevel_manager_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   54 |                 .enable(miral::WaylandExtensions::zxdg_output_manager_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                 .enable(miral::WaylandExtensions::zwp_virtual_keyboard_manager_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                 .enable(miral::WaylandExtensions::zwlr_virtual_pointer_manager_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   57 |                 .enable(miral::WaylandExtensions::zwp_input_method_manager_v2)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   58 |                 .enable(miral::WaylandExtensions::zwlr_screencopy_manager_v1)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   59 |                 .enable(miral::WaylandExtensions::ext_session_lock_manager_v1),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 |             X11Support{}.default_to_enabled(),
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 |             config_keymap,
      |             ~~~~~~~~~~~~~~ 
   62 |             external_client_launcher,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~
   63 |             internal_client_launcher,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~
   64 |             display_configuration_options,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   65 |             AddInitCallback(run_startup_apps)
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   66 |         });
      |         ~~                 
In file included from /home/lidg/cmp/miracle-wm/src/auto_restarting_launcher.h:6,
                 from /home/lidg/cmp/miracle-wm/src/main.cpp:5:
/usr/include/miral/miral/runner.h:78:78: note:   initializing argument 1 of 'int miral::MirRunner::run_with(std::initializer_list<std::function<void(mir::Server&)> >)'
   78 | initializer_list<std::function<void(::mir::Server&)>> options) -> int;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

gmake[2]: *** [CMakeFiles/miracle-wm.dir/build.make:76: CMakeFiles/miracle-wm.dir/src/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/miracle-wm.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
@ahmadraniri1994 ahmadraniri1994 changed the title Build is failed on alpine linux. Build is failed on alpine linux, probably musl compatibility. Feb 22, 2024
@ahmadraniri1994
Copy link
Author

Perhaps it has something to do about musl compatibility.

@mattkae
Copy link
Owner

mattkae commented Feb 22, 2024

It looks to me like mir is on a previous version here, as X11Support{}.default_to_enabled() should be in latest (maybe as of 2.16 or earlier).

The floorf issue is most likely an actual break though

@mattkae
Copy link
Owner

mattkae commented Apr 27, 2024

Closing this as it should be fixed, but let me know!

@mattkae mattkae closed this as completed Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants