I've been trying to build Wine (20031118) on a G4 PowerBook running OS X 10.3.1. The first problem occurs during configure: checking for XF86VidModeQueryExtension in -lXxf86vm... yes checking for XRRSetScreenConfigAndRate in -lXrandr... yes checking for XvShmCreateImage in -lXv... yes configure: error: /usr/X11R6/lib/libGL.a is present on your system. This prevents linking to OpenGL. Delete the file and restart configure. Apparently the presence of the GL static library prevents linking to it... A bit nonsensical, but easily fixed by moving the file somewhere else. The second problem, which I haven't figured out how to fix and is keeping me from building Wine occurs while building libwine_unicode.so, and all the other *shared* libs as well (checked using make -k, and everything else links just fine). Here is make grinding to a halt: casemap.o collation.o compose.o cptable.o fold.o mbtowc.o sortkey.o string.o utf8.o wctomb.o wctype.o c_037.o c_042.o c_424.o c_437.o c_500.o c_737.o c_775.o c_850.o c_852.o c_855.o c_856.o c_857.o c_860.o c_861.o c_862.o c_863.o c_864.o c_865.o c_866.o c_869.o c_874.o c_875.o c_878.o c_932.o c_936.o c_949.o c_950.o c_1006.o c_1026.o c_1250.o c_1251.o c_1252.o c_1253.o c_1254.o c_1255.o c_1256.o c_1257.o c_1258.o c_10000.o c_10006.o c_10007.o c_10029.o c_10079.o c_10081.o c_20866.o c_20932.o c_28591.o c_28592.o c_28593.o c_28594.o c_28595.o c_28596.o c_28597.o c_28598.o c_28599.o c_28600.o c_28603.o c_28604.o c_28605.o c_28606.o -lm -o libwine_unicode.so.1 make[2]: casemap.o: Command not found make[2]: *** [libwine_unicode.so.1] Error 127 make[1]: *** [unicode] Error 2 make: *** [libs] Error 2 Inspection of the Makefile reveals that LDSHARED is set to nothing: IMPLIBEXT = def LDSHARED LDDLL I don't know why this occurs or how to fix it. If I figure something out I'll post it here, but does anybody know what's up, or has anybody had any luck building Wine on OS X? Thanks, Jason
> I don't know why this occurs or how to fix it. If I figure something out > I'll post it here, but does anybody know what's up, or has anybody had any > luck building Wine on OS X?Well, this appears to have been resolved in the 20031212 release. However, now I am having a different problem. Once again, make: gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -DBINDIR="\"/usr/bin\"" -DDLLDIR="\"/usr/lib/wine\"" -D_REENTRANT -fPIC -Wall -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -ffixed-r13 -no-cpp-precomp -D__powerpc__ -o port.o port.c gcc -dynamiclib config.o debug.o ldt.o loader.o port.o -L../../libs/port -lwine_port -lpoll -lm -o libwine.1.dylib ld: Undefined symbols: _environ /usr/bin/libtool: internal link edit command failed make[2]: *** [libwine.1.dylib] Error 1 make[1]: *** [wine] Error 2 make: *** [libs] Error 2 It can't resolve _environ when -dynamiclib is specified. Apparently environ doesn't link right on dylib's on Mac OS. Many sources on the internet suggest using _NSGetEnviron() instead, as in: #ifdef __APPLE__ #include <crt_externs.h> char **environ = *_NSGetEnviron(); #else extern char **environ; #endif This works just fine and all the libraries link. So, yet another problem. The toplevel lib Makefile doesn't like the fact that the .dylib's are built in the specific lib directories rather than in wine/libs. Creating symbolic links to the libs by hand works just fine. From wine/libs, after building the libs: ln -s wine/libwine.dylib libwine.dylib ln -s unicode/libwine_unicode.dylib libwine_unicode.dylib It is only those two that need links. port, uuid, and wpp are all linked to correctly from libs already, for some reason. Next problem (sigh): The symbols _getopt, _opterr, _optind, and _optopt are multiply defined in both libwine_port and libSystem. This problem was encountered when linking tools/wrc. My solution was to manually #define ELIDE_CODE in libs/port/getopt.c and libs/port/getopt1.c. This prevented the "custom" getopt code from being compiled into the library and fixed all the problems. The above "fixes" allowed me to continue the build, which is apparently working correctly now. I am currently waiting for it to finish and will post anything else if it comes up. Sorry, but I don't understand enough about how this stuff works to make an "official" patch. Hopefully somebody else will take care of these issues. Jason
Ivan Leo Murray-Smith
2003-Dec-25 09:45 UTC
Missing LDSHARED in Makefiles; build problems.
> I've been trying to build Wine (20031118) on a G4 PowerBook running OS X > 10.3.1.Before looking into the problem, are you aware that wine will NOT run windows binaries on Mac OS? Ivan.
Ivan Leo Murray-Smith
2003-Dec-26 06:42 UTC
Missing LDSHARED in Makefiles; build problems.
>I don't know why this occurs or how to fix it. If I figure something out >I'll post it here, but does anybody know what's up, or has anybody had any >luck building Wine on OS X?Someone has, have a look at http://www.winehq.org/hypermail/wine-devel/2003/07/0326.html Send him an email, he may be able to give you some hints. Ivan.