Can't build 32bit Wine on 64bit linux

后端 未结 7 1845
逝去的感伤
逝去的感伤 2020-12-28 20:32

I\'m trying to do this:
Build 32bit on 64 bit Linux using an automake configure script?
Doesn\'t work for me :( Compileing wine. I found this in config.log:

相关标签:
7条回答
  • 2020-12-28 20:39

    The Wine wiki has an easy way to install the needed 32bit development libraries on a 64bit system, using chroot: http://wiki.winehq.org/WineOn64bit

    0 讨论(0)
  • 2020-12-28 20:49

    I guess you use Ubuntu x64 which now supports multi-architecture. In other words on a 64 bit system you can build only Wine-x64 version. Building 32bit Wine on Ubuntu 12.04 x64 seems to buggy as for now.

    So just run:

    ./configure --enable-win64
    
    0 讨论(0)
  • 2020-12-28 20:53
    apt-get install gcc-multilib libasound2-dev:i386 libgsm1-dev:i386 libjpeg8-dev:i386 liblcms2-dev:i386 libldap2-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libv4l-dev:i386 libx11-dev:i386 libxinerama-dev:i386 libxml2-dev:i386 zlib1g-dev:i386 
    

    and

    apt-get install libcapi20-dev:i386 libcups2:i386 libdbus-1-3:i386 libfontconfig:i386 libfreetype6:i386 libglu1-mesa:i386 libgnutls26:i386 libgphoto2-2:i386 libncurses5:i386 libosmesa6:i386 libsane:i386 libxcomposite1:i386 libxcursor1:i386 libxi6:i386 libxrandr2:i386 libxslt1.1:i386 ocl-icd-libopencl1:i386
    

    got me past X error.

    0 讨论(0)
  • 2020-12-28 20:53

    What worked to some extent for me on Debian Wheezy:

    dpkg --add-architecture i386
    apt-get update
    

    to enable installation from the i386 repos

    apt-get install ia32-libs libc6-dev-i386 lib32z1-dev lib32bz2-dev
    

    to install the 32 bit libs. I'm actually still having trouble with X libs:

    configure: error: X 32-bit development files not found. Wine will be built
    without X support, which probably isn't what you want. You will need
    to install 32-bit development packages of Xlib/Xfree86 at the very least.
    Use the --without-x option if you really want this.
    

    but it's technically optional.

    0 讨论(0)
  • 2020-12-28 20:54

    To build 32-bit wine on 64-bit machine, you can use LXC (Linux Containers) which is an operating-system-level virtualization environment for running multiple isolated Linux systems. It's the easiest solution so far, as Linux (such as Ubuntu or Debian) makes building 32-bit wine hard because the 64-bit system doesn't come with a full set of 32-bit development libraries (See: Bug #990982).

    So the basic approach to compile both 32-bit and 64-bit wine is:

    1. Build 64-bit wine
    2. Build 32-bit tools in lxc
    3. Build 32-bit wine in lxc, referring to the 64-bit wine and 32-bit tools 1. built in the previous steps
    4. Install 32-bit wine
    5. Install 64-bit wine

    On the page Building Biarch (Shared WoW64) Wine On Ubuntu we can read the following instructions:

    1. Install the 64-bit prerequisites:

      sudo apt-get update
      sudo apt-get build-dep wine
      
    2. Build 64-bit wine:

      mkdir $HOME/wine64
      cd $HOME/wine64
      ../wine-git/configure --enable-win64
      make -j4
      
    3. Install lxc:

      sudo apt-get install lxc
      
    4. Create a 32-bit container named "my32bitbox" using the Ubuntu template and bind your home directory to the /home directory in the container:

      sudo lxc-create -t ubuntu -n my32bitbox -- --bindhome $LOGNAME -a i386
      
    5. Copy the apt configuration from the host to the lxc container:

      sudo cp -R /etc/apt /var/lib/lxc/my32bitbox/rootfs/etc
      
    6. Start the container; at the console login prompt it gives you, log in with your username and password.

      sudo lxc-start -n my32bitbox
      
    7. Now you're inside the container, in your real home directory. If you are not in the container (you do not have the prompt username@my32bitbox), then open a new terminal and:

      sudo lxc-attach -n my32bitbox
      login yourusername+password
      
    8. Now, you are in the container. Do an out-of-tree build of Wine as normal, just to get the tools. You'll have to install all the needed prerequisites first. For instance:

      sudo apt-get update
      sudo apt-get install python-software-properties git-core
      sudo apt-get build-dep wine
      mkdir $HOME/wine32-tools
      cd $HOME/wine32-tools
      ~/wine-git/configure
      make -j4
      
    9. Still inside the container, do it again, this time pointing to the 64-bit build for data, and the 32-bit tools build for tools:

      mkdir $HOME/wine32
      cd $HOME/wine32
      ~/wine-git/configure --with-wine64=$HOME/wine64 --with-wine-tools=$HOME/wine32-tools
      make -j4
      
    10. Still inside the container, install the 32-bit wine to force the last little bit of building:

      cd $HOME/wine32
      sudo make install
      
    11. While still inside the container, shut it down:

      sudo shutdown -h now
      

      This drops you back out into your real machine. Next, you need to remove all existing Wine packages. You can do this from the command line but it's probably easier with aptitude or one of the GUI package management tools. You will need wine-mono, wine-gecko, and optionally winetricks for your compiled version of wine. However, these packages may depend on the existing wine installation which may force you to remove them.

    12. Install the newly built wine into your real machine:

      cd $HOME/wine32
      sudo make install
      cd $HOME/wine64
      sudo make install
      

      Warning: When you install a locally built version of Wine, the package management system will not know it exists since it did not come from a package. Thus it is possible to later break its dependencies or install a conflicting version of wine without a warning from the package management tools. You can prevent this by creating a package or by blocking conflicting packages with apt-pinning by setting "Pin-Priority: -1" for the packages.

    13. Next, install Mono, Gecko, and optionally winetricks if you had to remove their packages because of a dependency on a conflicting wine package.

    Notes:

    • Many of the above commands require root privileges. Your user account needs to have access to root via sudo or you need to switch to a user account.
    • It's not necessary to remove your distro version and 'install' your compiled versions (32bit, 64bit) You simply need to invoke your personal version of wine appropriate for the Windows app. For example: ~/wine32/wine32 ~/.wine/path_to_winapp/my_app.
    0 讨论(0)
  • 2020-12-28 20:57

    you may solve the X error:

    sudo apt-get install xorg-dev
    
    0 讨论(0)
提交回复
热议问题