Announcement

Collapse
No announcement yet.

The Linux Graphics Stack Gets Further Meson-ized: Now With Libdrm Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The Linux Graphics Stack Gets Further Meson-ized: Now With Libdrm Support

    Phoronix: The Linux Graphics Stack Gets Further Meson-ized: Now With Libdrm Support

    The work on adding optional Meson build system support to the Linux graphics stack and other key open-source projects continues.....

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I'm glad they are getting use out of it. Myself, I looked at it to use on my own small project and I found the documentation to be pathetic and the amount of online tutorials/help to be pitiful. I'll stick with CMake.

    Comment


    • #3
      Is Mesa fully ready for Meson build or not yet? I see official Debian packages are still using autotools for it.

      Comment


      • #4
        17.3 doesn't work with Meson. master does, though. A ton of people have switched, and never looked back. It's so much better.
        Free Software Developer .:. Mesa and Xorg
        Opinions expressed in these forum posts are my own.

        Comment


        • #5
          we need to stop inviting more build systems, so much wasted time, also getting to use, and debug them, e.g. for cross compiling, etc. totally annoying that each and every project now uses some other build "stuff". It was building already, and quite convenient to configure; make; make install, ...

          Comment


          • #6
            Originally posted by Kayden View Post
            A ton of people have switched, and never looked back. It's so much better.
            Everything is better than Autotools. What's disappointing though is introducing yet another build system with no obvious advantages over other modern build systems.

            Comment


            • #7
              Ohh for the longest time I thought it doesn't build radv, but it does. The issue is that with autoconf the option is --with-vulkan-drivers=radeon and with meson it's -Dvulkan-drivers=amd.

              So I tried it and had to fiddle with it for like 20 minutes until it builds how I want it.

              First, -Dlibdir="lib" is wrong. Just like with prefix, you have to set --libdir="lib" and --prefix=/usr

              Then after some confusion I finally have
              Code:
              meson --prefix="/usr/" \
                  --libdir="lib" \
                  -Dbuildtype=release \
                  -Dplatforms=x11,drm,wayland \
                  -Ddri-drivers= \
                  -Dvulkan-drivers=amd \
                  -Dgallium-drivers=radeonsi,swrast \
                  -Dgles1=true \
                  -Dgles2=true \
                  -Degl=true \
                  -Dshared-glapi=true \
                  -Dgallium-extra-hud=true \
                  -Dgallium-nine=true \
                  -Dtexture-float=true \
                  -Dgallium-vdpau=true \
                  -Dgallium-va=true \
                  -Dgallium-omx=true \
                  build
              
              ninja -C build
              
              DESTDIR="${pkgdir}" ninja -C build install
              And it works. Thanks for the reminder.

              It really builds so much faster.

              Comment


              • #8
                An hour later I was unable to figure out how to make it build 32 bit mesa on my 64 bit arch.

                I found https://www.mesa3d.org/meson.html but it did not help.

                Apparently there are no example cross files around of anyone doing a lib32 build so I tried
                Code:
                [binaries]
                ar = 'ar'
                c = 'gcc'
                cpp = 'g++'
                pkgconfig = 'pkg-config'
                strip = 'strip'
                
                [host_machine]
                system = 'linux'
                cpu_family = 'x86'
                cpu = 'i686'
                endian = 'little'
                And variations of CFLAGS with -m32 but all does not help. In the end it still produces 64 bit libraries.

                Edit: It also fails to account for the arch case where the llvm-config binary for 32 bit has been renamed /usr/bin/llvm-config32.

                Edit2: Once I decided to forget about meson's cross compilation feature, I figured it out in 5 minutes:

                Code:
                export LLVM_CONFIG=/usr/bin/llvm-config32
                export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
                export CC='gcc -m32'
                export CXX='g++ -m32'
                
                  meson \
                    --prefix="/usr/" \
                    --libdir="lib32" \
                    --libexecdir='/usr/lib32' \
                    -Dbuildtype=release \
                    -Dplatforms=x11,drm,wayland \
                    -Ddri-drivers= \
                    -Dvulkan-drivers=amd \
                    -Dgallium-drivers=radeonsi,swrast \
                    -Dgles1=true \
                    -Dgles2=true \
                    -Degl=true \
                    -Dshared-glapi=true \
                    -Dgallium-extra-hud=true \
                    -Dgallium-nine=true \
                    -Dtexture-float=true \
                    -Dgallium-vdpau=true \
                    -Dgallium-va=true \
                    -Dgallium-omx=true \
                    build
                
                  ninja -C build
                
                  DESTDIR="${pkgdir}" ninja -C build install
                Maybe there are some things that just shouldn't be handled on the build system level.
                Last edited by haagch; 12 January 2018, 08:41 PM.

                Comment


                • #9
                  vdpau and vaapi are both broken.

                  For vdpau I've found a patch: https://lists.freedesktop.org/archiv...ry/181789.html
                  It seems to work analog in vaapi: https://github.com/ChristophHaag/mes...be65024b5852ff
                  I also had to set the libva version to 1.0 because libva is only searching for 1.0 and you get an error
                  libva error: /usr/lib/dri/radeonsi_drv_video.so has no function __vaDriverInit_1_0
                  if you don't do that.
                  edit: the autotools makefile is using pkg-config's output which is
                  pkg-config --modversion libva
                  1.0.0

                  Using vaapi doesn't actually work though:
                  gst-launch-1.0: ../src/gallium/drivers/radeon/radeon_winsys.h:773: radeon_get_heap_index: Assertion `!"READ_ONLY without WC is disallowed"' failed.
                  But that's for tomorrow to investigate.

                  edit: omx is broken too:
                  OMX-the library /usr/lib/bellagio/libomx_mesa.so is not compatible with ST static component loader - /usr/lib/bellagio/libomx_mesa.so: undefined symbol: omx_component_library_Setup

                  It would be nice if the people who commit the meson support actually tested this stuff once. edit: They probably tested it, just not on radeonsi. Except omx because nobody cares about omx.
                  Last edited by haagch; 12 January 2018, 10:53 PM.

                  Comment


                  • #10
                    Originally posted by dos1 View Post

                    Everything is better than Autotools. What's disappointing though is introducing yet another build system with no obvious advantages over other modern build systems.
                    Meson does offer obvious advantages over other modern build systems, that's why they're using it. I've got my problems with Meson, see my previous comment, but it's a great technology at its core.

                    Comment

                    Working...
                    X