[Wine] "Bus Error" Under Mac OS X x86 with Wine 0.9.20

dackz dackze at gmail.com
Mon Aug 28 23:32:53 CDT 2006

I'm trying to run Wine 0.9.20 under OS X x86 and I'm getting nothing
but "Bus Error" when I run any win32 program via Wine. Here is some
relevant environment info:

OS: Mac OS X 10.4.7
Xcode: Xcode 2.4
X11: XFree86 Version 4.4.0 / X Window System
(protocol Version 11, revision 0, vendor release 6600)

gcc -v: Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5363.obj~28/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
--program-prefix= --host=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5363)

uname -a: Darwin my-computer 8.7.1 Darwin Kernel Version 8.7.1: Wed
Jun  7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386

I built and installed Wine with a DarwinPorts portfile that I created.
Here's what it looks like:

# $Id: $
PortSystem        1.0
name              wine
version           0.9.20
description       Windows compatibility layer
long_description  Microsoft Windows compatibility layer for Unix-like systems
categories        emulators
maintainers       dackze+darwinports at gmail.com
platforms         darwin freebsd
homepage          http://www.winehq.org/
master_sites      sourceforge:wine
use_bzip2         yes
depends_lib       bin:bison:bison bin:fontforge:fontforge bin:gmake:gmake \
                  bin:m4:m4 bin:pkg-config:pkgconfig \
                  lib:libfontconfig:fontconfig lib:libfreetype:freetype \
                  lib:libintl:gettext lib:libjpeg:jpeg lib:libncurses:ncurses \
                  lib:libX11:XFree86 lib:liblcms:lcms lib:libglut:glut \
                  lib:libgphoto2:libgphoto2 lib:libsane:sane-backends \
                  lib:libssl:openssl lib:libungif:libungif \
                  lib:libxml2:libxml2 lib:libxslt:libxslt
build.type        gnu

checksums ${distname}${extract.suffix} md5    3e80a07819e4df084becdbbcd4d6cdd3 \
71b918dcdc54bc32e0b37a63f66891bb7c96b938 \

platform darwin powerpc {
    ui_msg "Wine is not supported on PowerPC"
    exit 1

It built and installed wine just fine. It's just when I run it that I
get "Bus Error". I decided to load up gdb to see what it thought, and
it had this to say:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x7ffde064
thread_init () at thread.c:228
228     thread.c: No such file or directory.
        in thread.c
(gdb) bt
#0  thread_init () at thread.c:228
#1  0x7bc2beea in __wine_process_init () at loader.c:2354
#2  0x60a088c1 in wine_init (argc=2, argv=0xbffff928, error=0xbffff4c0
"", error_size=1024) at loader.c:664
#3  0x7bf00f2d in main (argc=2, argv=0xbffff928) at main.c:58
(gdb) x 0x7ffde064
0x7ffde064 <__wine_shared_heap+16638052>:       0x00000000
(gdb) print peb
$1 = (PEB *) 0x7ffde000

dlls/ntdll/thread.c:220-228 has this:

    /* reserve space for shared user data */

    addr = (void *)0x7ffe0000;
    size = 0x10000;
    NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 0, &size,

    /* allocate and initialize the PEB */

    addr = NULL;
    size = sizeof(*peb);
    NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 1, &size,
                             MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE );
    peb = addr;

    peb->NumberOfProcessors = 1;

At this point, I'm stumped. Is there something wrong with my portfile
that's causing problems? The only thing I can think of is that it's
using incompatible versions of libraries that Wine requires, but I'd
hope that the configure script would catch something like that. Either
way, these are versions I'm using from DarwinPorts:

  fontforge @20060125_0 (active)
  freetype @2.1.10_1 (active)
  gettext @0.14.6_0 (active)
  glut @3.7_0 (active)
  gmake @3.81_0 (active)
  jpeg @6b_1 (active)
  lcms @1.15_0 (active)
  libgphoto2 @2.1.5_0 (active)
  libiconv @1.10_1+darwin_8 (active)
  libpng @1.2.10_2+darwin_8 (active)
  libungif @4.1.4_0 (active)
  libuninameslist @20050712_0 (active)
  libusb @0.1.12_0 (active)
  openssl @0.9.8b_0+darwin_8 (active)
  pkgconfig @0.21_0 (active)
  sane-backends @1.0.17_0+local-backends (active)
  tiff @3.8.2_0+darwin_8 (active)
  wine @0.9.20_0 (active)
  zlib @1.2.3_0 (active)

Any ideas?

More information about the wine-users mailing list