SheepShaver in Ubuntu Karmic

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
ethnopunk
Student Driver
Posts: 17
Joined: Sat Apr 04, 2009 11:35 am

SheepShaver in Ubuntu Karmic

Post by ethnopunk »

I compiled SheepShaver with a patch from here http://ubuntuforums.org/showthread.php?t=1334190&page=2

It starts but quits if I launch anything.

Tried the usual fix by adding vm.mmap_min_addr = 0 to sysctl.conf but no go.

It seems sysctl and Xorg is a little different in Karmic.

There is no

Code: Select all

# protect bottom 64k of memory from mmap to prevent NULL-dereference
# attacks against potential future kernel security vulnerabilities.
# (Added in kernel 2.6.23.)
vm.mmap_min_addr = 65536
Anybody have any success with SheepShaver in Ubuntu Karmic?

Any ideas how to fix it?
ethnopunk
Student Driver
Posts: 17
Joined: Sat Apr 04, 2009 11:35 am

Post by ethnopunk »

I did a bit of digging around. It appears Karmic is configured a little different;

Changes need to be made in the /etc/sysctl.d$ directory

Code: Select all

this directory contains settings similar to those found in /etc/sysctl.conf.
In general, files in the 10-*.conf range come from the procps package and
serve as system defaults.  Other packages install their files in the
30-*.conf range, to override system defaults.  End-users can use 60-*.conf
and above, or use /etc/sysctl.conf directly, which overrides anything in
this directory.

After making any changes, please run "invoke-rc.d procps start".
For instance, WINE which has exactly the same problem, has this file:

30-wine.conf

Code: Select all

# Wine needs to access the bottom 64k of memory in order to launch
# 16 bit programs.
vm.mmap_min_addr = 0
I've tried adding the vm.mmap_min_addr = 0 to sysctl.conf directly, but this is obviously what we don't want to do,besides, the fix no longer works there.

So I guess the question is, what should the /etc/sysctl.d SheepShaver.conf file be called and how will SheepShaver see it?
ethnopunk
Student Driver
Posts: 17
Joined: Sat Apr 04, 2009 11:35 am

Post by ethnopunk »

I tried putting the line in 70-sheepshaver.conf

and starting it with

sudo sysctl -p /etc/sysctl.d/70-sheepshaver.conf

But still not. About to tear my hair out.
lubod
Space Cadet
Posts: 5
Joined: Sun Dec 13, 2009 11:59 pm
Location: California

I am trying this myself, also with little success!

Post by lubod »

So first, my sympathies, and thanks for posting what you found so far.

My CPU: amd64 (in case that matters)

From my perspective it seems that:

The old source for sheepshaver (May 2006 or so) are somehow too old for Karmic, likely due to changes in gcc or other build tools/libraries. Seems a futile exercise to use that in the long run. :(

The new source should be a better starting point, but CVS was offline yesterday. :(

Either seems to need hacking to be used on Ubuntu, I guess they (and Debian I suppose) do many things differently from how SheepShaver expects them to be to build. I noted the original author made it on Mandriva (ex-Mandrake).

And yours is the first mention of Karmic in this forum since I joined yesterday, there seem to be few Linux posts and even fewer Ubuntu ones.

I want to get this working, so I'll keep at it whenever I see some fix for a 'showstopper' like a failure in ./configure or make.

P.S. my username here and on the ubuntuforums is the same, in case you want to see what threads I read or wrote replies to there.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

I first saw that vm.map repair mentioned in a ubuntu forum. It seems the default host configuration was changed due to some security issues. (as your quote shows)

As no one maintains the linux code, it might be better to use the solution you mentioned in your earlier post:

"End-users can use 60-*.conf and above, or use /etc/sysctl.conf directly, which overrides anything in this directory." An entry in any of those files would change the config of the host to accomodate SheepShaver.

Using the 60-*.conf methode would seem to indicated SheepShaver runs as a process with a fixed process number, and with a corresponding 60-*.conf file. But I believe SheepShaver is not started within that process architecture.

So, I would suggest manually changing sysctl.conf directly.

To get SheepShaver to honour the vm.map change the code needs to be mended to include creating/changing and invoking the required host configuration file in the desired location or to no longer map memory below the new default minimum address. The code has an entry about being able to map low memory and the lowest memory available also the configuration/build process has an option concerning this.

Best,
Cat_7
ethnopunk
Student Driver
Posts: 17
Joined: Sat Apr 04, 2009 11:35 am

Post by ethnopunk »

We appear to have a solution. Runs slower on Karmic, but appears to be slightly more stable.

http://ubuntuforums.org/showthread.php?t=1334190&page=3
ethnopunk
Student Driver
Posts: 17
Joined: Sat Apr 04, 2009 11:35 am

Post by ethnopunk »

lubod
Space Cadet
Posts: 5
Joined: Sun Dec 13, 2009 11:59 pm
Location: California

Solutions

Post by lubod »

The above mediafire link by ethnopunk is for the i386 (aka 32 bit Intel/AMD) binary.

I managed to get the 64bit Intel/AMD Karmic 9.10 build of the same SheepShaver 20060514 source, with the same patch he used, plus a few niceties like the .desktop file to enable launching in Gnome via the Applications/System menu going.

The 64bit build is available at:

http://members.dslextreme.com/~lubod/sh ... -amd64.deb
Post Reply