Hi,
I too am trying to compile a working multilib wine. I have got a little further, and actually have a binary that doesn't produce any errors now. Unfortunately, it doesn't seem to do anything at all, and just returns me to the command line with an exit status of 2. I've yet to dig into that one.
For reference, I am using gentoo with a multilib gcc, applying the attached patch and then running this sequence of commands:
autoconf ./configure --x-libraries=/emul/linux/x86/usr/X11R6/lib make depend && make
The small patch I've attached fixes the two problems I came across - one already mentioned by Gabriel de Perthuis. That problem appears to be one of a deprecated? syscall. The other problem is that configure was not detecting x86_64 as being an x86 and hence not building the wine-preloader which is why Gabriel was getting his strange 'wine: could not exec \uffff\uffffmU\uffff\uffffmUp/bin/wine-pthread' message. Should I send the patch to wine-patches also? Or can it make its way into CVS from here?
I'm going to see if I can track down which exit(2) I'm hitting now. I'm new to the wine source code, so any suggestions are welcome.
I suppose I should have actually attached the patch too..
On Mon, Feb 07, 2005 at 12:02:37PM +0000, Alex Woods wrote:
I too am trying to compile a working multilib wine. I have got a little further, and actually have a binary that doesn't produce any errors now. Unfortunately, it doesn't seem to do anything at all, and just returns me to the command line with an exit status of 2. I've yet to dig into that one.
I've got to the bottom of this issue now. It seems that the syscalls have been renumbered, eg:
x86_64: asm/unistd.h:#define __NR_write 1 i386: asm/unistd.h:#define __NR_exit 1
So when the wine-preloader was trying to perform a write, it ended up exiting instead. I moved /usr/include out of the way, and linked it up to the /usr/include from another machine and rebuilt (no SYS_sigaction patch required now). This gets me further, and wine is actually trying to do things, but it's failing horribly. It segfaults, unless I compile with -g, in which case it just does this repeatedly:
wine: Unhandled exception (thread 000b), starting debugger... wine: Unhandled exception (thread 000d), starting debugger... wine: Unhandled exception (thread 000f), starting debugger...
Here's some output with all the debugging on. It means nothing to me right now, but maybe someone can shed some light on what is going wrong:
$ WINEDEBUG="+all" notepad sock_init: shutdown() causes EOF wineserver: starting (pid=26953) 0008: *fd* (nil) -> 17 0009: *fd* 6 <- 17 0009: init_thread( unix_pid=26948, unix_tid=-1, teb=0x5572e000, entry=(nil), reply_fd=6, wait_fd=8 ) 0009: *fd* 8 <- 18 0009: init_thread() = 0 { pid=0008, tid=0009, boot=1, version=153 } 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x5572e000 00001f98 80000000 00000040 View: 0x5572e000 - 0x5572ffff (anonymous) 0x5572e000 - 0x5572ffff c-rwx 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 00110000 2000 00000040 View: 0x55890000 - 0x5599ffff (anonymous) 0x55890000 - 0x5599ffff --rwx 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x55890000 00010000 1000 00000040 0009:trace:virtual:VIRTUAL_SetProt 0x55890000-0x5589ffff c-rwx View: 0x55890000 - 0x5599ffff (valloc) 0x55890000 - 0x5589ffff c-rwx 0x558a0000 - 0x5599ffff --rwx 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000018): returning 55890098 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000050): returning 558900b8 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000018): returning 55890110 0009:trace:heap:RtlFreeHeap (0x55890000,00000002,55890098): returning TRUE 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x556c0000 0006e000 81000000 00000080 View: 0x556c0000 - 0x5572dfff (anonymous) 0x556c0000 - 0x5572dfff c-rWx 0009:trace:module:load_builtin_callback loaded ntdll.dll 0x558900b8 0x556c0000 0009: load_dll( handle=(nil), base=0x556c0000, size=450560, dbg_offset=0, dbg_size=0, name=0x558900e0, filename=L"ntdll.dll" ) 0009: load_dll() = 0 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000020): returning 55890130 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000050): returning 55890158 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000020): returning 558901b0 0009:trace:heap:RtlFreeHeap (0x55890000,00000002,55890130): returning TRUE 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x559d0000 000fd000 81000000 00000080 View: 0x559d0000 - 0x55accfff (anonymous) 0x559d0000 - 0x55accfff c-rWx 0009:trace:heap:RtlAllocateHeap (0x55890000,00000002,00000018): returning 55890130 0009:trace:module:load_dll looking for L"ntdll.dll" in L"" 0009:trace:module:load_dll Found loaded module L"ntdll.dll" for L"ntdll.dll" at 0x556c0000, count=1 0009:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x55abbee8 00000310 00000008 0009:trace:virtual:VIRTUAL_SetProt 0x55abb000-0x55abcfff c-rW- View: 0x559d0000 - 0x55accfff (system) 0x559d0000 - 0x55abafff c-rWx 0x55abb000 - 0x55abcfff c-rW- 0x55abd000 - 0x55accfff c-rWx 0009:trace:module:import_dll --- LdrAccessResource ntdll.dll.32 = 0x55726eb0 0009:trace:module:import_dll --- LdrDisableThreadCalloutsForDll ntdll.dll.33 = 0x55726ec0 0009:trace:module:import_dll --- LdrFindEntryForAddress ntdll.dll.35 = 0x55726ee0 0009:trace:module:import_dll --- LdrFindResourceDirectory_U ntdll.dll.36 = 0x55726ef0 0009:trace:module:import_dll --- LdrFindResource_U ntdll.dll.37 = 0x55726f00 0009:trace:module:import_dll --- LdrGetDllHandle ntdll.dll.39 = 0x55726f20 0009:trace:module:import_dll --- LdrGetProcedureAddress ntdll.dll.40 = 0x55726f30 0009:trace:module:import_dll --- LdrInitializeThunk ntdll.dll.42 = 0x55726f50 0009:trace:module:import_dll --- LdrLoadDll ntdll.dll.44 = 0x55726f70 0009:trace:module:import_dll --- LdrLockLoaderLock ntdll.dll.45 = 0x55726f80 0009:trace:module:import_dll --- LdrShutdownProcess ntdll.dll.51 = 0x55726fe0 0009:trace:module:import_dll --- LdrShutdownThread ntdll.dll.52 = 0x55726ff0 0009:trace:module:import_dll --- LdrUnloadDll ntdll.dll.54 = 0x55727010 0009:trace:module:import_dll --- LdrUnlockLoaderLock ntdll.dll.55 = 0x55727020 0009:trace:module:import_dll --- MODULE_DllThreadAttach ntdll.dll.57 = 0x55727040 0009:trace:module:import_dll --- MODULE_GetLoadOrderW ntdll.dll.58 = 0x55727050 0009:trace:module:import_dll --- NtAllocateVirtualMemory ntdll.dll.73 = 0x55727140 0009:trace:module:import_dll --- NtCancelTimer ntdll.dll.76 = 0x55727170 0009:trace:module:import_dll --- NtClose ntdll.dll.78 = 0x55727190 0009:trace:module:import_dll --- NtCreateEvent ntdll.dll.84 = 0x557271f0 0009:trace:module:import_dll --- NtCreateFile ntdll.dll.86 = 0x55727210 0009:trace:module:import_dll --- NtCreateKey ntdll.dll.88 = 0x55727230 0009:trace:module:import_dll --- NtCreateMutant ntdll.dll.90 = 0x55727250 0009:trace:module:import_dll --- NtCreateSection ntdll.dll.96 = 0x557272b0 0009:trace:module:import_dll --- NtCreateSemaphore ntdll.dll.97 = 0x557272c0 0009:trace:module:import_dll --- NtCreateTimer ntdll.dll.100 = 0x557272f0 0009:trace:module:import_dll --- NtCurrentTeb ntdll.dll.102 = 0x55727310 0009:trace:module:import_dll --- NtDelayExecution ntdll.dll.103 = 0x55727320 0009:trace:module:import_dll --- NtDeleteFile ntdll.dll.105 = 0x55727340 0009:trace:module:import_dll --- NtDeviceIoControlFile ntdll.dll.108 = 0x55727370 0009:trace:module:import_dll --- NtDuplicateObject ntdll.dll.110 = 0x55727390 0009:trace:module:import_dll --- NtEnumerateKey ntdll.dll.113 = 0x557273c0 0009:trace:module:import_dll --- NtEnumerateValueKey ntdll.dll.114 = 0x557273d0 0009:trace:module:import_dll --- NtFlushBuffersFile ntdll.dll.117 = 0x55727400 0009:trace:module:import_dll --- NtFlushInstructionCache ntdll.dll.118 = 0x55727410 0009:trace:module:import_dll --- NtFlushVirtualMemory ntdll.dll.120 = 0x55727430 0009:trace:module:import_dll --- NtFreeVirtualMemory ntdll.dll.122 = 0x55727450 0009:trace:module:import_dll --- NtGetContextThread ntdll.dll.124 = 0x55727470 0009:trace:module:import_dll --- NtLockFile ntdll.dll.134 = 0x55727510 0009:trace:module:import_dll --- NtLockVirtualMemory ntdll.dll.135 = 0x55727520 0009:trace:module:import_dll --- NtMapViewOfSection ntdll.dll.137 = 0x55727540 0009:trace:module:import_dll --- NtOpenEvent ntdll.dll.141 = 0x55727580 0009:trace:module:import_dll --- NtOpenFile ntdll.dll.143 = 0x557275a0 0009:trace:module:import_dll --- NtOpenKey ntdll.dll.145 = 0x557275c0 0009:trace:module:import_dll --- NtOpenMutant ntdll.dll.146 = 0x557275d0 0009:trace:module:import_dll --- NtOpenSection ntdll.dll.150 = 0x55727610 0009:trace:module:import_dll --- NtOpenSemaphore ntdll.dll.151 = 0x55727620 0009:trace:module:import_dll --- NtOpenTimer ntdll.dll.155 = 0x55727660 0009:trace:module:import_dll --- NtProtectVirtualMemory ntdll.dll.161 = 0x557276c0 0009:trace:module:import_dll --- NtPulseEvent ntdll.dll.162 = 0x557276d0 0009:trace:module:import_dll --- NtQueryAttributesFile ntdll.dll.163 = 0x557276e0 0009:trace:module:import_dll --- NtQueryDefaultLocale ntdll.dll.164 = 0x557276f0 0009:trace:module:import_dll --- NtQueryDefaultUILanguage ntdll.dll.165 = 0x55727700 0009:trace:module:import_dll --- NtQueryDirectoryFile ntdll.dll.166 = 0x55727710 0009:trace:module:import_dll --- NtQueryFullAttributesFile ntdll.dll.170 = 0x55727750 0009:trace:module:import_dll --- NtQueryInformationFile ntdll.dll.171 = 0x55727760 0009:trace:module:import_dll --- NtQueryInformationProcess ntdll.dll.173 = 0x55727780 0009:trace:module:import_dll --- NtQueryInformationThread ntdll.dll.174 = 0x55727790 0009:trace:module:import_dll --- NtQueryInstallUILanguage ntdll.dll.176 = 0x557277b0 0009:trace:module:import_dll --- NtQuerySystemTime ntdll.dll.190 = 0x55727890 0009:trace:module:import_dll --- NtQueryValueKey ntdll.dll.193 = 0x557278c0 0009:trace:module:import_dll --- NtQueryVirtualMemory ntdll.dll.194 = 0x557278d0 0009:trace:module:import_dll --- NtQueryVolumeInformationFile ntdll.dll.195 = 0x557278e0 0009:trace:module:import_dll --- NtQueueApcThread ntdll.dll.196 = 0x557278f0 0009:trace:module:import_dll --- NtRaiseException ntdll.dll.197 = 0x55727900 0009:trace:module:import_dll --- NtReadFile ntdll.dll.199 = 0x55727920 0009:trace:module:import_dll --- NtReadVirtualMemory ntdll.dll.202 = 0x55727950 0009:trace:module:import_dll --- NtReleaseMutant ntdll.dll.205 = 0x55727980 0009:trace:module:import_dll --- NtReleaseSemaphore ntdll.dll.207 = 0x557279a0 0009:trace:module:import_dll --- NtResetEvent ntdll.dll.216 = 0x55727a30 0009:trace:module:import_dll --- NtResumeThread ntdll.dll.218 = 0x55727a50 0009:trace:module:import_dll --- NtSetContextThread ntdll.dll.221 = 0x55727a80 0009:trace:module:import_dll --- NtSetDefaultLocale ntdll.dll.223 = 0x55727aa0 0009:trace:module:import_dll --- NtSetDefaultUILanguage ntdll.dll.224 = 0x55727ab0 0009:trace:module:import_dll --- NtSetEvent ntdll.dll.226 = 0x55727ad0 0009:trace:module:import_dll --- NtSetInformationFile ntdll.dll.230 = 0x55727b10 0009:trace:module:import_dll --- NtSetInformationThread ntdll.dll.234 = 0x55727b50 0009:trace:module:import_dll --- NtSetSystemTime ntdll.dll.246 = 0x55727c10 0009:trace:module:import_dll --- NtSetTimer ntdll.dll.247 = 0x55727c20 0009:trace:module:import_dll --- NtSetValueKey ntdll.dll.249 = 0x55727c40 0009:trace:module:import_dll --- NtSuspendThread ntdll.dll.255 = 0x55727ca0 0009:trace:module:import_dll --- NtTerminateProcess ntdll.dll.257 = 0x55727cc0 0009:trace:module:import_dll --- NtTerminateThread ntdll.dll.258 = 0x55727cd0 0009:trace:module:import_dll --- NtUnlockFile ntdll.dll.263 = 0x55727d20 0009:trace:module:import_dll --- NtUnlockVirtualMemory ntdll.dll.264 = 0x55727d30 0009:trace:module:import_dll --- NtUnmapViewOfSection ntdll.dll.265 = 0x55727d40 0009:trace:module:import_dll --- NtWaitForMultipleObjects ntdll.dll.268 = 0x55727d70 0009:trace:module:import_dll --- NtWriteFile ntdll.dll.273 = 0x55727dc0 0009:trace:module:import_dll --- NtWriteVirtualMemory ntdll.dll.276 = 0x55727df0 0009:trace:module:import_dll --- NtYieldExecution ntdll.dll.277 = 0x55727e00 0009:trace:module:import_dll --- RtlAcquirePebLock ntdll.dll.285 = 0x55727e80 0009:trace:module:import_dll --- RtlAcquireResourceExclusive ntdll.dll.286 = 0x55727e90 0009:trace:module:import_dll --- RtlAcquireResourceShared ntdll.dll.287 = 0x55727ea0 0009:trace:module:import_dll --- RtlAddVectoredExceptionHandler ntdll.dll.300 = 0x55727f70 0009:trace:module:import_dll --- RtlAllocateHeap ntdll.dll.304 = 0x55727fb0 0009:trace:module:import_dll --- RtlAnsiStringToUnicodeString ntdll.dll.307 = 0x55727fe0 0009:trace:module:import_dll --- RtlAreBitsSet ntdll.dll.317 = 0x55728080 0009:trace:module:import_dll --- RtlCharToInteger ntdll.dll.320 = 0x557280b0 0009:trace:module:import_dll --- RtlClearBits ntdll.dll.323 = 0x557280e0 0009:trace:module:import_dll --- RtlCompactHeap ntdll.dll.325 = 0x55728100 0009:trace:module:import_dll --- RtlCreateHeap ntdll.dll.350 = 0x55728290 0009:trace:module:import_dll --- RtlCreateProcessParameters ntdll.dll.351 = 0x557282a0 0009:trace:module:import_dll --- RtlCreateUnicodeString ntdll.dll.357 = 0x55728300 0009:trace:module:import_dll --- RtlCreateUnicodeStringFromAsciiz ntdll.dll.358 = 0x55728310 0009:trace:module:import_dll --- RtlCreateUserThread ntdll.dll.361 = 0x55728340 0009:trace:module:import_dll --- RtlDeleteCriticalSection ntdll.dll.374 = 0x55728410 0009:trace:module:import_dll --- RtlDeleteResource ntdll.dll.381 = 0x55728480 0009:trace:module:import_dll --- RtlDestroyHeap ntdll.dll.385 = 0x557284c0 0009:trace:module:import_dll --- RtlDestroyProcessParameters ntdll.dll.386 = 0x557284d0 0009:trace:module:import_dll --- RtlDetermineDosPathNameType_U ntdll.dll.388 = 0x557284f0 0009:trace:module:import_dll --- RtlDoesFileExists_U ntdll.dll.389 = 0x55728500 0009:trace:module:import_dll --- RtlDosPathNameToNtPathName_U ntdll.dll.390 = 0x55728510 0009:trace:module:import_dll --- RtlDosSearchPath_U ntdll.dll.391 = 0x55728520 0009:trace:module:import_dll --- RtlEnlargedUnsignedMultiply ntdll.dll.398 = 0x55728590 0009:trace:module:import_dll --- RtlEnterCriticalSection ntdll.dll.399 = 0x557285a0 0009:trace:module:import_dll --- RtlExpandEnvironmentStrings_U ntdll.dll.412 = 0x55728670 0009:trace:module:import_dll --- RtlExtendedLargeIntegerDivide ntdll.dll.415 = 0x557286a0 0009:trace:module:import_dll --- RtlFindClearBitsAndSet ntdll.dll.424 = 0x55728730 0009:trace:module:import_dll --- RtlFindMessage ntdll.dll.431 = 0x557287a0 0009:trace:module:import_dll --- RtlFreeAnsiString ntdll.dll.444 = 0x55728870 0009:trace:module:import_dll --- RtlFreeHeap ntdll.dll.446 = 0x55728890 0009:trace:module:import_dll --- RtlFreeUnicodeString ntdll.dll.449 = 0x557288c0 0009:trace:module:import_dll --- RtlGetCurrentDirectory_U ntdll.dll.457 = 0x55728940 0009:trace:module:import_dll --- RtlGetFullPathName_U ntdll.dll.460 = 0x55728970 0009:trace:module:import_dll --- RtlGetLongestNtPathLength ntdll.dll.464 = 0x557289b0 0009:trace:module:import_dll --- RtlGetProcessHeaps ntdll.dll.469 = 0x55728a00 0009:trace:module:import_dll --- RtlGetVersion ntdll.dll.472 = 0x55728a30 0009:trace:module:import_dll --- RtlImageDirectoryEntryToData ntdll.dll.475 = 0x55728a60 0009:trace:module:import_dll --- RtlImageNtHeader ntdll.dll.476 = 0x55728a70 0009:trace:module:import_dll --- RtlImageRvaToSection ntdll.dll.477 = 0x55728a80 0009:trace:module:import_dll --- RtlInitAnsiString ntdll.dll.480 = 0x55728ab0 0009:trace:module:import_dll --- RtlInitUnicodeString ntdll.dll.484 = 0x55728af0 0009:trace:module:import_dll --- RtlInitializeCriticalSection ntdll.dll.488 = 0x55728b30 0009:trace:module:import_dll --- RtlInitializeCriticalSectionAndSpinCount ntdll.dll.489 = 0x55728b40 0009:trace:module:import_dll --- RtlInitializeResource ntdll.dll.493 = 0x55728b80 0009:trace:module:import_dll --- RtlIsDosDeviceName_U ntdll.dll.499 = 0x55728be0 0009:trace:module:import_dll --- RtlIsNameLegalDOS8Dot3 ntdll.dll.501 = 0x55728c00 0009:trace:module:import_dll --- RtlIsTextUnicode ntdll.dll.502 = 0x55728c10 0009:trace:module:import_dll --- RtlLeaveCriticalSection ntdll.dll.513 = 0x55728cc0 0009:trace:module:import_dll --- RtlLocalTimeToSystemTime ntdll.dll.517 = 0x55728d00 0009:trace:module:import_dll --- RtlLockHeap ntdll.dll.518 = 0x55728d10 0009:trace:module:import_dll --- RtlMultiByteToUnicodeN ntdll.dll.524 = 0x55728d70 0009:trace:module:import_dll --- RtlMultiByteToUnicodeSize ntdll.dll.525 = 0x55728d80 0009:trace:module:import_dll --- RtlNormalizeProcessParams ntdll.dll.529 = 0x55728dc0 0009:trace:module:import_dll --- RtlNtStatusToDosError ntdll.dll.530 = 0x55728dd0 0009:trace:module:import_dll --- RtlOemStringToUnicodeString ntdll.dll.536 = 0x55728e30 0009:trace:module:import_dll --- RtlOpenCurrentUser ntdll.dll.538 = 0x55728e50 0009:trace:module:import_dll --- RtlQueryEnvironmentVariable_U ntdll.dll.546 = 0x55728ed0 0009:trace:module:import_dll --- RtlQueryTimeZoneInformation ntdll.dll.562 = 0x55728fd0 0009:trace:module:import_dll --- RtlRaiseException ntdll.dll.565 = 0x55729000 0009:trace:module:import_dll --- RtlRaiseStatus ntdll.dll.566 = 0x55729010 0009:trace:module:import_dll --- RtlReAllocateHeap ntdll.dll.569 = 0x55729040 0009:trace:module:import_dll --- RtlReleasePebLock ntdll.dll.578 = 0x557290d0 0009:trace:module:import_dll --- RtlReleaseResource ntdll.dll.579 = 0x557290e0 0009:trace:module:import_dll --- RtlSecondsSince1970ToTime ntdll.dll.587 = 0x55729160 0009:trace:module:import_dll --- RtlSetCurrentDirectory_U ntdll.dll.593 = 0x557291c0 0009:trace:module:import_dll --- RtlSetEnvironmentVariable ntdll.dll.596 = 0x557291f0 0009:trace:module:import_dll --- RtlSetTimeZoneInformation ntdll.dll.608 = 0x557292b0 0009:trace:module:import_dll --- RtlSizeHeap ntdll.dll.612 = 0x557292f0 0009:trace:module:import_dll --- RtlSystemTimeToLocalTime ntdll.dll.620 = 0x55729370 0009:trace:module:import_dll --- RtlTimeFieldsToTime ntdll.dll.621 = 0x55729380 0009:trace:module:import_dll --- RtlTimeToSecondsSince1970 ntdll.dll.623 = 0x557293a0 0009:trace:module:import_dll --- RtlTimeToTimeFields ntdll.dll.625 = 0x557293c0 0009:trace:module:import_dll --- RtlTryEnterCriticalSection ntdll.dll.626 = 0x557293d0 0009:trace:module:import_dll --- RtlUnicodeStringToAnsiSize ntdll.dll.629 = 0x55729400 0009:trace:module:import_dll --- RtlUnicodeStringToAnsiString ntdll.dll.630 = 0x55729410 0009:trace:module:import_dll --- RtlUnicodeStringToInteger ntdll.dll.632 = 0x55729430 0009:trace:module:import_dll --- RtlUnicodeStringToOemSize ntdll.dll.633 = 0x55729440 0009:trace:module:import_dll --- RtlUnicodeStringToOemString ntdll.dll.634 = 0x55729450 0009:trace:module:import_dll --- RtlUnicodeToMultiByteN ntdll.dll.636 = 0x55729470 0009:trace:module:import_dll --- RtlUnicodeToMultiByteSize ntdll.dll.637 = 0x55729480 0009:trace:module:import_dll --- RtlUnicodeToOemN ntdll.dll.638 = 0x55729490 0009:trace:module:import_dll --- RtlUnlockHeap ntdll.dll.640 = 0x557294b0 0009:trace:module:import_dll --- RtlUnwind ntdll.dll.641 = 0x557294c0 0009:trace:module:import_dll --- RtlUpcaseUnicodeString ntdll.dll.643 = 0x557294e0 0009:trace:module:import_dll --- RtlUpperChar ntdll.dll.650 = 0x55729550 0009:trace:module:import_dll --- RtlValidateHeap ntdll.dll.657 = 0x557295c0 0009:trace:module:import_dll --- RtlVerifyVersionInfo ntdll.dll.659 = 0x557295e0 0009:trace:module:import_dll --- RtlWalkHeap ntdll.dll.661 = 0x55729600 0009:trace:module:import_dll --- VERSION_Init ntdll.dll.680 = 0x55729730 0009:trace:module:import_dll --- __wine_call_from_32_regs ntdll.dll.996 = 0x55715570 0009:trace:module:import_dll --- __wine_enter_vm86 ntdll.dll.997 = 0x5572ab00 0009:trace:module:import_dll --- __wine_exception_handler ntdll.dll.998 = 0x556e3e6f 0009:trace:module:import_dll --- __wine_init_codepages ntdll.dll.1000 = 0x5572ab30 0009:trace:module:import_dll --- __wine_init_windows_dir ntdll.dll.1001 = 0x5572ab40 0009:trace:module:import_dll --- __wine_set_signal_handler ntdll.dll.1002 = 0x5572ab50 0009:trace:module:import_dll --- sprintf ntdll.dll.1074 = 0x555d3f60 0009:trace:module:import_dll --- sscanf ntdll.dll.1076 = 0x555e17b0 0009:trace:module:import_dll --- strtoul ntdll.dll.1091 = 0x5572b0e0 0009:trace:module:import_dll --- tolower ntdll.dll.1094 = 0x5572b110 0009:trace:module:import_dll --- toupper ntdll.dll.1095 = 0x5572b120 0009:trace:module:import_dll --- wine_nt_to_unix_file_name ntdll.dll.1116 = 0x5572b270 0009:trace:module:import_dll --- wine_server_call ntdll.dll.1117 = 0x55706d08 0009:trace:module:import_dll --- wine_server_fd_to_handle ntdll.dll.1118 = 0x5572b290 0009:trace:module:import_dll --- wine_server_handle_to_fd ntdll.dll.1119 = 0x5572b2a0 0009:trace:module:import_dll --- wine_server_release_fd ntdll.dll.1120 = 0x5572b2b0 0009:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x55abb000 00002000 00000080 0009:trace:virtual:VIRTUAL_SetProt 0x55abb000-0x55abcfff c-rWx View: 0x559d0000 - 0x55accfff (system) 0x559d0000 - 0x55abafff c-rWx 0x55abb000 - 0x55abcfff c-rWx 0x55abd000 - 0x55accfff c-rWx 0009:trace:module:load_builtin_callback loaded kernel32.dll 0x55890158 0x559d0000 0009: load_dll( handle=(nil), base=0x559d0000, size=1036288, dbg_offset=0, dbg_size=0, name=0x55890180, filename=L"kernel32.dll" ) 0009: load_dll() = 0 0009:Call kernel32.__wine_kernel_init() ret=556f13cf Segmentation fault $ 0009: *killed* exit_code=0
$ wineserver: exiting (pid=26953)
It turns out, it's actually a problem with kernel 2.6.10 that I was encountering, and the multilib build is a success. With kernel 2.6.9 wine runs perfectly.
To round things up, here are the steps I took to achieve this:
1. Apply patch below (will be submitting to wine-patches) 2. Move your /usr/include out of the way and replace with one from an ix86 box (might not be necessary if your distro has multilib includes) 3. autoconf 4. ./configure --x-libraries=<path_to_your_multilib_x_libs> 5. make depend && make 6. make install 7. Don't forget to put your /usr/include back ;)
I suppose I should see what's up with kernel 2.6.10 now..
Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.338 diff -u -p -r1.338 configure.ac --- configure.ac 28 Jan 2005 14:13:08 -0000 1.338 +++ configure.ac 8 Feb 2005 12:30:27 -0000 @@ -978,7 +978,7 @@ case $host_os in fi
case $host_cpu in - *i[[3456789]]86*) + *[[3456789x]]86*) AC_CACHE_CHECK([whether we can relocate the executable to 0x77f00000], ac_cv_ld_reloc_exec, [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x77f00400], ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")]) @@ -1073,7 +1073,7 @@ esac case $host_os in linux*) case $host_cpu in - *i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;; + *[[3456789x]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;; *) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;; esac AC_SUBST(MAIN_BINARY,"wine-glibc") @@ -1454,7 +1454,7 @@ AC_CHECK_MEMBERS([struct stat.st_blocks] dnl *** check for the need to define platform-specific symbols
case $host_cpu in - *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;; + *[[3456789x]]86*) WINE_CHECK_DEFINE([__i386__]) ;; *alpha*) WINE_CHECK_DEFINE([__ALPHA__]) ;; *sparc*) WINE_CHECK_DEFINE([__sparc__]) ;; *powerpc*) WINE_CHECK_DEFINE([__powerpc__]) ;;