Compiling SheepShaver on Catalina

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
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Compiling SheepShaver on Catalina

Post by classicmacreborn »

Hi,

I've followed the command line build instructions on the wiki for Snow Leopard. I have successfully built the app, but trying to run it yields me this error:

Code: Select all

SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
ERROR: Cannot map first Kernel Data area: Cannot allocate memory.
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  105 (X_ChangePointerControl)
  Value in failed request:  0x0
  Serial number of failed request:  9
  Current serial number in output stream:  10

[Process completed]
I've tried rebooting. Still displays the same error.
Any advice?
User avatar
Ronald P. Regensburg
Expert User
Posts: 6459
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Compiling SheepShaver on Catalina

Post by Ronald P. Regensburg »

In Catalina best build with Xcode.
Which source code do you use? Best use kanjitalk755 source: https://github.com/kanjitalk755/macemu

You need to install Xcode (currently version 11.3.1) in /Applications
Also you need to install SDL2.framework (currently version 2.0.10) in /Library/Frameworks/

Then:
- Open SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj
- Set Build Configuration to Release
- Build

But why do it yourself when builds from the latest source are available for download: https://www.emaculation.com/forum/viewt ... =20&t=7360
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Re: Compiling SheepShaver on Catalina

Post by classicmacreborn »

I've been meaning to delve into the SS source code for some time. I want to modify its functionality to show and hide the SDL window on command. There are other tweaks I plan to do. But first, I'm just trying to get it to build from source.

Compiling from Xcode 11.31, I now get the following error:

Code: Select all

Error: unable to find sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.4u.sdk'
Found this thread about Apple dropping support for older SDKs:
https://stackoverflow.com/questions/533 ... to-xcode-4

I have installed MacOSX10.4u.sdk from https://github.com/phracker/MacOSX-SDKs. When I run xcrun --sdk macosx --show-sdk-version I get the following result:

Code: Select all

Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.4u.sdk; its version (10.4) is below required minimum (10.11) for the macosx platform.
I'm on Xcode 11.3.1, do I need to downgrade as per the aforementioned stackoverflow thread?
emendelson
Forum All-Star
Posts: 1233
Joined: Tue Oct 14, 2008 12:12 am

Re: Compiling SheepShaver on Catalina

Post by emendelson »

Ronald P. Regensburg wrote:You need to install Xcode (currently version 11.3.1) in /Applications
Also you need to install SDL2.framework (currently version 2.0.10) in /Library/Frameworks/

Then:
- Open SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj
- Set Build Configuration to Release
- Build
I'm not a Mac right now, but don't you also have to go into Project Settings and switch to the Legacy Build System (for SheepShaver, not for BasiliskII in the latest code)?

EDIT: I forgot that that change is not needed - thank you, Ronald.
Last edited by emendelson on Tue Jan 28, 2020 11:52 pm, edited 1 time in total.
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Re: Compiling SheepShaver on Catalina

Post by classicmacreborn »

Okay, I switch to the legacy build system. I'm still getting an error when trying to build from within the Xcode application:

Code: Select all

The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture.
I tried removing i386 from the ARCHS flag and building using xcodebuild instead of the Xcode application as per Apple's developer site:

Code: Select all

xcodebuild ARCHS="x86_64" -project *8.xcodeproj -UseModernBuildSystem=NO
I get the response:

Code: Select all

/Users/macbookpro/Documents/macemu-master/SheepShaver/src/kpx_cpu/include/nvmemfun.hpp:24:10: fatal error: 'functional' file not found
I verified that the file is actually there. I made sure xcode command line tools were installed as one stackoverflow thread suggested... same error... I'm stumped again...
User avatar
Ronald P. Regensburg
Expert User
Posts: 6459
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Compiling SheepShaver on Catalina

Post by Ronald P. Regensburg »

emendelson wrote:I'm not a Mac right now, but don't you also have to go into Project Settings and switch to the Legacy Build System (for SheepShaver, not for BasiliskII in the latest code)?
No, that is not needed for SheepShaver, already for quite some time. It was needed for BasiliskII until kanjitalk755 solved the issue with the New Build System in Xcode 10+ for BasiliskII recently.
Last edited by Ronald P. Regensburg on Tue Jan 28, 2020 8:41 pm, edited 1 time in total.
Reason:  
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Re: Compiling SheepShaver on Catalina

Post by classicmacreborn »

I tried switching to $(ARCHS_STANDARD) in build settings. Now I get other things breaking:

Code: Select all

/Users/macbookpro/Documents/macemu-master/SheepShaver/src/CrossPlatform/video_vosf.h:507:33: Use of undeclared identifier 'img'
User avatar
Ronald P. Regensburg
Expert User
Posts: 6459
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Compiling SheepShaver on Catalina

Post by Ronald P. Regensburg »

Here, building with Xcode 11.3.1 proceeds fine without any errors and without the need for any changes other than setting the Build Configuration to Release. (There are a number of warnings, but that is 'normal'.)

Do you use Xcode 11.3.1 and the source from https://github.com/kanjitalk755/macemu ?

Maybe try a fresh source?
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Re: Compiling SheepShaver on Catalina

Post by classicmacreborn »

Ah, no I was using the cebix repository on the on the wiki tutorial.

The kanjitalk755 repo gives this error for me in kpx_cpu:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:423:10: 'Availability.h' file not found
And this in SheepShaver:
/Users/macbookpro/Downloads/macemu-master/SheepShaver/src/Unix/main_unix.cpp:131:10: 'X11/Xlib.h' file not found
I have xquartz installed? I also ran sudo xcode-select --install

Hmm...
User avatar
Ronald P. Regensburg
Expert User
Posts: 6459
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Compiling SheepShaver on Catalina

Post by Ronald P. Regensburg »

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:423:10: 'Availability.h' file not found
Never seen an error like that. I can see that in the file
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator
on line 423 a file Availability.h is to be included.

It should be a file somewhere inside Xcode. Which Xcode version do you use? Was Xcode installed correctly? Did you make any changes to Xcode?
/Users/macbookpro/Downloads/macemu-master/SheepShaver/src/Unix/main_unix.cpp:131:10: 'X11/Xlib.h' file not found
Also a file missiing in Xcode?
I also ran sudo xcode-select --install
Why is that?

I really am at loss. I cannot see from here what you are doing. It should be quite easy, takes only seconds.
Last edited by Ronald P. Regensburg on Tue Jan 28, 2020 10:09 pm, edited 1 time in total.
Reason:  
User avatar
classicmacreborn
Inquisitive Elf
Posts: 38
Joined: Tue Jan 24, 2017 6:58 am

Re: Compiling SheepShaver on Catalina

Post by classicmacreborn »

Hmm.. I believe you. The files are all actually there. Not sure what's going on. I haven't modified xcode. I just installed the latest version from the app store.

I will try cleaning everything out and starting as fresh as possible...
Last edited by classicmacreborn on Tue Jan 28, 2020 10:25 pm, edited 1 time in total.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6459
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Compiling SheepShaver on Catalina

Post by Ronald P. Regensburg »

Ronald P. Regensburg wrote:
/Users/macbookpro/Downloads/macemu-master/SheepShaver/src/Unix/main_unix.cpp:131:10: 'X11/Xlib.h' file not found
Also a file missiing in Xcode?
Yes, the file should be here:

Code: Select all

Xcode.app/Contents/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/XLib.h
Something seems wrong with your Xcode installation.
Last edited by Ronald P. Regensburg on Tue Jan 28, 2020 10:27 pm, edited 1 time in total.
Reason:  
emendelson
Forum All-Star
Posts: 1233
Joined: Tue Oct 14, 2008 12:12 am

Re: Compiling SheepShaver on Catalina

Post by emendelson »

Ronald P. Regensburg wrote:
emendelson wrote:I'm not a Mac right now, but don't you also have to go into Project Settings and switch to the Legacy Build System (for SheepShaver, not for BasiliskII in the latest code)?
No, that is not needed for SheepShaver, already for quite some time. It was needed for BasiliskII until kanjitalk755 solved the issue with the New Build System in Xcode 10+ for BasiliskII recently.
Apologies for bandwidth-wasting. Of course you're right. I should have waited until I was back at my Mac...
Post Reply