Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#13000 closed defect (fixed)

wine build incompatible with Xcode 3.1 / iPhone SDK

Reported by: tannhaus@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), wsiegrist@…, jason@…, keithpk@…, chosenken@…, Gordon.Child@…, meissnem@…
Port: wine, wine-devel

Description

All the dependencies for wine are now compiling nicely, but I keep running into this when I try to compile wine:

../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./crtdll.spec    crtdll_main.o         -o crtdll.dll.so  -lmsvcrt -lkernel32   ../../libs/port/libwine_port.a -L/opt/local/lib -framework CoreServices -lz 
./crtdll.spec:44: external symbol 'CRTDLL__basemajor_dll' is not a function
./crtdll.spec:45: external symbol 'CRTDLL__baseminor_dll' is not a function
./crtdll.spec:46: external symbol 'CRTDLL__baseversion_dll' is not a function
./crtdll.spec:66: external symbol 'CRTDLL__cpumode_dll' is not a function
./crtdll.spec:243: external symbol 'CRTDLL__osmajor_dll' is not a function
./crtdll.spec:244: external symbol 'CRTDLL__osminor_dll' is not a function
./crtdll.spec:245: external symbol 'CRTDLL__osmode_dll' is not a function
./crtdll.spec:247: external symbol 'CRTDLL__osversion_dll' is not a function
winegcc: ../../tools/winebuild/winebuild failed.
make[2]: *** [crtdll.dll.so] Error 2
make[1]: *** [crtdll] Error 2
make: *** [dlls] Error 2

Error: Status 1 encountered during processing.

Change History (57)

comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: tannhaus@… ryandesign@… added
Milestone: Port Bugs
Owner: changed from macports-dev@… to ryandesign@…
Summary: wine won't compile with leopardwine 0.9.47_0 won't compile with leopard

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I've updated wine to 0.9.48_0. If that still doesn't work for you, could you please file a bug with the Wine developers? I'd do it, but I'd just end up being a middle-man, since I don't have Leopard so I can't reproduce the issue.

comment:3 Changed 17 years ago by tannhaus@…

It's still showing 0.9.47 for me. I've done sudo port -v selfupdate twice and sudo port sync wine twice....still shows 0.9.47

comment:4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Sources from the Subversion repository are only synced with the rsync server every half hour, and the portindex is only regenerated every 12 hours. It has been an hour since I committed r30537 with the update to 0.9.48, so you can just force the update and it'll work, even if the portindex isn't updated yet.

sudo port -nf upgrade wine

comment:5 Changed 17 years ago by tannhaus@…

Thank you very much. It's hit the servers now.

I think it's a problem with the Portfile and not with wine though, unfortunately. So, their developers would probably close the bug report and send me back here.

I copied the winexxxx.tar.gz from distfile. I unzipped it and ran the following:

./configure --prefix=/opt/local
make depend && make

just like it says to do. It compiled with no problems whatsoever. So, something in the portfile is bombing it.

comment:6 Changed 17 years ago by tannhaus@…

and that was with 0.9.48

comment:7 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Well I don't see anything weird in the portfile so I'm not sure what to change. Do you have any suggestions?

When you install wine using MacPorts (from trunk, anyway), it's doing this:

CFLAGS='-O2' \
CPPFLAGS='-I/opt/local/include' \
CXXFLAGS='-O2' \
CPP='/usr/bin/cpp-4.0' \
CXX='/usr/bin/g++-4.0' \
F90FLAGS='-O2' \
LDFLAGS='-L/opt/local/lib -framework CoreServices -lz' \
FCFLAGS='-O2' \
OBJC='/usr/bin/gcc-4.0' \
INSTALL='/usr/bin/install' \
OBJCFLAGS='-O2' \
FFLAGS='-O2' \
CC='/usr/bin/gcc-4.0' \
./configure --prefix=/opt/local --x-includes=/usr/X11R6/include/

make depend all

Does it work if you run that manually?

comment:8 Changed 17 years ago by tannhaus@…

It does appear to work running that manually

comment:9 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Then I'm having a hard time understanding why installing it through MacPorts wouldn't work.

Do you have a version of wine already installed with MacPorts? If so, remove it first: sudo port -f uninstall wine . Then clean wine: sudo port clean --work wine . Then try again.

If that's not it: Do you have Fink installed, e.g. in /sw? If so, move Fink out of the way and try again.

If that's not it: Do you have any software installed in /usr/local? If so, move that out of the way then try again.

If that's not it: Did you have MacPorts and Mac OS X 10.4 installed on this machine and then upgrade to Leopard, or did you install MacPorts for the first time after installing Leopard? If the former, try removing MacPorts and installing it again, so that everything in your MacPorts installation builds with Xcode 3 and is linked with Leopard versions of libraries instead of Tiger versions. Instructions for removing MacPorts are in the FAQ.

comment:10 Changed 17 years ago by tannhaus@…

I removed MacPorts before upgrading. Also, I built macports from source. This is what I did last night:

I completely deleted /opt/local. Then, instead of building macports from source again, I installed the 10.5 package. I ran "sudo port -v install wine". All the dependencies built without a problem, but wine bombed and gave me the exact same error as before.

I don't have fink or anything else installed on this machine. The only programs that are not regular mac programs are macports.

comment:11 Changed 17 years ago by wsiegrist@…

Cc: wsiegrist@… added

comment:12 Changed 17 years ago by wsiegrist@…

For what its worth, I reinstalled from the 10.5 pkg as well, ran selfupdate and install wine, and also got the same error message as tannhaus. I also do not have fink. I do have stuff in /usr/local, but I didnt purposefully install anything there, so I imagine its all default Leopard or leftover Tiger pieces?

comment:13 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

wsiegrist: thanks for confirming that.

What do you have in /usr/local? Apple has never put anything in /usr/local in 10.4 or before, and I'd be surprised if they started putting things there in 10.5 since it is, by definition, a place for the sysadmin to install software locally.

Also, can you build wine manually, as tannhaus could? (See above.)

comment:14 Changed 17 years ago by wsiegrist@…

/usr/local/ is just some apple development stuff. I can make wine using either of the steps above.

comment:15 Changed 17 years ago by tannhaus@…

same here...my /usr/local contains the following:

include/fuse.h include/ulockmgr.h include/fuse/ with several fuse*.h files

lib/libfuse* lib/libulockmgr.dylib lib/pkgconfig/fuse.pc lib/libulockmgr.1.dylib lib/libfuse.la lib/libulockmgr.la

OpenSourceLicenses/RemoteDesktop.txt

OpenSourceVersions/RemoteDesktop.plist

but, even if I mv /usr/local /usr/local-bak it doesn't change anything. I still get the same error when I try to compile

comment:16 Changed 17 years ago by afb@…

Confirmed.

Source code says:

/* The following data items are not exported from msvcrt */
unsigned int CRTDLL__basemajor_dll;
unsigned int CRTDLL__baseminor_dll;
unsigned int CRTDLL__baseversion_dll;
unsigned int CRTDLL__cpumode_dll;
unsigned int CRTDLL__osmajor_dll;
unsigned int CRTDLL__osminor_dll;
unsigned int CRTDLL__osmode_dll;
unsigned int CRTDLL__osversion_dll;

So I'm not sure why winegcc can't find them...

comment:17 Changed 17 years ago by afb@…

make all works. port build doesn't. (on the same worksrc directory)

comment:18 Changed 17 years ago by afb@…

the ld command is bombing out because MacPorts doesn't set SHELL

comment:19 Changed 17 years ago by afb@…

or maybe not just SHELL, but something about the environment anyway

comment:20 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dsh@… added

comment:21 Changed 17 years ago by tannhaus@…

Still the same problems with 0.9.49

Exact same errors.

comment:22 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jason@… added

comment:23 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I don't know what environment variable wine needs to be happy. I'm also not sure I know how to set that environment variable so that wine will see it. If someone can research those things, I would be grateful.

comment:24 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #13380, which includes a workaround which should work for wine 0.9.49 and earlier.

Note that with wine 0.9.50 we're seeing a whole different error which will be handled separately in #13488.

comment:25 Changed 17 years ago by darenzana@…

I also have this problem with wine 0.9.51 and Leopard 10.5.1

comment:26 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

wine is updated to 0.9.52, and I was able to build and install it with no problems on Leopard, so I hope this problem is fixed. If you still see the problem with 0.9.52, please reopen this ticket.

comment:27 Changed 17 years ago by scott@…

Resolution: fixed
Status: closedreopened

Hello! Unfortunately this (or something very similar) seems to be back. Trying to install Wine 0.9.61 on Leopard 10.5.2. The error looks identical to the one originally reported above.

comment:28 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Can you determine which version of wine reintroduced this error? I'll see if I can get access to a Leopard machine to test it myself...

comment:29 in reply to:  28 Changed 17 years ago by scott@…

Replying to ryandesign@macports.org:

Can you determine which version of wine reintroduced this error? I'll see if I can get access to a Leopard machine to test it myself...

Not sure... don't think it is 0.9.61, because I did try rolling back to 0.9.59 by using an old portfile, clearing everything out, and doing a 'port install wine'... same error. I was way behind on my updates before this, so I'm not sure exactly when it happened (in trying to work past this I removed all vestiges of my old Wine install, so I don't remember exactly what version I was on... my bad. I'd guess somewhere in the lower or middle 0.9.5x range.)

comment:30 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I've now been able to test with Leopard. I tested every version of wine from 0.9.44 through 1.0-rc1 and I experienced the issue with every version. (Didn't test earlier versions.) But as I said in comment 26 I was able to install wine 0.9.52 on a Leopard machine before. So what's different?

The machine on which I was able to install wine 0.9.52 in December 2007 ("Cathy's Mac") was a rev 3 (Santa Rosa) 17" MacBook Pro with Xcode 3. I don't remember what version of Leopard, but 10.5.1 was released in November 2007 and 10.5.2 was in February 2008, so let's assume it was 10.5.1.

The machine on which I've just been unable to install wine 0.9.44 through 1.0-rc1 is a rev 2 (ATI) 15" MacBook Pro with the iPhone SDK beta 5 (a.k.a. Xcode 3.1) on 10.5.2. Xcode 3 had never been installed.

Also noteworthy: I tried to make wine manually as described in comment 5 but it didn't work for me. I also tried using the recipe from comment 7, which was said to work in comments 8 and 14, but that didn't work either. Finally, I tried the workaround listed in ticket 13380, which also didn't work. All attempts produced the error initially described in this ticket.

To everyone who has tried to install wine on Leopard, whether successful or unsuccessful: what Mac do you have; what version of Leopard do you have; what version of wine did you use; did you install Xcode 3 or the iPhone SDK and if the latter, which version, and did you previously have Xcode 3 (or any previous iPhone SDK betas) installed; and finally did the wine install succeed or fail? If it failed, have you ever been able to install wine on this machine with Leopard before? If so, what version and what's different with your computer now? Anything else you can think of, let me know.

Grrr.... 10.5.2 and iPhone SDK couldn't be the problem... they weren't around when this ticket was filed. I just don't know!

comment:31 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Of course you always think of one last thing right after clicking Submit. My 15" MacBook Pro had Leopard 10.5.0 installed onto a blank external hard drive and then had updates applied by downloading from the Apple Software Updates web site. Cathy's Mac was shipped right after Leopard was released, and came with Tiger on the hard drive and was updated to 10.5.0 right away via a Leopard upgrade DVD that came with it, with updates applied via the automatic Software Update program.

To add to my questions above: How did you get Leopard on your machine -- via a clean install or via upgrade from Tiger? If the latter, did you have Xcode 2.x installed on Tiger, and if so, did you uninstall it using Apple's uninstall script before installing the new Xcode or did you install the new Xcode on top of the old one?

comment:32 Changed 17 years ago by scott@…

Sounds like a mystery... here are my answers to your questions.

MacBook Pro 15" 2.16ghz Core2Duo

Leopard 12.5.1

I DO indeed have the iPhone SDK installed (most recent version; beta 5)

Wine is failing now; but I had previously been able to install (not sure what combination I was on when it used to work; probably Leopard 10.5.1 and before the iPhone SDK [but I did have Xcode3 installed previous to installing the iPhone SDK]).

And finally, I installed Leopard 10.5.0 as an upgrade from a 10.4 install. I did NOT run the uninstall script for Xcode, just installed over it.

comment:33 Changed 17 years ago by scott@…

That's Leopard 10.5.2 as my current version...... not sure what my fingers were doing when I typed that line ;-)

comment:34 Changed 17 years ago by keithpk@…

I have confirmed that this is an issue with iPhone SDK beta. I had the most recent version of the iPhone SDK installed on my machine and was having the same problems compiling, as outlined in this ticket. I then followed the instructions in /Developer/About Xcode Tools.pdf to uninstall the SDK/developer tools:

sudo /Developer/Library/uninstall-devtools --mode=all

I then re-installed the Xcode Tools from my Leopard DVD, and everything now works fine. Looking at the iPhone releases (http://www.opensource.apple.com/darwinsource/ see "iPhone" section in bottom right), it looks like they have been consistently upgrading the version of GCC that they use:

  • iPhone SDK Beta 2: 5470.3
  • iPhone SDK Beta 3: 5479
  • iPhone SDK Beta 4: 5482
  • iPhone SDK Beta 5: 5483

I'm not sure exactly which version of the iPhone SDK broke wine compilation, as I havn't re-built from sources for a while now. Unfortunately, it looks like apple has taken down previous versions of the SDK, however, if someone could get their hands on them, it would be great if we could isolate which version of the SDK breaks wine and file a bug report with Apple.

comment:35 Changed 17 years ago by keithpk@…

Cc: keithpk@… added

Cc Me!

comment:36 in reply to:  description Changed 17 years ago by chosenken@…

Just wanted to add that I too am having this issue. I was able to compile wine with out issue until I installed the iPhone SDK Beta 5, which keithpk pointed out. If I had my Time Machine HD plugged in, I would see what version of GCC was used before this, but it is currently packed (moving to new job). Also, if I could be CC'd to. Thanks!

comment:37 Changed 17 years ago by chosenken@…

Just checked the sources, and it appears that XCode 3.0 used GCC version 5465.

comment:38 Changed 17 years ago by scott@…

Yeah, that seems to be it. I uninstalled the iPhone SDK and then reinstalled Xcode 3.0 from the Leopard DVD (as recommended by keithpk@…), then Wine built without a hitch. I think we've found the culprit.

comment:39 Changed 17 years ago by tannhaus@…

Cc: tannhaus@… removed

Cc Me!

comment:40 Changed 17 years ago by chosenken@…

Cc Me!

comment:41 Changed 17 years ago by skymoo (Adam Mercer)

Cc: chosenken@… added

comment:42 Changed 16 years ago by Gordon.Child@…

Cc: Gordon.Child@… added

Cc Me!

comment:43 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: wine 0.9.47_0 won't compile with leopardwine build incompatible with iPhone SDK

Confirmed. wine doesn't build with iPhone SDK beta 5 or beta 6 installed (did not try earlier versions), builds fine with Xcode 3.0. I filed a bug with the wine developers.

comment:44 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

The wine developers think it's Apple's problem so I filed rdar://problem/5979712

comment:45 Changed 16 years ago by Gordon.Child@…

Issue still exists in the latest version of iPhone SDK. WWDC08/beta 7 sdk. tried install after a port clean --work wine. Still error'd.

comment:46 Changed 16 years ago by meissnem@…

Cc: meissnem@… added

Cc Me!

comment:47 Changed 16 years ago by daniel@…

iPhone SDK Beta 8 (gcc build 5484): Issue is still present! iMac 2.4 GHz (may 2008 model) OS X 10.5.4

comment:48 Changed 16 years ago by gravydish@…

I was able to fix this by initializing variables in dlls/crtdll/crtdll_main.c, @line 40:

from:

unsigned int CRTDLL__basemajor_dll;
unsigned int CRTDLL__baseminor_dll;
unsigned int CRTDLL__baseversion_dll;
unsigned int CRTDLL__cpumode_dll;
unsigned int CRTDLL__osmajor_dll;
unsigned int CRTDLL__osminor_dll;
unsigned int CRTDLL__osmode_dll;
unsigned int CRTDLL__osversion_dll;

to:

unsigned int CRTDLL__basemajor_dll=0;
unsigned int CRTDLL__baseminor_dll=0;
unsigned int CRTDLL__baseversion_dll=0;
unsigned int CRTDLL__cpumode_dll=0;
unsigned int CRTDLL__osmajor_dll=0;
unsigned int CRTDLL__osminor_dll=0;
unsigned int CRTDLL__osmode_dll=0;
unsigned int CRTDLL__osversion_dll=0;

Compilation then contiunes down to msvcrt.dll, where it bombs with similar errors. Again, initializing uninitialized variables seems to allow the compiler to continue.

I would agree it's probably a compiler issue.

comment:49 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dsh@… removed

comment:50 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Issue remains with Xcode 3.1 final / iPhone SDK final. Apple has yet to respond to my Radar bug report. I've pinged them again to request a comment.

@gravydish: Thanks for the hint on working around this. I'll see if I can write a patch for the wine port.

comment:51 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: wine build incompatible with iPhone SDKwine build incompatible with Xcode 3.1 / iPhone SDK

comment:52 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Partial fix committed to wine-devel port in r38484. For every variable causing the "not a function" message I added "=0" to its definition. But I don't know how to continue from here. I now have these errors:

./msvcrt.spec:88: external symbol 'MSVCRT___argv' is not a function
./msvcrt.spec:107: external symbol 'MSVCRT___lc_handle' is not a function
./msvcrt.spec:152: external symbol 'MSVCRT___wargv' is not a function
./msvcrt.spec:157: external symbol 'MSVCRT__acmdln' is not a function
./msvcrt.spec:297: external symbol 'MSVCRT__iob' is not a function
./msvcrt.spec:364: external symbol 'MSVCRT_mbctype' is not a function
./msvcrt.spec:512: external symbol 'MSVCRT__wcmdln' is not a function

And none of these are simple variables. Some are pointers to variables or pointers to pointers to variables, or arrays. I don't know how to change their definition to make Xcode 3.1 happy. Help is welcomed.

comment:53 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

wine 1.1.2 has been released which seems to fix the issue entirely without the need for a patch. This is a development version of wine, so wine has not being updated, but wine-devel has been updated to 1.1.2 in r38644. So if you're using Xcode 3.1, use the wine-devel port instead of the wine port, until wine 1.2.0 is released and the wine port is updated.

comment:54 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

wine 1.0 is now fixed as well in r39271.

comment:55 in reply to:  54 Changed 16 years ago by mkosnik@…

Replying to ryandesign@…:

wine 1.0 is now fixed as well in r39271.

As far as my experience is concerned... wine 1.0 is not fixed.

I am running Mac OS X 10.5.5 / xCode 3.1 / Mac Ports 1.6 and I tried to install wine (1.0), but experienced the errors listed here. Installing wine-devel seems to work (it installed without errors & appears to be running the Australian etax-2008 software).

comment:56 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Port: wine wine-devel added

I just confirmed again that wine 1.0 is fixed. I applied a fix for the issue in r39271 as stated. Please make sure your ports tree is up to date: do "sudo port sync" and try again. According to the upstream bug, the fix has been nominated for inclusion in wine 1.0.1 as well (then we can revert r39271).

comment:57 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.