Skip to content

Remove symlink-based DLL deduplication from MacOS build#4557

Merged
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/macos-bloat-is-mandatory
Apr 21, 2026
Merged

Remove symlink-based DLL deduplication from MacOS build#4557
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/macos-bloat-is-mandatory

Conversation

@HebaruSan
Copy link
Copy Markdown
Member

@HebaruSan HebaruSan commented Apr 12, 2026

Problem

A Mac user reported this error on launch:

cd "/Applications/CKAN.app/Contents/MacOS/arm64"; ./CKAN-CmdLine consoleui
➜  ~ cd "/Applications/CKAN.app/Contents/MacOS/arm64"; ./CKAN-CmdLine consoleui
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[1]    68035 abort      ./CKAN-CmdLine consoleui
➜  arm64 

Cause

This is still being investigated, but my current best guess is that System.Runtime.dll isn't loading because it's a symlink to the identical copy of that file in ../x86_64/. I thought we had tested this already in #4410 and #4418, but maybe those tests were flawed somehow.

Changes

Now we just build the big bloated version of the CKAN.app with two copies of many files, one per architecture, instead of replacing duplicates with symlinks. This will allow us to test whether this solves the problem.

Fixes #4542 (maybe, needs confirmation from @robism05).

Looks like the file size difference is about 14 MB:

Before: image
After: image

@HebaruSan HebaruSan added Bug Something is not working as intended In progress We're still working on this Build Issues affecting the build system macOS Issues specific for macOS Package: dmg Issues affecting macOS packaging labels Apr 12, 2026
@coveralls

This comment was marked as off-topic.

@HebaruSan
Copy link
Copy Markdown
Member Author

Hi @robism05, we have a test build inside this ZIP file with some changes that might help your issue in #4542:

If you have a chance, please try it out and let us know how it goes. Thanks!

@HebaruSan HebaruSan changed the title Remove symlink-based deduplication from MacOS build Remove symlink-based DLL deduplication from MacOS build Apr 15, 2026
@HebaruSan
Copy link
Copy Markdown
Member Author

Test build expired with no response from user.
Let's just merge this, at least it would eliminate the symlinks from the pool of possible causes if the issue does persist...

@HebaruSan HebaruSan merged commit af9528f into KSP-CKAN:master Apr 21, 2026
12 checks passed
@HebaruSan HebaruSan deleted the fix/macos-bloat-is-mandatory branch April 21, 2026 18:46
@robism05
Copy link
Copy Markdown

I'm sorry I was away for a while so I'm only just seeing this. I'm aware this issue has been closed and I was unable to try the test build, however I didn't come across the issue again thereafter. Thank you so much either way I didn't expect such a helpful and speedy response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working as intended Build Issues affecting the build system In progress We're still working on this macOS Issues specific for macOS Package: dmg Issues affecting macOS packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime' on macOS 26.4, arm64 architecture

3 participants