Announcement

Collapse
No announcement yet.

Debian + radeonsi

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

  • #16
    I've found some steps and I've tried to put them all together. Can you help me finding errors?
    I'll try to build and install this during week-end.

    Initial script (I choose llvm-3.5 so I can have OpenGl 3.3):
    Code:
    aptitude install automake xutils-dev libgl1-mesa-dev libegl1-mesa-dev libgbm-dev libgbm1 libtool xserver-xorg-dev checkinstall flex bison pkg-config libvdpau-dev libxcb-xfixes0-dev libelf-dev libexpat1-dev libbsd-dev llvm-3.5 llvm-3.5-runtime llvm-3.5-dev git
    Building glamor:
    Code:
    git clone git://anongit.freedesktop.org/xorg/driver/glamor
    cd glamor
    ./autogen.sh --prefix=/usr --enable-glx-tls --enable-xv
    make
    fakeroot checkinstall --install=no --pkgarch=amd64 --backup=no --pkgname=glamor --pkgversion=`cat VERSION` --default
    Building xf86-video-ati:
    Code:
    git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
    cd xf86-video-ati
    ./autogen.sh --prefix=/usr
    fakeroot checkinstall --install=no --pkgarch=amd64 --backup=no --pkgname=xf86-video-ati --pkgversion=`cat VERSION` --replaces=xserver-xorg-video-radeon,xserver-xorg-video-ati --default
    Building mesa 64bit:
    Code:
    #!/bin/bash
    PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig ./autogen.sh --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-debug \
    CPPFLAGS="-m64" \
    CXXFLAGS="-m64" \
    --enable-64-bit --disable-32-bit \
    --enable-texture-float \
    --with-gallium-drivers=swrast,radeonsi \
    --with-dri-drivers="" \
    --enable-vdpau \
    --enable-egl --enable-gles1 --enable-gles2 \
    --enable-glx-tls \
    --with-egl-platforms=x11,drm \
    --enable-gbm \
    --enable-gallium-egl \
    --enable-gallium-osmesa \
    --with-osmesa-bits=32 \
    --enable-gallium-llvm \
    --disable-dri3 \
    #--enable-opencl \
    #--with-llvm-shared-libs \
    --enable-shared-glapi
    --disable-llvm-shared-libs
    Building mesa 64bit .deb:
    Code:
    #!/bin/bash
    fakeroot checkinstall --install=no --replaces libgles1-mesa:amd64,opencl-headers,libgl1-mesa-dev,libglapi-mesa:amd64,libgles2-mesa:amd64,libgbm1:amd64,libegl1-mesa-dev,libgl1-mesa-dri:i386,libgl1-mesa-dri:amd64,libgl1-mesa-glx:amd64,libegl1-mesa:amd64,libgl1-mesa-swx11:amd64,libegl1-mesa-drivers:amd64,libosmesa6-dev:amd64,mesa-common-dev --pkgname=mesa --pkgversion=`cat VERSION` --pkgarch=amd64 --backup=no --default
    Building mesa 32bit(for steam):
    Code:
    #!/bin/bash
    PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig ./autogen.sh --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --enable-debug \
    CPPFLAGS="-m32" \
    CXXFLAGS="-m32" \
    --with-llvm-prefix=/usr/local/lib/llvm32 \
    LDFLAGS="-L/usr/lib/i386-linux-gnu -L/usr/lib -L/usr/local/lib/llvm32/lib" \
    --disable-64-bit --enable-32-bit \
    --enable-texture-float \
    --with-gallium-drivers=swrast,radeonsi \
    --with-dri-drivers="" \
    --enable-vdpau \
    --enable-egl --enable-gles1 --enable-gles2 \
    --enable-glx-tls \
    --with-egl-platforms=x11,drm \
    --enable-gbm \
    --enable-gallium-egl \
    --enable-gallium-osmesa \
    --with-osmesa-bits=32 \
    --enable-gallium-llvm \
    --disable-dri3 \
    #--enable-opencl \
    #--with-llvm-shared-libs \
    --enable-shared-glapi
    --disable-llvm-shared-libs
    Building mesa 32bit .deb:
    Code:
    #!/bin/bash
    fakeroot checkinstall --install=no --replaces libgles1-mesa:i386,libgl1-mesa-dev,libglapi-mesa:i386,libgles2-mesa:i386,libgbm1:i386,libegl1-mesa-dev,libgl1-mesa-dri:i386,libgl1-mesa-dri:i386,libgl1-mesa-glx:i386,libegl1-mesa:i386,libgl1-mesa-swx11:i386,libegl1-mesa-drivers:i386,libosmesa6-dev:i386,mesa-common-dev --pkgname=mesa32 --pkgversion=`cat VERSION` --pkgarch=i386 --backup=no --exclude=/etc/*,/usr/include/* --nodoc --default
    Is it necessary to build mesa 32bit in a chroot?

    Comment


    • #17
      Originally posted by lorenzoz View Post
      I've found some steps and I've tried to put them all together. Can you help me finding errors?
      What errors? In scripts, OK some suggestions:

      Initial script (I choose llvm-3.5 so I can have OpenGl 3.3):
      You can have OpenGL with llvm 3.4.1+ too, but llvm 3.5 is better less bugs is there for radeonsi, so that is good choose .

      Building glamor:
      You don't need that anymore with xserver 1.16 (it is part of it), that will soon hit sid... so it is obvious - soon you wouldn't need that lib .

      Building xf86-video-ati:
      Make sure glamor header is installed before that if you use liblamor (otherwise with xserver 1.16 you can't miss it - it is in xserver-xorg-dev), otherwise that would be inproper build .

      Is it necessary to build mesa 32bit in a chroot?
      Preferably, yes... otherwise be prepared to fiddle around .

      https://bugs.freedesktop.org/show_bug.cgi?id=50754

      ---------------------------

      I see you found a trick for your problem with checkinstall to avoid those two packages overwrites some files (--exclude=/etc/*,/usr/include/*), that should work .
      Last edited by dungeon; 07-03-2014, 03:18 PM.

      Comment


      • #18
        Yeah in first script when you build 64bit mesa, you miss llvm prefix In 32bit one you have it but prefix goes to --with-llvm-prefix=/usr/local/lib/llvm32 i guess you have builded your own llvm 32bit there or not?

        If you prefer to use llvm-3.5 packages which are in Debian sid or upstream snapshots debs --with-llvm-prefix=/usr/lib/llvm-3.5 should be proper for now .

        Comment


        • #19
          Originally posted by dungeon View Post
          Yeah in first script when you build 64bit mesa, you miss llvm prefix In 32bit one you have it but prefix goes to --with-llvm-prefix=/usr/local/lib/llvm32 i guess you have builded your own llvm 32bit there or not?

          If you prefer to use llvm-3.5 packages which are in Debian sid or upstream snapshots debs --with-llvm-prefix=/usr/lib/llvm-3.5 should be proper for now .
          Thanks for the help.
          I give it a try and it failed in building .deb.

          Code:
          Making install in osmesa
          make[3]: Entering directory '/media/lorenzo/games/mesa/mesa/src/gallium/targets/osmesa'
            CC       target.lo
            CXXLD    libOSMesa.la
          /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
          (.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x47): undefined reference to `setupterm'
          /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
          (.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x78): undefined reference to `tigetnum'
          /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
          (.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x81): undefined reference to `set_curterm'
          /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
          (.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x89): undefined reference to `del_curterm'
          collect2: error: ld returned 1 exit status
          Makefile:698: recipe for target 'libOSMesa.la' failed
          make[3]: *** [libOSMesa.la] Error 1
          make[3]: Leaving directory '/media/lorenzo/games/mesa/mesa/src/gallium/targets/osmesa'
          Makefile:524: recipe for target 'install-recursive' failed
          make[2]: *** [install-recursive] Error 1
          make[2]: Leaving directory '/media/lorenzo/games/mesa/mesa/src/gallium/targets'
          Makefile:530: recipe for target 'install-recursive' failed
          make[1]: *** [install-recursive] Error 1
          make[1]: Leaving directory '/media/lorenzo/games/mesa/mesa/src'
          Makefile:579: recipe for target 'install-recursive' failed
          make: *** [install-recursive] Error 1
          
          ****  Installation failed. Aborting package creation.
          I've googled and found is something related to --disable-llvm-shared-libs.
          But can't find a solution.

          the actual mesa-build script:
          Code:
          #!/bin/bash
          PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig ./autogen.sh --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-debug \
          CPPFLAGS="-m64" \
          CXXFLAGS="-m64" \
          --with-llvm-prefix=/usr/lib/llvm-3.5 \
          --enable-64-bit --disable-32-bit \
          --enable-texture-float \
          --with-gallium-drivers=swrast,radeonsi \
          --with-dri-drivers="" \
          --enable-vdpau \
          --enable-egl --enable-gles1 --enable-gles2 \
          --enable-glx-tls \
          --with-egl-platforms=x11,drm \
          --enable-gbm \
          --enable-gallium-egl \
          --enable-gallium-osmesa \
          --with-osmesa-bits=32 \
          --enable-gallium-llvm \
          --disable-r600-llvm-compiler \
          --disable-dri3 \
          --enable-shared-glapi \
          --disable-llvm-shared-libs \

          Comment


          • #20
            Sorry for the double post but I can't edit my previous one.

            I've tried to build mesa (both 32 and 64 bit) with --enable-llvm-shared-library and work like a charme, so problems are related to that option.
            Last edited by lorenzoz; 07-04-2014, 12:20 PM.

            Comment


            • #21
              Originally posted by lorenzoz View Post
              Sorry for the double post but I can't edit my previous one.

              I've tried to build mesa (both 32 and 64 bit) with --enable-llvm-shared-library and work like a charme, so problems are related to that option.
              None can help me?

              Comment


              • #22
                Sorry for this late bump guys, but can anyone help me?
                Now debian has included glamor library but I really want to try latest stuff from git with an updated kernel too.

                Comment


                • #23
                  Having built these things a few times, if you don't know what you're doing, it could take you a very long time to get it working...
                  It'd be easier to use pre-made packages if they are available to you and they are available in many distribution (Arch Linux, Ubuntu, Suse).
                  I don't use Debian so I can't help much with that.
                  Maybe if you don't find them you could use the Ubuntu's ones?

                  also maybe that can help: http://x.debian.net/howto/build-mesa.html

                  Comment


                  • #24
                    Compiling mesa with --disable-llvm-shared-libs fails.

                    This is the same error I get, but how can I solve it? Do I have to recompile llvm too?

                    Comment


                    • #25
                      For latest radeonsi mesa you need latest LLVM (sometimes to the commit)

                      Comment


                      • #26
                        Originally posted by geearf View Post
                        For latest radeonsi mesa you need latest LLVM (sometimes to the commit)
                        Mmm sorry.
                        I've tried this path.

                        Compiled both mesa 64bit and 32bit with --enable-llvm-shared-library; compiled without error.
                        Tried installing both mesa packages, but 32bit said /etc/drirc is shared with 64bit and can't be installed. (so this option is useless??? --exclude=/etc/*,/usr/include/*)

                        Now I'm running steam fine without a 32bit version of mesa and glxinfo:
                        Code:
                        OpenGL vendor string: X.Org
                        OpenGL renderer string: Gallium 0.4 on AMD PITCAIRN
                        OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.0-devel (git-74e100a)
                        OpenGL core profile shading language version string: 3.30
                        OpenGL core profile context flags: (none)
                        OpenGL core profile profile mask: core profile
                        Is it ok? why is steam running without a 32bit mesa? is because of this option? (fakeroot checkinstall --install=no --replaces ... libgl1-mesa-dri:i386 ... )

                        Comment


                        • #27
                          Nevermind, steam runs on stock mesa 10.2.4 (sid version).

                          So the problem is that 32bit tries to overwrite file from 64bit version.

                          Comment


                          • #28
                            Originally posted by lorenzoz View Post
                            So the problem is that 32bit tries to overwrite file from 64bit version.
                            You may try installing those checkinstall debs with dpkg --force-overwrite switch .

                            I mean if only that same conf file is the problem, you can install it that way. Not sure but seems like some checkinstall problem, does it work with:

                            Code:
                            checkinstall --exclude=/etc,/usr/include
                            Goal is to not have those for 32bit build checkinstall deb .

                            Comment


                            • #29
                              Originally posted by dungeon View Post
                              You may try installing those checkinstall debs with dpkg --force-overwrite switch .

                              I mean if only that same conf file is the problem, you can install it that way. Not sure but seems like some checkinstall problem, does it work with:

                              Code:
                              checkinstall --exclude=/etc,/usr/include
                              Goal is to not have those for 32bit build checkinstall deb .
                              Going to try right now.

                              I'm confused now. is it recommended to compile mesa with --disable-llvm-shared-library or is it an option?

                              Comment


                              • #30
                                Originally posted by lorenzoz View Post
                                I'm confused now. is it recommended to compile mesa with --disable-llvm-shared-library or is it an option?
                                It is not default and seems like recently does now work/compile . So no it is not recommended , you have warnings about that when you compile mesa:

                                NOTE: Mesa is attempting to use llvm shared libraries by default.
                                If you do not want to build with llvm shared libraries and instead want to
                                use llvm static libraries then add --disable-llvm-shared-libs to your configure
                                invocation and rebuild.
                                We don't need to update LLVM_LIBS in this case because the LLVM
                                install uses a shared object for each compoenent and we have
                                already added all of these objects to LLVM_LIBS.
                                Building mesa with staticly linked LLVM may cause compilation issues

                                Comment

                                Working...
                                X