Help compiling an older version of wine on 64 bit Fedora 14

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Giles
Level 1
Level 1
Posts: 5
Joined: Tue Mar 01, 2011 10:34 am

Help compiling an older version of wine on 64 bit Fedora 14

Post by Giles »

I'm having problems running a windows program (nulldc 1.0.3 but that's not important) under the latest version of wine, which is up and running (in 32 bit) on my 64-bit install of Fedora 14. I'm trying to compile a version of wine 1.1.32 under a separate prefix. I'm doing this in a way that has worked for me in the past under a 32-bit environment. As I say, I've compiled the latest version of wine and it's behaving well; my problem is getting an older version up and running under a separate prefix.

I've got all the 32 bit dependencies installed as per the building wine on fedora 14 section of the wine wiki: http://wiki.winehq.org/WineOn64bit
I downloaded wine 1.1.32 from source.

First of all I used the following method to build and install wine 1.1.32 from source, as recommended by the wiki:

Code: Select all

$ ./configure --prefix "/home/mythtv/.nulldcwine" && make &&  make install
$ cd ~/.nulldcwine/bin
$ WINEPREFIX="/home/mythtv/.nulldcwine" ~/.nulldcwine/bin/winecfg
however, on executing the local version of winecfg, I get a segfault:

Code: Select all

Segmentation fault (core dumped)
In semi-desperation I tried manually creating a prefix with wineprefixcreate, but this also gave me a segfault

Code: Select all

$ sh wineprefixcreate --prefix /home/mythtv/.nulldcwine
Note: wineprefixcreate is deprecated and shouldn't be needed anymore.
      WINEPREFIX creation and updates now happen automatically when needed.

wineprefixcreate: line 134: 31497 Segmentation fault      (core dumped) "${WINELOADER:-$bindir/wine}" wineboot.exe
Going back to the drawing board I used a different build method, that had worked in the past in a 32-bit environment:

Code: Select all

$ CFLAGS=-fno-stack-protector ./configure --prefix="/home/mythtv/.nulldcwine" && make depend && make && make install
but on running a prefixed version of winecfg, I get a segfault again.
Needless to say, I get a segfault when trying to run a program with wine as well with both build methods:

Code: Select all

$ WINEPREFIX="/home/mythtv/.nulldcwine" ~/.nulldcwine/bin/wine ~/.nulldcwine/drive_c/"Program Files"/nulldc103/nullDC_1.0.3_nommu.exe
Segmentation fault (core dumped)
This method has worked flawlessly for me in the past in 32-bit Fedora - What am I doing wrong in 64-bit?
mogorva
Level 4
Level 4
Posts: 107
Joined: Fri Oct 16, 2009 10:27 am

Post by mogorva »

You have to patch the source with this patch: http://www.winehq.org/pipermail/wine-pa ... 91490.html

The patch is needed if you want to compile and run successfully any Wine versions prior to 1.3.0 on Fedora 14.

Here's the corresponding Redhat bugzilla page: https://bugzilla.redhat.com/show_bug.cgi?id=617968
Giles
Level 1
Level 1
Posts: 5
Joined: Tue Mar 01, 2011 10:34 am

Post by Giles »

Thankyou, that's fantastically helpful! I won't have a chance to test this for a couple of days, but i'll let you know how I get on :)
Giles
Level 1
Level 1
Posts: 5
Joined: Tue Mar 01, 2011 10:34 am

Post by Giles »

Well, it's got on a bit now, so I don't know if I should start a new thread. Anyway, I applied the patch but still seems to be running into problems.

This is what I've done:
After downloading version 1.1.0 from sourceforge I saved the following as "winepatch.diff":

Code: Select all

---
 loader/preloader.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/loader/preloader.c b/loader/preloader.c
index 83a5172..2dc2872 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -519,7 +519,7 @@ static void set_auxiliary_values( ElfW(auxv_t) *av, const ElfW(auxv_t) *new_av,
     }
     else if (new_count < delete_count)  /* get rid of unused values */
     {
-        int len = (char *)(av + av_count + 1) - dst;
+        int len = (char *)(av + av_count + 1) - src;
         for (i = len - 1; i >= 0; i--) dst[i] = src[i];
     }
     *stack = dst;
---
in wine source directory I typed:

Code: Select all

$ patch -p1 < winepatch.diff

and this seemed to patch the code okay.

I built wine in the usual way:

Code: Select all

./configure --prefix "/home/mythtv/.oldwine" && make depend && make &&  make install 
however this generated the following error during build.

Code: Select all

gcc -m32 -c -I. -I. -I../../include -I../../include -I/usr/include/freetype2  -D__WINESRC__ -D_GDI32_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wtype-limits -Wpointer-arith  -g -O2  -o freetype.o freetype.c
freetype.c:166:14: error: ‘FT_MulFix’ undeclared here (not in a function)
freetype.c:166:1: warning: type defaults to ‘int’ in declaration of ‘pFT_MulFix’
freetype.c: In function ‘WineEngGetOutlineTextMetrics’:
freetype.c:5113:27: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5114:28: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5115:36: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5124:28: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5124:28: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5128:36: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5132:36: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5212:40: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5213:41: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5214:41: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5215:46: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5216:42: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5217:48: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5218:49: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5219:47: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5220:50: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5225:51: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5226:51: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5227:53: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5228:53: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5229:53: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5230:53: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5231:55: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5232:55: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5233:48: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5234:52: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5239:53: error: called object ‘pFT_MulFix’ is not a function
freetype.c:5240:50: error: called object ‘pFT_MulFix’ is not a function
make[2]: *** [freetype.o] Error 1
make[2]: Leaving directory `/home/mythtv/wine-1.1.0/dlls/gdi32'
make[1]: *** [gdi32] Error 2
make[1]: Leaving directory `/home/mythtv/wine-1.1.0/dlls'
make: *** [dlls] Error 2
I tried to reinstall the relevant freetype directories, but this had no effect.

Code: Select all

$sudo yum reinstall freetype.i686 freetype-devel.i686 freetype-devel
I've sat on the problem for awhile I know, but I'm now once again in a position where I need an older version of wine!
mogorva
Level 4
Level 4
Posts: 107
Joined: Fri Oct 16, 2009 10:27 am

Post by mogorva »

Giles
Level 1
Level 1
Posts: 5
Joined: Tue Mar 01, 2011 10:34 am

Post by Giles »

Brilliant! that works! Thankyou for your help :D
Locked