Page 1 of 1

Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 8:11 am
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?

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 11:30 am
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

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 6:29 pm
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?

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 6:48 pm
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.

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 7:59 pm
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...

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 8:03 pm
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.

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 8:16 pm
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'

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 8:39 pm
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?

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 9:32 pm
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...

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 10:00 pm
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.

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 10:23 pm
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...

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 10:24 pm
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.

Re: Compiling SheepShaver on Catalina

Posted: Tue Jan 28, 2020 11:54 pm
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...