Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error in Mountain Lion #16

Closed
ogcyborg opened this issue Jan 10, 2013 · 8 comments
Closed

Make error in Mountain Lion #16

ogcyborg opened this issue Jan 10, 2013 · 8 comments

Comments

@ogcyborg
Copy link

I'm using OS X 10.8 and I am trying to compile SheepSaver.

I run the script; ./autogen.sh and when I run make, I get the following error;

../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp: In function ‘void op_mov_ad_A0_im()’:
../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp:79: internal compiler error: in EmitLV_DECL, at llvm-convert.cpp:7475
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://developer.apple.com/bugreporter for instructions.
make: *** [obj/basic-dyngen-ops.o] Error 1

Thank you.

@MaddTheSane
Copy link

This is a bug in llvm-gcc that's supplied by Xcode. The alternative is to get a pure version of GCC or build with Clang.

@Frizlab
Copy link

Frizlab commented Jan 10, 2013

From what I've gathered so far, it is not currently possible to compile SheepShaver using Apple's clang (default compiler from Xcode). You'll have to use gcc (I recommend using homebrew (http://mxcl.github.com/homebrew/) to install it).
However, even after a successful build of SheepShaver, I've had yet to make it run. It crashes at launch.

Se my issue (#11) for more informations. You'll also find here my way of compiling SheepShaver.

If you succeed in compiling a working version of SheepShaver on Mac OS X Mountain Lion, I would be more than interested in knowing how you achieved that!

@amade
Copy link
Contributor

amade commented Jan 11, 2013

I haven't tested on OS X, but on linux you can build with clang just fine, with one caveat, you can't enable JIT as it uses global registers which are not supported by clang

@MaddTheSane
Copy link

Part of the issue with OS X ML is that it uses Position Independent code by default: you have to disable it or set the minimum Mac OS to SL or earlier.

@Frizlab
Copy link

Frizlab commented Jan 12, 2013

So I tried compiling with the following:

export CC=/usr/local/bin/gcc-4.2
export CXX=/usr/local/bin/g++-4.2
export CFLAGS=-Wl,-no_pie
export CXXFLAGS=-Wl,-no_pie

NO_CONFIGURE=1 ./autogen.sh
./configure --enable-sdl-audio --enable-sdl-video --disable-vosf --disable-jit
make

I no longer get the crash report from Apple during configure telling me pagezero crashed.
But SheepShaver still does not work. I get the following crash report at launch:


Crashed Thread:  0

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000

VM Regions Near 0:
--> __PAGEZERO             0000000000000000-0000000000002000 [    8K] rw-/rwx SM=ZER  /Users/USER/Desktop/*
    __PAGEZERO             0000000000002000-0000000000003000 [    4K] r--/rwx SM=ZER  /Users/USER/Desktop/*

Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib

Thread 0 Crashed:
0   ???                             000000000000000000 0 + 0
1   libsystem_c.dylib               0x00007fff94b321b3 malloc_zone_malloc + 71
2   libsystem_c.dylib               0x00007fff94b31805 malloc_set_zone_name + 87
3   libsystem_c.dylib               0x00007fff94b31d96 _malloc_initialize + 1238
4   libsystem_c.dylib               0x00007fff94b32bf5 malloc + 23
5   libkeymgr.dylib                 0x00007fff98e7ca0d get_or_create_key_element + 159
6   libkeymgr.dylib                 0x00007fff98e7c943 _keymgr_get_and_lock_processwide_ptr_2 + 23
7   libkeymgr.dylib                 0x00007fff98e7cc97 __keymgr_initializer + 30
8   libSystem.B.dylib               0x00007fff98209b1e libSystem_initializer + 157
9   dyld                            0x00007fff68ba6378 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 236
10  dyld                            0x00007fff68ba6762 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46
11  dyld                            0x00007fff68ba306e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 380
12  dyld                            0x00007fff68ba2fc4 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 210
13  dyld                            0x00007fff68ba2eba ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 54
14  dyld                            0x00007fff68b94fc0 dyld::initializeMainExecutable() + 207
15  dyld                            0x00007fff68b98b04 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 3060
16  dyld                            0x00007fff68b94397 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 761
17  dyld                            0x00007fff68b9405e _dyld_start + 54

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x0000000000000001  rdx: 0x00007fff94bb0d9f
  rdi: 0x0000000000000000  rsi: 0x0000000000000012  rbp: 0x00007fff56c6b230  rsp: 0x00007fff56c6b208
   r8: 0x0000000001000000   r9: 0x0000000000000000  r10: 0x00007fff989e0f4e  r11: 0x0000000000000206
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000012  r15: 0x0000000000000000
  rip: 0x0000000000000000  rfl: 0x0000000000010213  cr2: 0x0000000000000000

For the record, here the end of the output of configure:


SheepShaver configuration summary:

SDL support ...................... : video audio
BINCUE support ................... : no
LIBVHD support ................... : no
FBDev DGA support ................ : no
XFree86 DGA support .............. : no
XFree86 VidMode support .......... : no
Using PowerPC emulator ........... : yes
Enable JIT compiler .............. : no
Enable video on SEGV signals ..... : no
ESD sound support ................ : no
GTK user interface ............... : no
mon debugger support ............. : no
Addressing mode .................. : real
Bad memory access recovery type .. : mach

Configuration done. Now type "make".

@MaddTheSane
Copy link

I don't think configure passes the LDFlags to making the pagezero test app.

@Frizlab
Copy link

Frizlab commented Jan 12, 2013

Though there is definitely a change because pagezero does not crash anymore when I set the CFLAGS :/

@vasi
Copy link
Contributor

vasi commented Feb 21, 2013

Did you make sure to remove the old lowmem binaries? Try 'rm Darwin/lowmem Darwin/pagezero' and then reconfigure.

JustinCB pushed a commit to JustinCB/macemu that referenced this issue Apr 22, 2018
Thousands of Colors mode is still broken, however, Millions of Colors does work, which did not before this commit.
JustinCB pushed a commit to JustinCB/macemu that referenced this issue Apr 22, 2018
zydeco pushed a commit to zydeco/macemu that referenced this issue Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants