joncampbell123 / dosbox-svn

DOSBox SVN (clone of SVN repo to help coordinate any patches between DOSBox and DOSBox-X)
GNU General Public License v2.0
3 stars 0 forks source link

Segfaults in High Sierra (even if built in Mojave) #1

Closed emendelson closed 5 years ago

emendelson commented 5 years ago

This is spectacularly useful because it makes it possible to build static-linked 64-bit DOSBox in macOS, something that (so far) only Dominus on the Vogons forum has been able to do.

It works perfectly if I build in Mojave. But the built-in-Mojave executable segfaults when I copy it to High Sierra and try to run it in High Sierra.

If I build in High Sierra, the executable gets built, but it segfaults on launch (Segmentation Fault 11). And the built-in-High-Sierra executable segfaults in Mojave if I copy it to Mojave and build it there.

There's no reason why you should fix this, but I hope the DOSBox project might consider adding your SDL1 code so that it would be possible to build custom versions in macOS.

joncampbell123 commented 5 years ago

I think I'll look into downgrading the Mac Mini back to High Sierra to debug these kinds of issues. It's probably something simple I broke by accident. I'll be able to continue supporting Mojave on a Macbook Pro I was able to pick up this Christmas season.

emendelson commented 5 years ago

That would be terrific. Meanwhile, here's the tail of the output from the High Sierra build, launched in High Sierra:

0: FILES:Special file open command 80 file Z:\AUTOEXEC.BAT 15000: VGA:h total 100 end 80 blank (80/98) retrace (85/97) 15000: VGA:v total 449 end 400 blank (407/442) retrace (412/414) 15000: VGA:h total 0.03178 (31.47kHz) blank(0.02542/0.03114) retrace(0.0270 1/0.03082) 15000: VGA:v total 14.26806 (70.09Hz) blank(12.93341/14.04562) retrace(13.0 9230/13.15585) 15000: VGA:Width 640, Height 400, fps 70.086592 15000: VGA:normal width, normal height aspect 1.200000 Segmentation fault: 11

joncampbell123 commented 5 years ago

So apparently Mojave refuses to allow running the High Sierra installer, at all. There are steps to make "bootable" USB pen drives to install from... which the Mac Mini completely ignores from the Startup Disk and boot menu you can get by holding Alt/Option. This is on a Mac Mini that originally came with El Capitan. The only way to reinstall is to use the internet reinstall apparently, which I managed to direct it to install to a USB pen drive.

The plan is to keep Mojave on the internal drive, and boot El Capitan and High Sierra from some unused 32GB and 64GB pen drives I have lying around. If it works, I'll be able to test all three versions of the OS.

joncampbell123 commented 5 years ago

El Capitan's installer has a curiously funny unsigned integer underflow bug.

img_20181228_212401925 web

joncampbell123 commented 5 years ago

Okay, never install OS X onto a USB pen drive, even if the pen drive supports USB 3.0 speeds... app installation, even with Brew, is waaaaaayyyy tooooooooo sllllooooooooowwwwwwww.

joncampbell123 commented 5 years ago

It's been slow enough that I've literally spent the last 5 hours getting El Capitan onto a 32GB pen drive and I still have yet to get High Sierra onto the 64GB pen drive.

emendelson commented 5 years ago

I've given up on booting macOS from external drives. The only practical answer is to break open the machine (not easy with a Mac Mini) and install a drive large enough to partition into multiple OSes. Or install VMware Fusion but that's slow too...

emendelson commented 5 years ago

BTW,

10.11 = El Capitan 10.12 = Sierra 10.13 = High Sierra 10.14 = Mojave

Would it make more sense to support 10.12 - 10.14, instead of El Capitan?

joncampbell123 commented 5 years ago

I think I'll do that.

joncampbell123 commented 5 years ago

By the way it wasn't a total waste. Having a bootable El Capitan USB drive makes installing OS X again easier even if it's slow because Mojave would NOT allow me to install the older versions, and the instructions to make a "bootable" install disk for older versions didn't actually make them bootable, it just made them a pen drive with the installer.

joncampbell123 commented 5 years ago

I put a large enough SSD into it that I will be able to partition it for El Capitan, Sierra, High Sierra, and Mojave with room for a few future OS X releases as well. The pre-Mojave OSes are given smaller partitions since they exist only to load the OS, XCode, Brew and compile and test DOSBox-X.

When I run out of partitions I'll make room for the newest by dropping off the oldest version.

joncampbell123 commented 5 years ago

DOSBox SVN segfaults in El Capitan too:

joncampbell123 commented 5 years ago

I think I fixed it in the latest commit. There may be other segfaults waiting for me as I continue testing.

joncampbell123 commented 5 years ago

DOSBox SVN: If you compile for Sierra and run it under El Capitan, it crashes because El Capitan doesn't have clock_gettime() (used in the BIOS emulation).

joncampbell123 commented 5 years ago

I have the SSD partitioned and I got four versions from El Capitan to Mojave each on their own partition. Testing across the four should be easier now.

emendelson commented 5 years ago

High Sierra fixed - thank you!