Package Details: mir 2.19.3-2

Git Clone URL: https://aur.archlinux.org/mir.git (read-only, click to copy)
Package Base: mir
Description: Canonical's display server
Upstream URL: https://github.com/canonical/mir
Licenses: GPL-2.0-or-later OR GPL-3.0-or-later
Submitter: onny
Maintainer: FabioLolix
Last Packager: FabioLolix
Votes: 8
Popularity: 0.000000
First Submitted: 2014-01-13 16:49 (UTC)
Last Updated: 2025-02-17 22:12 (UTC)

Latest Comments

1 2 3 4 Next › Last »

sudopluto commented on 2025-02-25 21:45 (UTC) (edited on 2025-02-25 21:51 (UTC) by sudopluto)

ok figured it out, cachyos ships with -O3 enabled in makepkg.conf, but MIR currently only supports -O2. but in my investigation, I found a number of ways to improve the pkgbuild:

  • use ninja as build system rather than makefiles
  • add bash and systemd-libs as explicit depends
  • renable LTO
  • force -O2 to be used for build
  • make compiler warnings not fatal to build
  • other MIR build variables, like the disabling of some tests that they don't support outside of Ubuntu

diff --git a/PKGBUILD b/PKGBUILD
index 2080861..d42e263 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,44 +13,59 @@ arch=(x86_64 i686)
 license=('GPL-2.0-or-later OR GPL-3.0-or-later')
 depends=(boost-libs libglvnd lttng-ust libepoxy libxml++2.6 libinput yaml-cpp
          libxkbcommon  freetype2  hicolor-icon-theme libxcursor
-
-        egl-wayland wayland
-
-        glib2 glibc gcc-libs util-linux-libs libxcb libxkbcommon-x11 libdrm mesa libx11 gtest glibmm
-
-        # capnproto google-glog gflags liburcu nettle libevdev protobuf  python-gobject
+         egl-wayland wayland
+         glib2 glibc gcc-libs util-linux-libs libxcb libxkbcommon-x11 libdrm mesa libx11 gtest glibmm
+         bash systemd-libs
+         #why needed?: capnproto google-glog gflags liburcu nettle libevdev protobuf  python-gobject
 )
 makedepends=(glm doxygen graphviz cmake boost umockdev wlcs glmark2
-
+             ninja
              python-pillow python-dbus
-             #gcovr lcov valgrind
+             #needed for coverage / debug builds: gcovr lcov valgrind
              python-dbusmock
              glib2-devel
 )
 optdepends=('qterminal: required for miral demos'
             'ttf-ubuntu-font-family: required for miral demos'
             'qt5-wayland: required for miral demos'
-            'xcursor-dmz: opt requirement for miral demos')
-options=(!lto)
+            'xcursor-dmz: opt requirement for miral demos'
+)
+# lto only broken on ppc64
+# or old binutils: https://github.com/canonical/mir/blob/main/debian/rules#L41
+# options=(!lto)
 source=("https://github.com/canonical/mir/releases/download/v${pkgver}/mir-${pkgver}.tar.xz")
 sha256sums=('2157c337d1bf0a8c33adcb11e0cc0705da23436ed4e012ddf376133fbb5b21e4')

-# glm not found but is listed here
+# glm no longer ships glm.pc for pkgconfig, but cmake find_package should work
+# see mir:CMakeLists.txt
+
+# packaging refs:
+# https://github.com/canonical/mir/blob/main/debian/rules

 build() {
-  #export CFLAGS+=" -Wno-error=array-bounds"
-  #export CXXFLAGS+=" -Wno-error=array-bounds"
+  # force cc flags to arch defaults: LTO and -O2
+  export CFLAGS+=" -ffat-lto-objects -O2"
+  export CXXFLAGS+=" -ffat-lto-objects -O2"

-  local _flags=(
+  local cmake_options=(
+    -S $pkgname-$pkgver
+    -B build
+    -GNinja
+    -Wno-dev
+    -DCMAKE_BUILD_TYPE=None
+    -DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_INSTALL_LIBDIR=lib
+    ###
+    # mir specific quirks below
+    ###
+    -DMIR_FATAL_COMPILE_WARNINGS=OFF
+    -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/$pkgname/
+    -DMIR_BUILD_INTERPROCESS_TESTS=OFF
+    -DMIR_RUN_WLCS_TESTS=OFF
     -DMIR_USE_PRECOMPILED_HEADERS=OFF
-    -Dglm_DIR:PATH=/usr/lib/cmake/glm
   )

-  cmake -B build -S "mir-${pkgver}" -Wno-dev \
-    -DCMAKE_BUILD_TYPE=None \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    "${_flags[@]}"
-
+  cmake "${cmake_options[@]}"
   cmake --build build
 }
 

sudopluto commented on 2025-02-24 21:23 (UTC)

aur package fails to build on my system, will investigate after work

    inlined from ‘testing::internal::ReturnAction<R>::Impl<U>::Impl(const R&) [with U = std::vector<MirPixelFormat>; R = std::vector<MirPixelFormat>]’ at /usr/include/gmock/gmock-actions.h:966:50,
    inlined from ‘testing::internal::ReturnAction<R>::operator testing::Action<U(Args ...)>() const [with U = std::vector<MirPixelFormat>; Args = {}; <template-parameter-2-3> = void; R = std::vector<MirPixelFormat>]’ at /usr/include/gmock/gmock-actions.h:951:12,
    inlined from ‘{anonymous}::TestTouchspotController::TestTouchspotController()’ at /home/pranav/.cache/yay/mir/src/mir-2.19.3/tests/unit-tests/input/test_touchspot_controller.cpp:97:27:
/usr/include/c++/14.2.1/bits/stl_algobase.h:452:30: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 4 is out of the bounds [0, 4] [-Werror=array-bounds=]
  452 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sudopluto commented on 2024-09-09 19:46 (UTC) (edited on 2024-09-09 19:46 (UTC) by sudopluto)

I am planning on packaging miracle-wm: https://github.com/miracle-wm-org/miracle-wm.

Since mir is a dependency, do you think you can update mir to https://github.com/canonical/mir/releases/tag/v2.17.0?

I can't think of a clean way to separate out the libs / devel bits, so I don't think it makes much sense for me to make a new aur package which pretty much does the same thing.

If you are no longer interested in maintaining the package, please let me know and I will pick it up. Thanks! :D

scop commented on 2024-02-22 23:27 (UTC)

Fails to build.

[ 63%] Building CXX object examples/mir_demo_server/CMakeFiles/mir_demo_server.dir/glog_logger.cpp.o
In file included from /home/dan/.cache/paru/clone/mir/src/mir-2.16.3/examples/mir_demo_server/glog_logger.cpp:19:
/usr/include/glog/logging.h:60:4: error: #error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
   60 | #  error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
      |    ^~~~~

deathmist commented on 2023-07-22 12:38 (UTC)

https://github.com/MirServer/mir/releases/tag/v2.14.1 exists but doesn't fix failing to build from source; to "fix" that I added -DMIR_FATAL_COMPILE_WARNINGS=OFF, reported it also upstream at https://github.com/MirServer/mir/issues/2987

FabioLolix commented on 2023-07-04 19:34 (UTC)

Hello,

  • qtubuntu optdepends no longer exist
  • Please rename sources with ${pkgname}-${pkgver}.tar.gz::
  • Fail to build for me:
    inlined from ‘bool mir::frontend::XWaylandClipboardSource::DataSender::add_data(std::vector<unsigned char>&&)’ at /home/fabio/Dev/pkg_make/TO_BUILD16/mir/src/mir-2.13.0/src/server/frontend_xwayland/xwayland_clipboard_source.cpp:137:24,
    inlined from ‘void mir::frontend::XWaylandClipboardSource::add_data_to_in_progress_send(const std::lock_guard<std::mutex>&, uint8_t*, size_t)’ at /home/fabio/Dev/pkg_make/TO_BUILD16/mir/src/mir-2.13.0/src/server/frontend_xwayland/xwayland_clipboard_source.cpp:452:39:
/usr/include/c++/13.1.1/bits/stl_algobase.h:437:30: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ writing between 2 and 9223372036854775807 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,

bittin commented on 2023-03-20 14:19 (UTC)

Now 2.13 released: https://www.phoronix.com/news/Ubuntu-Mir-2.13-Released

deathmist commented on 2023-01-19 16:36 (UTC)

Now 2.12 released https://github.com/MirServer/mir/releases/tag/v2.12.0

deathmist commented on 2023-01-06 22:45 (UTC)

Had to install xcursor-vanilla-dmz and "ln -s Vanilla-DMZ /usr/share/icons/DMZ-White" and also install xorg-xwayland which appears to be fatal for mir-shell to run

deathmist commented on 2023-01-06 22:18 (UTC)

2.11 released, also libxkbcommon-x11 is missing from makedepends (it looks for xkbcommon/xkbcommon-x11.h during build)