Deepin/UOS上安装编译wine需要的依赖(32位+64位一次性搞定)

@Ta 2022-05-06发布,2022-05-06修改 8684点击
# 修改并安装32位libc6-dev包,这样才能装上部分i386依赖
apt download libc6-dev:i386
sudo dpkg -x ./libc6-dev_*_i386.deb ./extract/
sudo dpkg -e ./libc6-dev_*_i386.deb ./extract/DEBIAN/
sudo sed -i '/^Depends:/d' ./extract/DEBIAN/control
sudo dpkg-deb -b ./extract/
sudo apt install ./extract.deb

# 安装全部依赖
sudo apt install \
  build-essential multiarch-support \
  gcc-multilib g++-multilib \
  bison flex \
  libx11-dev libx11-dev:i386 \
  libfreetype6-dev libfreetype6-dev:i386 \
  libxcursor-dev libxcursor-dev:i386 \
  libxi-dev libxi-dev:i386 \
  libxshmfence-dev libxshmfence-dev:i386 \
  libxxf86vm-dev libxxf86vm-dev:i386 \
  libxrandr-dev libxrandr-dev:i386 \
  libxinerama-dev libxinerama-dev:i386 \
  libxcomposite-dev libxcomposite-dev:i386 \
  libosmesa6-dev libosmesa6-dev:i386 \
  ocl-icd-opencl-dev ocl-icd-opencl-dev:i386 \
  libpcap-dev libpcap-dev:i386 \
  libdbus-1-dev libdbus-1-dev:i386 \
  libgnutls28-dev libgnutls28-dev:i386 \
  libsane-dev libsane-dev:i386 \
  libusb-1.0-0-dev libusb-1.0-0-dev:i386 \
  libv4l-dev libv4l-dev:i386 \
  libgphoto2-dev libgphoto2-dev:i386 \
  libpulse-dev libpulse-dev:i386 \
  libgstreamer1.0-dev libgstreamer1.0-dev:i386 \
  libgstreamer-plugins-base1.0-dev libgstreamer-plugins-base1.0-dev:i386 \
  libudev-dev libudev-dev:i386 \
  libsdl2-dev libsdl2-dev:i386 \
  libcapi20-dev libcapi20-dev:i386 \
  libcups2-dev libcups2-dev:i386 \
  libfontconfig1-dev libfontconfig1-dev:i386 \
  libkrb5-dev libkrb5-dev:i386 \
  libopenal-dev libopenal-dev:i386 \
  samba-dev \
  libvulkan-dev libvulkan-dev:i386 \
  libldap2-dev libldap2-dev:i386 \
  libgl1-mesa-dev libgl1-mesa-dev:i386

无论是在x86还是在arm64上,都推荐使用clang进行编译,这样可以直接编译出PE DLL,不需要折腾mingw的安装。

clang下载:https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.0

  • clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz好像是最后一个x86 linux预编译二进制,后续版本就没有了,得自己编译。

使用方法:

export CLANG_HOME=/path/to/clang-14; export CC=clang CXX=clang++ PATH=$CLANG_HOME/bin:$PATH LD_LIBRARY_PATH=$CLANG_HOME/lib

./configure
回复列表(1|隐藏机器人聊天)
  • @Ta / 2022-05-18 / /

    ARM64 银河麒麟

    sudo apt install \
      build-essential multiarch-support \
      bison flex \
      libunwind-dev \
      libx11-dev \
      libfreetype6-dev \
      libxcursor-dev \
      libxi-dev \
      libxshmfence-dev \
      libxxf86vm-dev \
      libxrandr-dev \
      libxinerama-dev \
      libxcomposite-dev \
      libosmesa6-dev \
      ocl-icd-opencl-dev \
      libpcap-dev \
      libdbus-1-dev \
      libgnutls28-dev \
      libsane-dev \
      libusb-1.0-0-dev \
      libv4l-dev \
      libgphoto2-dev \
      libpulse-dev \
      libgstreamer1.0-dev \
      libgstreamer-plugins-base1.0-dev \
      libudev-dev \
      libsdl2-dev \
      libcapi20-dev \
      libcups2-dev \
      libfontconfig1-dev \
      libkrb5-dev \
      libopenal-dev \
      samba-dev \
      libvulkan-dev \
      libldap2-dev \
      libgl1-mesa-dev
    
    export CC=clang CXX=clang++ PATH=/home/hu60/work/cmake-3.23.0-rc2/bin:/home/hu60/work/clang-14/bin:$PATH LD_LIBRARY_PATH=/home/hu60/work/clang-14/lib
    
添加新回复
回复需要登录