LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2012, 10:54 AM   #1
Parisa Tatapudy
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
Can't get wine to run 64-bit .exe programs


I am running Ubuntu 10.04 LTS and have wine-1.4 installed using aptitude. When I try to run a 64-bit application (specifically, the Houdini_15a_x64.exe chess engine within Arena 3.0), I get error messages stating that my wine installation is 32-bit. The error message is:

Code:
err:process:create_process starting 64-bit process L"Z:\\usr\\games\\Houdini_15a_x64.exe" not supported in 32-bit wineprefix
I've searched the Web extensively and found various highly complicated instructions for enabling 64-bit support in wine (e.g. install a new version of gcc, run a convoluted script, etc.). I've tried some of this without success, but this should not be necessary; wine should support 64-bit programs by default. I've tried running winecfg, and I've tried

Code:
export WINEARCH=win64
but then running "wine program.exe" produces the error message:

Code:
wine: WINEARCH set to win64 but '$HOME/.wine' is a 32-bit installation.
I also tried "sudo apt-get remove wine" and then installing wine-1.5.4 from source. This didn't help, so I did "make uninstall" and reinstalled wine from aptitude.

Surely there is some simple way to install wine in Ubuntu 10.04 so that it will run both 32-bit and 64-bit Windows programs. Can anybody enlighten me as to what that simple way is? (Instructions for other versions of Ubuntu as well, while not helpful to me, would be helpful for others.)
 
Old 05-25-2012, 11:35 AM   #2
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
wine has to be specially compiled and then packaged (see this page to get an idea) to support both 32 and 64 bit executables at the same time. Given that the majority of Windows programs is still 32 bits, the package you installed probably only contains the 32 bit runtime for wine.
Quote:
Originally Posted by Parisa Tatapudy View Post
Code:
wine: WINEARCH set to win64 but '$HOME/.wine' is a 32-bit installation.
This only means that the WINEPREFIX which got previously created by your first tries contains a 32 bit "installation". You only need to remove it
Code:
rm -rf ~/.wine
for that error to disappear. If the WINEARCH variable is still set to win64 the next time you launch wine, that WINEPREFIX will be hopefully be recreated from scratch and it will contain a 64 bit "installation".
Your 64 bit Windows program should now at least start if the package of wine you installed contains the required 64 bit support for wine.

Last edited by 414N; 05-26-2012 at 02:45 AM.
 
Old 05-25-2012, 11:48 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You don't need to delete the old wine configuration, you can just create a new one, named differently, for example with
Code:
WINEARCH=win64 WINEPREFIX=/home/username/.wine64 winecfg
This will create a new wine installation named .wine64 in your users home-directory. Keep in mind that you have to set WINEARCH and WINEPREFIX every-time you want to run a program in that installation, do it may be more convenient to use an alias or a script to start your 64 bit application.
 
Old 05-26-2012, 08:49 PM   #4
Parisa Tatapudy
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, I am aware of the wine wiki "Win64 Support for Wine"; it was that page I was alluding to when I spoke of highly complicated instructions for enabling 64-bit support in wine including compiling a new version of gcc, which in turn requires resolving a huge number of unmet dependencies, etc. I'm not willing to try this on my main computer, since destroying gcc would be a major problem for me. (I have gcc version 4.4.3, the latest version for Ubuntu 10.04.) I tried compiling gcc 4.5.1 on a spare computer using the script provided on the "Win64 Support for Wine" page but eventually gave up on it when it required new installations of a great number of packages.

By the way, about the majority of Windows programs being 32-bit -- given that everyone on earth today is running 64-bit hardware, I have no idea why anyone would be writing 32-bit software, or why the standard installation of wine that you get on Debian/Ubuntu with "sudo apt-get install wine" can only accommodate 32-bit software. Perhaps developers would care to offer some explanation of this ridiculous state of affairs?

In any event, following TobiSGD's advice, I tried

Code:
WINEARCH=win64 WINEPREFIX=/home/tatapudy/.wine64 winecfg
from the command line, and got the error:

Code:
wine: created the configuration directory '/home/tatapudy/.wine64'
wine: WINEARCH set to win64 but '/home/tatapudy/.wine64' is a 32-bit installation.
What else might I try?
 
Old 05-26-2012, 09:04 PM   #5
Parisa Tatapudy
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
And one more thing: on Wine64 - The Official Wine Wiki one is instructed to run the commands

Code:
./configure --enable-win64

...

cd $HOME
mkdir wine64
cd wine64
../wine-git/configure --enable-win64 CC=/usr/local/gcc/bin/gcc
Apparently this assumes you've compiled wine from source rather than installing it with "sudo apt-get install wine" (as I have). Otherwise, in which directory are you supposed to run "./configure"? (It certainly doesn't work in $HOME/.wine or $HOME/wine64.) Running the second set of commands quoted above produces the error

Code:
bash: ../wine-git/configure: No such file or directory
(exactly as one would have expected).
 
Old 05-27-2012, 02:52 AM   #6
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by Parisa Tatapudy View Post
Apparently this assumes you've compiled wine from source rather than installing it with "sudo apt-get install wine" (as I have).
Of course. As I said before, the package you installed probably contains only the 32 bit wine runtime environment. You'd have to compile wine from source to obtain 64 bit compatibility or find someone who already did that and packaged it for the masses.
 
Old 05-27-2012, 05:03 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Maybe you are hitting yourself against a wall here.

Do you have a 64 bits OS at all? Can you post the output for "uname -a" here?

Wine is not an emulator, in the traditional sense. I am no specialist in wine, but it works by translating windows calls into their linux/xlibs and a few other libs conterparts. The translation is straight enough that I highly doubt that you can translate win64 syscalls to linux32 syscalls. In other words, you can run wine 32 in linux 32, you can run wine 32 in linux 64 (because linux 64 with ia32 enabled in the kernel can natively run 32 bits code), you can run wine 64 in linux 64, but you CAN'T run wine 64 in linux 32. That is, unless I am terribly wrong here.

In any case, as said above, you definitely can't just magically changed the wine bitness by setting a variable. You need to recompile it. But you need a 64 bits OS to be able to do that. I am obviating the obvious: of course, you also need an x86_64 capable cpu.

If your OS is a 32 bits OS, you will need to install the 64 bits version (if there's one, I guess there is, but have no experience with *buntu).

Quote:
Originally Posted by Parisa Tatapudy View Post
Yes, I am aware of the wine wiki "Win64 Support for Wine"; it was that page I was alluding to when I spoke of highly complicated instructions for enabling 64-bit support in wine including compiling a new version of gcc, which in turn requires resolving a huge number of unmet dependencies, etc. I'm not willing to try this on my main computer, since destroying gcc would be a major problem for me. (I have gcc version 4.4.3, the latest version for Ubuntu 10.04.) I tried compiling gcc 4.5.1 on a spare computer using the script provided on the "Win64 Support for Wine" page but eventually gave up on it when it required new installations of a great number of packages.
You don't have much choice. You need a 64 bits OS for this.

Quote:
By the way, about the majority of Windows programs being 32-bit -- given that everyone on earth today is running 64-bit hardware, I have no idea why anyone would be writing 32-bit software, or why the standard installation of wine that you get on Debian/Ubuntu with "sudo apt-get install wine" can only accommodate 32-bit software. Perhaps developers would care to offer some explanation of this ridiculous state of affairs?
Well, that's not true, there's a world beyond x86 and x86_64, you know... You probably have an arm cpu somewhere, in your pocket, in the form or a table, a video console or a mobile phone. But in any case you don't write software for 32 bits, you just write software, and then you compile it for a given cpu, that can work in 32 bits, 64, 128, or in many of these modes at once. That's up to the compiler, not the developer (unless you are using assembler of course).

In any case, note that the wine case is special. The last time I checked, and because of the low-levelness of this concrete software, wine cannot run 32 bits exe files if its been compiled for 64 bits. That's (or was) the reason why, even 64 bits distros, usually offer the 32 bits version of wine, which is what most users will want because most windows software is still compiled for x86 (not x86_64). Or better said, in most cases, you can always find a 32 bits compilation of a given program, but you can't always find a 64 bits build of it. Some windows programs might not even compile easily for 64 bits, because windows programmers are not the kind of programmer who care about portability of the code, and do lots of assumptions. I don't like to generalize, but this disease is more common in windows than in any other OS, that's a fact.

Code:
wine: created the configuration directory '/home/tatapudy/.wine64'
wine: WINEARCH set to win64 but '/home/tatapudy/.wine64' is a 32-bit installation.
Message is clear. You need a 64 bits wine build, and for that, you need a 64 bits OS. If your OS is 64 bits-able, then you are one step nearer.
 
Old 05-27-2012, 05:10 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Code:
bash: ../wine-git/configure: No such file or directory
You need to get the sources first. The configure script is in the wine sources. So, pick the latest from here:

http://www.winehq.org/announce/1.5.5

It seems it's in tar.bz2 format, so you should be able to download and unpack it using these:

Code:
cd ~
mkdir winesrc
cd winesrc
wget http://prdownloads.sourceforge.net/wine/wine-1.5.5.tar.bz2
tar xf wine-1.5.5.tar.bz2
From here, you will need to use ls and cd to check what's in there and change to the proper directory, the configure script should be in there, and follow the instructions in the wiki to compile it in 64 bits mode.

As said above, this will only work if you have a 64 bits OS, and all the needed devel packages installed.
 
Old 05-27-2012, 10:28 PM   #9
Parisa Tatapudy
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for your reply, i92guboj. The output of "uname -a" is:

Code:
Linux pattap 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 16:18:56 UTC 2012 x86_64 GNU/Linux
So there should be no problem, right?

Okay, I'll try compiling wine-1.5.5 from source on my spare computer, although I'm uneasy about what might break if there are problems with gcc version 4.4.3. I don't suppose "sudo add-apt-repository ppa:ubuntu-wine/ppa ; sudo apt-get update ; sudo apt-get install wine1.5" is a viable alternative?

Sorry, but I disagree with the statement that you don't write software for 32-bit or for 64-bit machines but rather that you just write software. For instance, a C program containing

Code:
unsigned long i;
for (i=1; i<=5000000000UL; i++)
   ...
is certainly written for a 64-bit system, and the program will not work as intended on a 32-bit system. In any event, some Windows programs are written to make full use of 64-bit computers, and wine "out of the box" really ought to be able to accommodate those.
 
Old 05-28-2012, 02:21 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Parisa Tatapudy View Post
Thank you for your reply, i92guboj. The output of "uname -a" is:

Code:
Linux pattap 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 16:18:56 UTC 2012 x86_64 GNU/Linux
So there should be no problem, right?
Right, as long as your kernel has IA32_EMULATION turned on in your kernel. You can easily check that as long as /proc/config.gz is enabled also.

Code:
zgrep IA32 /proc/config.gz
I don't know if ubuntu enables any or both of these, though.

Quote:
Okay, I'll try compiling wine-1.5.5 from source on my spare computer, although I'm uneasy about what might break if there are problems with gcc version 4.4.3. I don't suppose "sudo add-apt-repository ppa:ubuntu-wine/ppa ; sudo apt-get update ; sudo apt-get install wine1.5" is a viable alternative?
gcc in a binary distro like ubuntu shouldn't be a core piece of your system (breaking it in a source distro like Gentoo IS indeed problematic, though). In ubuntu you don't need it to install packages, so you can always revert if something goes wrong. However, don't install it by hand outside your package manager (if you are going to install it at all), because that can live behind leftovers that can, indeed, produce unexpected side effects later.

About the apt-get and repos stuff, sorry, I'm afraid I have no idea about *buntu specifics. Someone else will have to answer that.

Quote:
Sorry, but I disagree with the statement that you don't write software for 32-bit or for 64-bit machines but rather that you just write software. For instance, a C program containing

Code:
unsigned long i;
for (i=1; i<=5000000000UL; i++)
   ...
is certainly written for a 64-bit system, and the program will not work as intended on a 32-bit system. In any event, some Windows programs are written to make full use of 64-bit computers, and wine "out of the box" really ought to be able to accommodate those.
I politely disagree with you, in turn

Note that the range that the c99 standard fixates for unsigned long ints is 2^32-1, if you are trying to set an unsigned long int variable to a value that's bigger than 2^32-1, relying on a specific platform "feature" (to call it something) then the problem is yours. The bitness of a program, in any case, is never defined by the constants you write on the source code. You are simply using the wrong data type for that variable, nothing else. The compiler behavior in this case will be undefined, and each compiler you try might do a different thing... It might even work in some compilers, and it might produce unexpected results, but this is a human error and has nothing to do with your program being specific to 64 bits.

Otherwise, you could just set that number higher than 2^128-1 and claim that you are using a 256 bits program, it truly doesn't work that way

That's a side effect of the power that C gives us to control everything without putting too much boundaries to what we can do. One of the problems of this is that the programmer is the one to take care about the correctness of the input data, it doesn't really matter if you are putting it into a program as a textual string or if you are reading it via some function or syscall (though admittedly, in the later case the number of things that could go wrong is higher).

It's true that you *can* program for 64 bits or 32 bits (or something else), but platform specific code is some other thing. It has nothing to do with your assigning one number or a slightly bigger one to a given variable.

About the wine internals, I won't argue because I never looked into them and I lack the background to do so. In any case, even if wine supported this feature, the distributions would still need to ship 32 and 64 bits versions of xlib, libpng, alsa, sdl, openal, libmp3, the opengl stack including the drivers, which might be proprietary making it even funnier... All that, along with the 64 bits native ones, and provided the needed mechanisms to handle then at fs level without ones colliding with the others (i.e. be careful with what /lib and /usr/lib points to to effectively separate lib32 and lib64, besides a couple other things).

In fact, if distros really cared about running 64 bits windows binaries they could perfectly pack to packages called "wine" and "wine64" and install them in different prefixes with their respective subset of libraries compiled for the correct bitness. So, there's nothing stopping them from doing so, besides the lack of interest. It would be nicer to get the same wine binary to run both kind of builds, but that's not a show-stopper at all.

Last edited by i92guboj; 05-28-2012 at 02:22 AM. Reason: typo
 
Old 05-28-2012, 05:38 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I personally used wine for a while on Arch Linux 64 bit and it installed automatically necessary 32 bit libraries and also used by default 64 bit prefixes (which in fact meant that for some older programs I had to specifically create 32 bit prefixes).
I would be surprised if that wouldn't be the case on Ubuntu also.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine-1.1.32 does not open a .EXE under Fedora 12 64 bit lppatmore Linux - Software 6 01-15-2010 09:25 PM
How to run windows based .exe programs on linux slsscoot Linux - Newbie 7 04-20-2008 05:28 PM
SETUP.EXE/autorun.exe don't run in wine mst3kman Linux - Games 3 01-22-2006 02:20 PM
How do i run microsoft exe programs? ant123 Linux - Games 4 10-25-2004 11:21 AM
wine will run notepad.exe 0o0 Linux - Newbie 9 06-20-2004 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration