mockingbirdnest / Principia

𝑛-Body and Extended Body Gravitation for Kerbal Space Program
MIT License
771 stars 70 forks source link

Principia DLL won't load on macOS Sequoia #4130

Open rsparkyc opened 3 days ago

rsparkyc commented 3 days ago

image

Additional Context: Running MacOS Sequoia, followed everything that was listed in discord beginning here: https://discord.com/channels/319857228905447436/480397772248580098/1129098065563893781

Also started a conversation here about it: https://discord.com/channels/319857228905447436/480397772248580098/1301195449968885760

note: the SO file never shows up as getting blocked in system settings, and yet I can see the file exists when I look at the path

And apologies, I know you hate mac support :(

rsparkyc commented 3 days ago

KSP.log

pleroy commented 3 days ago

Is there anything like ktrace or truss on macOS? A trace of the system calls that happen when it's trying to launch the game might help.

rsparkyc commented 2 days ago

So I wrote this script:

#!/bin/bash

# Define the output file
OUTPUT_FILE="ksp_fs_usage.log"

# Start KSP
open -a /Applications/KSP_osx/KSP.app
echo "Launching KSP..."

# Start fs_usage and filter for "KSP", saving the output to a file
echo "Monitoring file and network activity with fs_usage and saving to $OUTPUT_FILE..."
sudo fs_usage | grep "KSP" > "$OUTPUT_FILE"

I've gzipped the output and attached it here: ksp_fs_usage.log.gz


I could also try dtrace, but need to disable system integrity protection for that one.

rsparkyc commented 2 days ago

Interestingly, I saw these lines in that file:

318469:16:31:27  stat64            /Applications/KSP_osx/KSP.app/Contents/Frameworks/principia.so                   0.000008   KSP
318470:16:31:27  access            /Applications/KSP_osx/KSP.app/Contents/Frameworks/principia.so                   0.000002   KSP

I tried dropping the so file in there, and it seems to have loaded

rsparkyc commented 2 days ago

image

Seems to work! The question is, why did I need to put in in there?

rnlahaye commented 2 days ago

Oddly, I do see stat64 /Applications/KSP_osx/GameData/Principia/MacOS64/principia.so in the log also.

rsparkyc commented 2 days ago

Yeah, and the error specifically stated that was what it couldn't find

rnlahaye commented 2 days ago

Silly question: does the file have executable permissions? (What does ls -lh /Applications/KSP_osx/GameData/Principia/MacOS64/principia.so say?)

rsparkyc commented 2 days ago

it does not:

-rw-rw-r--@ 1 ryancaskey  staff    25M Oct 29 19:11 ./principia.so

after a chmod +x principia.so we get this:

-rwxrwxr-x@ 1 ryancaskey  staff    25M Oct 29 19:11 ./principia.so

however, the problem persists (unless, of course, I drop the unadulterated file into KSP_osx/KSP.app/Contents/Frameworks)

astro-angelfish commented 1 day ago

I've run into similar issue either. Seems the loader didn't cooperate well along with my OS or Mono environment:

Here's my log: https://pastebin.com/FYiXGyBY

pleroy commented 1 day ago

That last comment is some kind of Linux (we are not told which distro), so unrelated to the rest of the issue. I updated the title to clarify that this issue is about macOS.

astro-angelfish commented 1 day ago

That last comment is some kind of Linux (we are not told which distro), so unrelated to the rest of the issue. I updated the title to clarify that this issue is about macOS.

Ok. I'm gonna open another new issue for it with more detailed information.