Advertisement
perpetually_high

Ubuntu 16.04 32-bit VM prep with GCC8/LLVM8 for Mesa drivers

Nov 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.81 KB | None | 0 0
  1. # Ubuntu 16.04 32-bit VM prep with GCC8/LLVM8 for compiling Mesa 32-bit drivers.
  2. #
  3. # Note: This is not a script.
  4. #
  5. # This are the packages and steps I took to get going. Skim through
  6. # and see what you need, but most likely all steps should apply.
  7. # ------------------------------------------------------------
  8.  
  9. # Add Ubuntu Toolchain PPA for GCC 8
  10. # sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  11. # sudo apt update && sudo apt upgrade
  12. # sudo apt install gcc-8 g++-8
  13.  
  14. # Make GCC 8 the default with the highest priority
  15. # sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
  16. # if you have other version, you can add them also with lower priority:
  17. # sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 500 --slave /usr/bin/g++ g++ /usr/bin/g++-5
  18. # sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
  19. # To change versions at any time:
  20. # sudo update-alternatives --config gcc
  21. #
  22. # Necessary packages for Mesa (Your Mileage May Vary)
  23. # sudo apt install build-essential autoconf autogen libtool bison flex python-mako
  24. # sudo apt install zlib1g-dev x11proto-gl-dev libdrm-dev x11proto-dri2-dev libxcb-dri2-0-dev libx11-xcb-dev libxcb-glx0-dev
  25. # sudo apt install libxfixes-dev libxdamage-dev libxext-dev libx11-dev libxcb-xfixes0-dev libxcb-present-dev libxcb-dri3-dev libelf-dev
  26. # sudo apt install wayland-protocols libwayland-egl-backend-dev libxcb-sync-dev libxshmfence-dev libxrandr-dev libexpat-dev libsensors4-dev
  27. # sudo apt install llvm llvm-7 llvm-8-dev llvm-8-tools vulkan-utils
  28. #
  29. # Add LLVM 8 PPA
  30. # echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main" | sudo tee /etc/apt/sources.list.d/llvm.list
  31. # wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
  32. # sudo apt update && sudo apt upgrade
  33. # sudo apt install libllvm-8-ocaml-dev libllvm8 llvm-8 llvm-8-dev llvm-8-doc llvm-8-examples llvm-8-runtime
  34. # sudo apt install libfuzzer-8-dev lldb-8 lld-8 libc++-8-dev libc++abi-8-dev libomp-8-dev
  35. #
  36. # Setting up LLVM8/clang8 as default
  37. # sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 500
  38. # sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 500
  39. # sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-8 500
  40. #
  41. # If you have older versions:
  42. # sudo apt install llvm-3.9-dev clang-3.9 lldb-3.9 clang++-3.8
  43. #
  44. # Add them to alternatives with lower priority below:
  45. # sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
  46. # sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
  47. # sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.8 100
  48. #
  49. # sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 200
  50. # sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 200
  51. # sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.9 200
  52.  
  53. # Have to manually get libglvnd debpkg and libLLVM-8 from a newer distro (bionic/cosmic)
  54. #
  55. # For example:
  56. # http://mirrors.kernel.org/ubuntu/pool/main/libg/libglvnd/libglvnd-core-dev_1.0.0-2ubuntu2_i386.deb
  57. # https://packages.ubuntu.com/bionic/i386/libglvnd0/download
  58. #
  59. # Then install them:
  60. # sudo dpkg -i libglvnd-core-dev.deb
  61. # sudo dpkg -i libglvnd0.deb
  62. # If you run into any issues:
  63. # sudo apt --fix-broken install
  64.  
  65. # Add oibaf PPA for newer libdrm
  66. # sudo add-apt-repository -y ppa:oibaf/graphics-drivers
  67. # sudo apt update
  68. # sudo apt upgrade libdrm
  69. # sudo apt install libdrm-amdgpu1 libdrm-common libdrm-dev
  70. # sudo apt install vdpauinfo libllvm8 libvdpau-dev libva-dev libclc-dev libclang-8-dev
  71. # sudo apt install mesa-utils libgl1-mesa-glx libgles1-mesa libgles1-mesa-dev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement