SheepShaver on gentoo linux

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
Guest

SheepShaver on gentoo linux

Post by Guest »

seeing as a lot of people seem to be having trouble with this problem while compiling

Code: Select all

../kpx_cpu/sheepshaver_glue.cpp:720:2: #error "FIXME: You don't have the capability to skip instruction within signal handlers"
make: *** [obj/sheepshaver_glue.o] Error 1
(including me). I thought I would break the topic away from the main SheepShaver installation page.
If anyone has any idea of ow to fix this problem please post here
Gwenole

Post by Gwenole »

Search for anything unusual for "sigsegv" in the config.log. Alternatively, cvs update -d both your Basilisk II sources & SheepShaver sources.
Bob

Post by Bob »

I get the same errors on gentoo :(

I re-did CVS but i still get the same errors

here is the output from config.log
sigsegv.cpp:1443: error: `SIGSEGV_FAULT_HANDLER_ARGLIST' was not declared in
this scope
sigsegv.cpp:1444: error: syntax error before `{' token
sigsegv.cpp:1449: error: parse error before `switch'
sigsegv.cpp:1509: error: syntax error before `(' token
sigsegv.cpp:1518: error: 'mach_port_t' is used as a type, but is not defined as
a type.
sigsegv.cpp:1519: error: 'exception_behavior_t' is used as a type, but is not
defined as a type.
sigsegv.cpp:1520: error: 'thread_state_flavor_t' is used as a type, but is not
defined as a type.
sigsegv.cpp:1521: error: 'thread_state_t' is used as a type, but is not defined
as a type.
sigsegv.cpp:1522: error: 'mach_msg_type_number_t' is used as a type, but is not
defined as a type.
sigsegv.cpp:1524: error: parse error before `for'
sigsegv.cpp:1524: error: `oldExceptionPorts' was not declared in this scope
sigsegv.cpp:1524: error: parse error before `;' token
sigsegv.cpp:1524: error: syntax error before `++' token
sigsegv.cpp:1536: error: ISO C++ forbids declaration of `port' with no type
sigsegv.cpp:1536: error: `oldExceptionPorts' was not declared in this scope
sigsegv.cpp:1537: error: ISO C++ forbids declaration of `behavior' with no type
sigsegv.cpp:1537: error: `oldExceptionPorts' was not declared in this scope
sigsegv.cpp:1538: error: ISO C++ forbids declaration of `flavor' with no type
sigsegv.cpp:1538: error: `oldExceptionPorts' was not declared in this scope
sigsegv.cpp:1544: error: parse error before `if'
sigsegv.cpp:1546: error: ISO C++ forbids declaration of `kret' with no type
sigsegv.cpp:1546: error: `thread_port' was not declared in this scope
sigsegv.cpp:1546: error: `thread_state' was not declared in this scope
sigsegv.cpp:1547: error: `thread_state_count' was not declared in this scope
sigsegv.cpp:1547: error: `thread_get_state' was not declared in this scope
sigsegv.cpp:1548: error: `thread_get_state' was not declared in this scope
sigsegv.cpp:1548: error: ISO C++ forbids declaration of `MACH_CHECK_ERROR' with
no type
sigsegv.cpp:1548: error: initializer list being treated as compound expression
sigsegv.cpp:1549: error: parse error before `}' token
sigsegv.cpp:1556: error: `exception_raise' was not declared in this scope
sigsegv.cpp:1556: error: ISO C++ forbids declaration of `MACH_CHECK_ERROR' with
no type
sigsegv.cpp:1556: error: redefinition of `int MACH_CHECK_ERROR'
sigsegv.cpp:1548: error: `int MACH_CHECK_ERROR' previously defined here
sigsegv.cpp:1556: error: initializer list being treated as compound expression
sigsegv.cpp:1557: error: parse error before `break'
sigsegv.cpp:1564: error: `exception_raise_state' was not declared in this scope
sigsegv.cpp:1564: error: ISO C++ forbids declaration of `MACH_CHECK_ERROR' with
no type
sigsegv.cpp:1564: error: redefinition of `int MACH_CHECK_ERROR'
sigsegv.cpp:1556: error: `int MACH_CHECK_ERROR' previously defined here
sigsegv.cpp:1564: error: initializer list being treated as compound expression
sigsegv.cpp:1565: error: parse error before `break'
sigsegv.cpp:1573: error: `exception_raise_state_identity' was not declared in
this scope
sigsegv.cpp:1573: error: ISO C++ forbids declaration of `MACH_CHECK_ERROR' with
no type
sigsegv.cpp:1573: error: redefinition of `int MACH_CHECK_ERROR'
sigsegv.cpp:1564: error: `int MACH_CHECK_ERROR' previously defined here
sigsegv.cpp:1573: error: initializer list being treated as compound expression
sigsegv.cpp:1574: error: parse error before `break'
sigsegv.cpp:1583: error: `thread_set_state' was not declared in this scope
sigsegv.cpp:1583: error: ISO C++ forbids declaration of `MACH_CHECK_ERROR' with
no type
sigsegv.cpp:1583: error: redefinition of `int MACH_CHECK_ERROR'
sigsegv.cpp:1573: error: `int MACH_CHECK_ERROR' previously defined here
sigsegv.cpp:1583: error: initializer list being treated as compound expression
sigsegv.cpp:1584: error: parse error before `}' token
sigsegv.cpp:1609: error: `mach_port_t' was not declared in this scope
sigsegv.cpp:1609: error: parse error before `,' token
sigsegv.cpp:1617: error: 'kern_return_t' is used as a type, but is not defined
as a type.
sigsegv.cpp:1619: error: parse error before `if'
sigsegv.cpp:1627: error: ISO C++ forbids declaration of `krc' with no type
sigsegv.cpp:1627: error: `thread' was not declared in this scope
sigsegv.cpp:1627: error: `task' was not declared in this scope
sigsegv.cpp:1627: error: `exception' was not declared in this scope
sigsegv.cpp:1627: error: `code' was not declared in this scope
sigsegv.cpp:1627: error: `codeCount' was not declared in this scope
sigsegv.cpp:1627: error: `ports' was not declared in this scope
sigsegv.cpp:1627: error: `forward_exception' was not declared in this scope
sigsegv.cpp:1629: error: parse error before `return'
Gwenole

Post by Gwenole »

I meant other things besides the garbage under "checking whether your system supports Mach exceptions", which is normal for non Darwin systems.
Tom

Configure script broke for Gentoo

Post by Tom »

I finally got the build process to work for Gentoo. It isn't the correct fix for the issue, but it seems that forcing ac_cv_have_skip_instruction=yes at line 5989 of the configure script generated after running autogen.sh will bypass the issue, although I don't know what negative effect will happen if you do so.

Somewhere the test in sigsegv is broke, although I have not had the time to track down what could be happening in the Gentoo gcc VS. the Mandrake gcc.
Tom

Post by Tom »

That didn't work as is. It looks like the tests are somehow not working in the configure script in Gentoo is not recognizing things like mmap and signal handlers.

Run autogen.sh, then change config.cache as follows:
ac_cv_cam_map_lm=${ac_cv_can_map_lm=yes}
ac_cv_have_extended_signals=${ac_cv_have_extended_signals=yes}
ac_cv_have_skip_instruction=${ac_cv_have_skip_instruction=yes}
ac_cv_mmap_anon=${ac_cv_mmap_anon=yes}
ac_cv_mprotect_works=${ac_cv_mprotect_works=yes}

Rerun ./configure

Edit the Makefile to be sure that DYNGEN_CC = g++

make clean
make

You should have something that resembels SheepShaver by the time it is done. I have some strange colors on the screen (missing blue), but I think that may be due to me having both mmap_anon and mmap_anonymous enabled at the same time. Or maybe not.

Has anyone else had problems like this on Gentoo?
Tom

Post by Tom »

Finally tracked it down. For some reason the version of aclocal being used was 1.4, even though I had automake 1.7 installed.

I did an:
export WANT_AUTOCONF=2.5
export WANT_AUTOMAKE=1.7

It compiled, although a fresh checkout of CVS has shown an error in ppc-dyngen-ops.hpp in line 8786 for the last couple of days. I don't think it is related to Gentoo, though.
chris

Post by chris »

Tom wrote:Finally tracked it down. For some reason the version of aclocal being used was 1.4, even though I had automake 1.7 installed.

I did an:
export WANT_AUTOCONF=2.5
export WANT_AUTOMAKE=1.7

It compiled, although a fresh checkout of CVS has shown an error in ppc-dyngen-ops.hpp in line 8786 for the last couple of days. I don't think it is related to Gentoo, though.
What directory do you run the export commands in because running them in src/Unix doesnt make any difference for me
makukasutota

Post by makukasutota »

I think you should do it before the ./autogen.sh
I had a second problem after I used the commands, but I had used another patch and now it starts. If you have the same problem after using the commands, search for my thread in this forum.

sorry for my bad english.
User avatar
ClockWise
Site Admin
Posts: 4399
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Post by ClockWise »

ShadowFox
Tinkerer
Posts: 70
Joined: Thu Feb 05, 2004 4:41 am
Location: Connecticut

Post by ShadowFox »

As an update to this thread, I did successfully get SheepShaver to compile on my laptop running Gentoo, although it was sort of an accident. I originally had the problem in the first post about the signal handlers, but I believe it may have something to do with Gentoo's customization of GCC.

I had a few problems compiling other random things too, so I decided to try and upgrade GCC from 3.2.3 (default gcc installed with gentoo) to the 3.3 series. Problem was, I unmerged gcc before emerging the new one, leaving me with no gcc in the system and an essentially non-functional system. I ended up booting from the livecd, re-bootstrapping, and emerged a new shiney gcc-3.3.3. Once this was done, emerge started working again, but SheepShaver still would not build. I emerged gcc-3.2.3-r7 along with the 3.3.3, then magically the autogen.sh script returned Enable video on SEGV signals as "yes" (all times prior it returned "no"), and the compiling went through without a hitch.

Not sure what happened, but I do know when watching the boostrap process, after it uncompressed the initial gcc, a number of gentoo related patches were applied. Is it possible something related to the gentoo patches to gcc could be responsible for autogen not detecting proper SIGSEGV functionality?

In any case, the compiled binary runs, and with a 4mb rom I extracted from a Umax c500, with OS 8.1. However, it randomly crashes. Sometimes it won't finish booting, other times it will boot completely and run for 5 minutes, then crash. Any ideas? I have an OS 8.6 cd, but it came with a B&W G3 I have, and says it can't install on SheepShaver.


edit- This was all done on a Vaio r505-dl laptop. I was having the same compiling issue on my desktop (Athon XP 2500), so I'll play around with a few things there and see if I can't nail down exactly what causes the build failure and post the results.
Chinny
Space Cadet
Posts: 2
Joined: Wed Mar 24, 2004 4:54 am

Great fixes

Post by Chinny »

Great fixes Tom - I don't know how you figured them out?

Perhaps you might look into getting an ebuild together for portage?
Post Reply