Linux x86 64-bit builds for SheepShaver, Basilisk II

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

Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Hi folks,

I have set up an automated build service for SheepShaver and Basilisk II producing weekly Linux executables for 64-bit x86. They are AppImages, thus contain all their libraries*. Launchers and an "installer" are included. The Dockerfile used in the build process may prove useful for other builds as well.

The source repo being pulled is kanjitalk755 (but it can easily be swapped for cebix - if requested, I can create dedicated build services for both of them)

Links: Hope this helps the community :smile:

Enjoy!

- Korkman


Active compile flags for Basilisk II:

Code: Select all

	./configure \
	--enable-sdl-video=yes \
	--enable-sdl-audio=yes \
	--with-bincue \
	--without-esd \
	--with-vdeplug \
	--with-libvhd \
	--with-x \
	;
Active compile flags for SheepShaver:

Code: Select all

	./configure \
	--enable-sdl-video=yes \
	--enable-sdl-audio=yes \
	--with-bincue \
	--with-libvhd \
	--with-x \
	--without-esd \
	;
Edit: * Some libraries excluded so life stays exciting. If anyone else runs into symbol lookup errors, please report your distro, edition and release.
Last edited by Korkman on Fri May 27, 2022 1:09 pm, edited 2 times in total.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

Thanks for this nice initiative!
After installation, I´m running into some issue regarding both GUIs and SheepShaver on Fedora 64 bit:

[hsp@fedora-64b ~]$ cd .local/
[hsp@fedora-64b .local]$ cd bin
[hsp@fedora-64b bin]$ ls
BasiliskII macemuAppImages SheepShaverGUI
BasiliskIIGUI SheepShaver SheepShaverMmap
[hsp@fedora-64b bin]$ ./BasiliskIIGUI
./BasiliskIIGUI: symbol lookup error: /lib64/libpango-1.0.so.0: undefined symbol: g_memdup2

Is there a dependency on xterm? I get this:
[hsp@fedora-64b bin]$ ./SheepShaver
../SheepShaverMmap: line 26: xterm: command not found

I understand from the scripts icons should appear on my desktop? But they do not. (Cinnamon on Fedora)
Menu entries are created.

So the only app that runs OOTB is BasiliskII.

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Thank you for testing!

The xterm dependency is for displaying an error message that vm.mmap_min_addr is not zero. I was foolishly hoping I could depend on that one to break out of a shell script and display a dialog. I will resort to "echo" when xterm is not available, then.

I'm very new to installing desktop icons, thought the location was fine.

The symbol lookup errors are more troubling. This is exactly what AppImage was meant to prevent.

Looking into those issues with a Live Iso now.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

The symbol lookup errors are more troubling. This is exactly what AppImage was meant to prevent.
Ha yes,

That is what I thought too.
BTW: I see you opted to compile the stand-alone GUIs. Does this not create additional complexity with app naming (leaving out the suffix to allow the GUI to find the executable)? The GUIs can also be integrated.

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

I see you opted to compile the stand-alone GUIs. Does this not create additional complexity with app naming (leaving out the suffix to allow the GUI to find the executable)?
True, it does create some complexity. But it's manageable. I've been using the Windows builds for a long time and they always came with a dedicated GUI .exe, so I thought it would be nice to have this on Linux as well. Doesn't have to be that way, though. If the community prefers unified builds I can switch to that easily.

About the icons: I cannot reproduce the icons issue on a Fedora Cinnamon live iso. I did have to log out and in again for the menu items to appear at all, though. What release are you using?

The symbol lookups are a deep rabbit hole. I'll be busy! Maybe Flatpak would have been a better path after all. It has been done before and I might create an automated build service for that as well.

Regards,
Korkman
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Symbol lookups and xterm issue solved in latest build "2022-05-27-B". Gtk throws some theme warnings on startup but I tend to ignore those.

Cheers,
Korkman
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

I think I misunderstood the icons issue. Icons are copied to the Home directory (~/.local/share/icons usually) for the menu entries. They won't show up on your desktop Cat_7. Related: The AppImages themselves don't show their icons. I'll look into that instead.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

Great! Basilisk and GUI now work.
SheepShaver now seems to have the built-in GUI and the stand-alone GUI?

The SheepShaverGUI will run, but SheepShaver will not. I guess only setting the vmmap stuff might not be sufficient?
I use to run it as root (which then has the issue of using the prefs in the root folder...)
Correction: SheepShaver does run after creating the sysctl.d rule.

Icons do indeed appear in the menu.

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

SheepShaver now seems to have the built-in GUI and the stand-alone GUI?
Yes. This is a bit inconsistent and stems from an issue in the codebase. When trying to build SheepShaver --with-standalone-gui and --with-bincue, the compiler bails out because the GUI doesn't need bincue, hence skips including the library but still contains bincue function calls. My workaround is compiling SheepShaver with the GUI included first, save the binary, then rebuild with standalone GUI but without bincue. So basically, the GUI is included twice.

Maybe a more elegant solution would be to compile only once, with GUI included, and then add --nogui true && --nogui false to the launchers?

Edit 3: Done. Builds 2022-05-27.1653656604 and up contain unified AppImages. Makes the README.de less complicated to read.

Unfortunately I now keep getting SELinux permission denials and notifications for the SheepShaver mmap access in Fedora. These didn't occur earlier?
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

SELinux is handled properly as well, now. Both the SELinux and sysctl settings are security measures regarding mmap low memory addressing. This is a common thing for low level optimized emulators and also Wine. The SheepShaver launchers now automate changing them temporarily and give instructions on how to make the change permanent, with the warning it may reduce security (it's not that bad to hit enter / type the sudo password once per session, so I actually discourage making the permanent change).
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by adespoton »

I wonder if it would be worth submitting your docker image to Kanjitalk755 so anyone could replicate the build environment as needed. It'd also be nice to have something like this targeting the ARM of Raspberry Pi 3 and 4, as those require some very particular configurations to compile correctly.
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Yes. Arm architecture was instantly on my radar as well. Unfortunately the first tool I chose to package the AppImages seems to be x86 only (linuxdeploy). Yet compiling with the Dockerfile or derivatives should work as expected and I am all for a reproducible build environment. Compiling with Docker (or Podman) is also great for rapid iteration when problems occur thanks to caching.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

Both Basilisk and SheepShaver, and their GUIs now seem to work OK. Lovely!

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

One major issue remains for me: Gtk dialog icons in Ubuntu 22.04 are missing. Reading into how to include theme files now. Seems doable. After that, we might have to wait for linuxdeploy to include ARM architectures (there's movement) for the AppImage packaging. But I can prepare the Dockerfile for Arm builds in the meantime and check how to build with qemu on Github (seems to be a common way to do it).
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Ah yes, those icons/window decorations. I omit them from Qemu builds.

btw: It seems you assume the user to already be in the sudoers list to run the SheepShaverGUI. This is not default, and how to add a user differs between distros. Also the group the user should be added to differs. (wheel on fedora)

(slowly starting to rewrite the SheepShaver/BasiliskII guides for Linux based on a download of your latest build.....)

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Well it does say "Attempting to use sudo" :lol: Even sudo itself is strictly speaking an assumption and not installed everywhere. I'll check if sudo is available and user is in sudoers and show a different prompt when not.

Btw. I'm eager to check out the new VHD feature. I tested bincue already and it is brilliant. Being able to play Audio CDs with "AppleCD Audio" - brings so much nostalgia
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Gtk dialog icons in Ubuntu 22.04 are missing. Reading into how to include theme files now. Seems doable.
This proves to be a tough one. Something is broken in Ubuntu. For example, on Debian Bullseye this switches the GUI from the dusty Raleigh to Adwaita:

Code: Select all

GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc ./SheepShaver.AppImage
On Ubuntu 22.04, this is ignored and the theme is locked to either Yaru or Yaru-Dark respectively. When I actively break Yaru by renaming files in /usr/share/themes, it finally falls back to Raleigh and the GUI runs without issues. So ironically, Raleigh and Adwaita are included in Ubuntu, but I don't know of a way to force them :-( I'm getting the impression they apply some kind of hack to force the system theme on old applications.

I can modify the Dockerfile to provide a Ubuntu build, but that one won't run on older distros like Bullseye because it contains a too recent glibc.

Edit: Replace Ubuntu with Gnome. It's the same for Debian when using Gnome Desktop, except the theme is compatible for the included libraries. Still searching for an override to the override.

Edit 2: Found it. The magic lies in sabotaging GTK3:

Code: Select all

GTK_DATA_PREFIX= ./SheepShaver.AppImage
The icons are still missing, but now I can move stuff around with GTK2_RC_FILES=.
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Turns out properly integrating GTK libraries into AppImages requires some extra steps. Steps taken. GTK issues fixed. GUI now looks beautiful in modern environments.

Build 2022-05-29.1653828981 available.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

Works perfectly over here ;-)

Great, thanks,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

While everything seems fine when I add an existing hard disk/rom etc into the GUI, I'm running into a snag when trying to boot from a cd image or real cd.

On Linux Basilisk and SheepShaver should be able to boot from a real cd, but there has to be a line in the prefs pointing to the physical drive:
cdrom /dev/cdrom

Upon a clean start (prefs etc deleted) this line is not added to the prefs when the GUI starts and so boot from cd is impossible. Manually adding the line allows boot from cd.
I guess it has to do with the limited amount of love the Linux side for the GUI has received.

An attempt to add a cdrom entry by manually pointing to a cd image also fails to boot:
cdrom /home/hsp/Mac-images/9.0.iso

Adding a cd image to the volumes list will not allow boot.

This is not something your builds should fix, I'll kindly ask kanjitalk to look at it.

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Hi,

thank you for testing more! I'm working on a major update to the build process to allow armhf and aarm64 builds to feed those Raspberry Pis - at least in theory. BasiliskII does compile while SheepShaver seems troublesome. Reading into the issue in various places it seems broken until someone fixes the code, so not really something I can fix right now. Also, linuxdeploy isn't ready to support non-x86 builds. So for now, the automated builds will only gain i386 with my next update. But kanjitalk may be interested in it as the "compile" script gains cross-platform debugging functions.

Regards,

Korkman
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by adespoton »

Korkman wrote: Tue May 31, 2022 5:43 pm Hi,

thank you for testing more! I'm working on a major update to the build process to allow armhf and aarm64 builds to feed those Raspberry Pis - at least in theory. BasiliskII does compile while SheepShaver seems troublesome. Reading into the issue in various places it seems broken until someone fixes the code, so not really something I can fix right now. Also, linuxdeploy isn't ready to support non-x86 builds. So for now, the automated builds will only gain i386 with my next update. But kanjitalk may be interested in it as the "compile" script gains cross-platform debugging functions.

Regards,

Korkman
Aww... I got really excited for a moment when it looked like you got aarm64 compiling to a stable target binary :)

I just realized, I'm now running a 99% x86-free place over here; 68k, ppc, aarm64 and aarch64, with only a few older x86 machines that don't come out much :D
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

Kanjitalk has been so kind to fix the prefs for the cdrom entries.

Best,
Cat_7
Korkman
Tinkerer
Posts: 40
Joined: Fri Jan 03, 2003 3:41 am

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Korkman »

Hi,

the i386 builds are online and everything is split up now - BasiliskII and SheepShaver are separate downloads.

@Cat_7 can you test again, I'm getting segfaults on Fedora but Debian is fine. I suspect my prefs or VM isn't working (new install).

Thank you!

Edit: --sdlrender software solved the issue.
Edit 2: Not enabling 3d acceleration in VirtualBox also solved the issue.

Regards,

Korkman
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Linux x86 64-bit builds for SheepShaver, Basilisk II

Post by Cat_7 »

Hi,

I've got a crash with Sheephaver in Fedora.
A list of:
llegal instruction at 0000005c, opcode = 000791c0
Illegal instruction at 00000064, opcode = 0009a802
Illegal instruction at 0000007c, opcode = 0007d48c
Illegal instruction at 00000100, opcode = ffff0048
Illegal instruction at 00000104, opcode = 00480064

And then:
SIGSEGV
pc 0x780c5c34
ea 0xfe816710
r0 ec50727d r1 ffffb107 r2 cb47e03f r3 0000026f
r4 70620000 r5 00520000 r6 48bc0fa0 r7 ffca8fff
r8 ec500031 r9 ff960031 r10 08b80000 r11 a8500031
r12 aa50503c r13 ffffffff r14 00000000 r15 e05023ff
r16 00000000 r17 b4500031 r18 b4500031 r19 01d28120
r20 b4500031 r21 00000007 r22 b4500031 r23 00000000
r24 0000003f r25 00010000 r26 b4500031 r27 b4000791
r28 00000000 r29 b40009a8 r30 00000000 r31 a050f74f
f0 0.00000 f1 0.00000 f2 0.00000 f3 -0.00000
f4 4503600846540363.00000 f5 4503600846540313.00000 f6 0.00000 f7 385149.00000
f8 4503599627755645.00000 f9 385149.00000 f10 0.00000 f11 9628732.00000
f12 50000.00000 f13 0.02500 f14 0.00000 f15 nan
f16 0.00000 f17 0.00000 f18 0.00000 f19 0.00000
f20 0.00000 f21 0.00000 f22 0.00000 f23 nan
f24 -0.00000 f25 0.00000 f26 0.00000 f27 0.00000
f28 0.00000 f29 0.00000 f30 0.00000 f31 -0.00000
lr 000e5a0c ctr fffffffd cr 40048881 xer 00000000
pc fe816710 fpscr 00001000
0xfe8166f0: ./SheepShaverMmap: line 134: 28288 Segmentation fault (core dumped) ./SheepShaver.AppImage "$@"
Post Reply