PDA

View Full Version : HOWTO: Compile Sheepshaver from source.


SOULRiDER
January 17th, 2008, 12:21 PM
INFO:
SheepShaver is an open source PowerPC Apple Macintosh emulator originally designed for BeOS and Linux. The name is a play on ShapeShifter, a Macintosh II emulator (made obsolete by Basilisk II), which is in turn not to be confused with a third-party preference pane for Mac OS X with the same name. The SheepShaver (and ShapeShifter) project was originally conceived and programmed by Christian Bauer. However, the main developer behind SheepShaver, as of late, has been Gwenolé Beauchesne.

SheepShaver was originally commercial software when first released in 1998, but after the demise of Be Inc., the maker of BeOS, it became open source in 2002. It can be run on both PowerPC and x86 systems; however, it runs more slowly on an x86 system than on a PowerPC system.

It has also been ported to Microsoft Windows. Ports to the Mac OS X PowerPC and Intel versions have also been released. A complete install for Intel Macs can be found here.

It is capable of running Mac OS 7.5.2 through 9.0.4 (though it needs the image of an Old World ROM to run Mac OS 8.1 or below), and can be run inside a window so that the user can run classic Mac OS applications and BeOS or Linux or Windows applications at the same time.

Although SheepShaver does have Ethernet support and CD-quality sound output, SheepShaver does not emulate a memory management unit, as is the case with Basilisk II, and thus cannot run later versions of Mac OS 9 or any version of Mac OS X, which is best emulated by PearPC. At the present, SheepShaver's developers do not have plans to add MMU emulation, since it would hinder the performance of the emulator.

Homepage: http://gwenole.beauchesne.info/en/projects/sheepshaver


STEP 1 - GET THE BASIC COMPILE TOOLS
First you'll need to have the basic tools for compiling the program. We're going to install build-essential and autoconf.
sudo aptitude install build-essential autoconf
If you want to create a Debian package, you can also install checkinstall. A Debian package will allow the easy removal of the program from your system.
sudo aptitude install checkinstall


STEP 2 - INSTALL NEEDED LIBRARIES
In order to compile Sheepshaver you will need to have these packages installed: libx11-dev libesd0-dev libgtk2.0-dev libgtk1.2-dev.
To install the needed packages use this command:
sudo aptitude install libx11-dev libesd0-dev libgtk2.0-dev libgtk1.2-dev.


STEP 3 - DOWNLOAD AND PREPARE THE SOURCE
Go to the projects homepage and download the latest source. As of January 17 2008, this is the latest source: http://gwenole.beauchesne.info/projects/sheepshaver/files/SheepShaver-2.3-0.20060514.1.tar.bz2

Once its downloaded unpack it and open a terminal in the src/Unix directory of the unpacked source.


STEP 4 - COMPILE SHEEPSHAVER
Now that you're in the src/Unix directory, its time to start compiling.
To begin configuring type:
./autogen.sh
followed by
make


STEP 5 - INSTALL SHEEPSHAVER
Here you can either choose to install or install using a Debian package.
If you simply want to install, do the usual
sudo make install
If you want to make a Debian package and have installed checkinstall, you can do
sudo checkinstall remember to make sure you filled the different fields with the proper information.


STEP 6 - RUNNING SHEEPSHAVER
Use this command to run Sheepshaver
SheepShaver

I Hope you found this tutorial a bit useful. Good luck!!


OTHER INFO

UNINSTALLING
If you created a Debian package and if you correctly set it's name, you can uninstall the package with this command
sudo aptitude remove sheepshaver

DEBIAN PACKAGE
I am also attaching a Debian package I made, its working but its missing the dependencies field. If somebody creates a Debian package with all the correct information please post it.
The package should depend only on libesd0, libgtk2.0-common and libgtk1.2-common

Cabalist
February 22nd, 2008, 11:17 PM
This is great! Just what I was looking for. :) I think that you should add the instructions on how to do this from CVS also as the has been updated since those old source releases...

Would you have any information on installing OS9 from an iso? Or is there a better way to install OS9 on linux? Thanks in advance. :)

SOULRiDER
February 25th, 2008, 07:01 PM
This is great! Just what I was looking for. :) I think that you should add the instructions on how to do this from CVS also as the has been updated since those old source releases...

Would you have any information on installing OS9 from an iso? Or is there a better way to install OS9 on linux? Thanks in advance. :)

I'm updating the post as we speak, I don't know how to install OS9, I've never even ran sheepshaver, i just made the guide because some people didn't know how to compile.

quanumphaze
June 25th, 2008, 10:12 PM
autogen.sh seems to be having trouble when it calls the configure script:

$ ./autogen.sh
+ Running aclocal: aclocal: couldn't open directory `m4': No such file or directory
done.
+ Running autoheader: done.
+ Running autoconf: done.
+ Running 'configure ':
** If you wish to pass arguments to ./configure, please
** specify them on the command line.
configure: error: cannot run /bin/bash ./config.sub

Any clues why it doesn't like /bin/bash?

And where would I find a decent how to (and where to get this Old World ROM thing) once I get it installed?

mfox
July 28th, 2008, 08:21 PM
I've been trying to get SheepShaver installed on Ubuntu Hardy on my PowerBook since Mac-on-Linux doesn't seem to work on the Hardy kernel. I followed these excellent instructions but ran into trouble in the make stage. Here is my output:

fox@fox-PowerBook:~/Desktop/SheepShaver-2.3/src/Unix$ make
gcc -I../include -I. -I../slirp -DHAVE_CONFIG_H -D_REENTRANT -DDATADIR=\"/usr/local/share/SheepShaver\" -g -O2 -c Linux/sheepthreads.c -o obj/sheepthreads.o
Linux/sheepthreads.c:53: error: field ‘__sem_lock’ has incomplete type
Linux/sheepthreads.c:55: error: expected specifier-qualifier-list before ‘_pthread_descr’
Linux/sheepthreads.c: In function ‘fastlock_init’:
Linux/sheepthreads.c:190: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:191: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c: In function ‘fastlock_try_acquire’:
Linux/sheepthreads.c:197: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:198: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:199: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:203: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c: In function ‘fastlock_acquire’:
Linux/sheepthreads.c:211: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c: In function ‘fastlock_release’:
Linux/sheepthreads.c:218: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:219: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:219: error: dereferencing pointer to incomplete type
Linux/sheepthreads.c:219: error: invalid lvalue in asm output 0
Linux/sheepthreads.c:219: error: memory input 1 is not directly addressable
Linux/sheepthreads.c: In function ‘pthread_mutex_init’:
Linux/sheepthreads.c:229: error: ‘pthread_mutex_t’ has no member named ‘__m_lock’
Linux/sheepthreads.c:230: error: ‘pthread_mutex_t’ has no member named ‘__m_kind’
Linux/sheepthreads.c:230: error: ‘pthread_mutexattr_t’ has no member named ‘__mutexkind’
Linux/sheepthreads.c:231: error: ‘pthread_mutex_t’ has no member named ‘__m_count’
Linux/sheepthreads.c:232: error: ‘pthread_mutex_t’ has no member named ‘__m_owner’
Linux/sheepthreads.c: In function ‘pthread_mutex_destroy’:
Linux/sheepthreads.c:243: error: ‘pthread_mutex_t’ has no member named ‘__m_kind’
Linux/sheepthreads.c:245: error: ‘pthread_mutex_t’ has no member named ‘__m_lock’
Linux/sheepthreads.c: In function ‘pthread_mutex_lock’:
Linux/sheepthreads.c:258: error: ‘pthread_mutex_t’ has no member named ‘__m_kind’
Linux/sheepthreads.c:260: error: ‘pthread_mutex_t’ has no member named ‘__m_lock’
Linux/sheepthreads.c: In function ‘pthread_mutex_trylock’:
Linux/sheepthreads.c:274: error: ‘pthread_mutex_t’ has no member named ‘__m_kind’
Linux/sheepthreads.c:276: error: ‘pthread_mutex_t’ has no member named ‘__m_lock’
Linux/sheepthreads.c: In function ‘pthread_mutex_unlock’:
Linux/sheepthreads.c:289: error: ‘pthread_mutex_t’ has no member named ‘__m_kind’
Linux/sheepthreads.c:291: error: ‘pthread_mutex_t’ has no member named ‘__m_lock’
Linux/sheepthreads.c: In function ‘pthread_mutexattr_init’:
Linux/sheepthreads.c:305: error: ‘pthread_mutexattr_t’ has no member named ‘__mutexkind’
Linux/sheepthreads.c: In function ‘sem_init’:
Linux/sheepthreads.c:336: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c: In function ‘sem_destroy’:
Linux/sheepthreads.c:351: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c:356: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c: In function ‘sem_wait’:
Linux/sheepthreads.c:377: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c:377: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c: In function ‘sem_post’:
Linux/sheepthreads.c:400: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c:401: error: ‘sem_t’ has no member named ‘__sem_waiting’
Linux/sheepthreads.c:401: error: ‘sem_t’ has no member named ‘__sem_waiting’
make: *** [obj/sheepthreads.o] Error 1

Anyone know what I can do to correct this?

David.a.s93
October 27th, 2008, 07:03 AM
can someone plz help me with this part

Once its downloaded unpack it and open a terminal in the src/Unix directory of the unpacked source.:confused:

igor_av
February 22nd, 2009, 01:55 PM
Hi. I've been trying to compile Sheepshaver from source on Unbuntu 8.10 (i386 and PowerPC) without success. I tried autogen.sh with current gcc and gcc-3.4. When I try to make, I get the following error message :

g++ -I../kpx_cpu/include -I../kpx_cpu/src -DUSE_JIT -I../include -I. -I../slirp -DHAVE_CONFIG_H -D_REENTRANT -DDATADIR=\"/usr/local/share/SheepShaver\" -g -O2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c sys_unix.cpp -o obj/sys_unix.o
sys_unix.cpp: In function ‘void* Sys_open(const char*, bool)’:
sys_unix.cpp:582: attention : ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result
sys_unix.cpp: In function ‘bool SysIsDiskInserted(void*)’:
sys_unix.cpp:888: error: ‘INT_MAX’ was not declared in this scope
make: *** [obj/sys_unix.o] Error 1


Any idea on what I should do?

woohoo576
July 18th, 2009, 12:17 AM
******* NEWB ALERT*******
"Once its downloaded unpack it and open a terminal in the src/Unix directory of the unpacked source."


How would I go about doing that?:confused:

rpangrazio
September 14th, 2009, 09:30 PM
There is a system header file called limits.h that defines this.
To fix it edit sys_unix.cpp

right after "#include <errno.h> add
#include <limits.h>

That should do it.

rpangrazio
September 15th, 2009, 03:32 PM
There is a system header file called limits.h that defines this.
To fix it edit sys_unix.cpp

right after "#include <errno.h> add
#include <limits.h>

That should do it.

This was in reply to the question about the INT_MAX problem

afrodeity
November 11th, 2009, 03:04 PM
got this during make


./configure: line 4410: syntax error near unexpected token `('
./configure: line 4410: `case "(($ac_try" in'


When I make the file, it comes out okay, but it won't run after install.


The http://ubuntuforums.org/attachment.php?attachmentid=56717&d=1200586675 works on karmic but seg faults and quits when you try to start anything.