darling icon indicating copy to clipboard operation
darling copied to clipboard

dyld: Symbol not found: _OBJC_CLASS_$_NSStoryboardSegue

Open DavidBerdik opened this issue 4 years ago • 10 comments

Framework AppKit. As I understand, AppKit is supported by Darling, but only partially. I should note that I am very new to Darling and haven't quite figured out what is and is not supported in regards to GUI applications yet, though.

Test Application Sliver 6.1 Direct Download: https://www.appletech752.com/Downloads/SliverV6.1.dmg Dev Download Page: https://www.appletech752.com/downloads.html

Steps To Reproduce

  1. Download Sliver
  2. On my system, I used 7z x SliverV6.1.dmg to extract the DMG and then copied it in to place. I tried using the hdiutil attach method described in the docs to mount the dmg, but received a corruption error, so resorted to the 7z approach.
  3. After installing Sliver, attempt to run it. I had to chmod +x /Applications/Sliver.app/Contents/MacOS/Sliver before I was able to attempt to run the application.
  4. Instead of executing as expected, the application will crash with the following error:
Darling [/Volumes/SystemRoot/home/david]$ /Applications/Sliver.app/Contents/MacOS/Sliver
dyld: Symbol not found: _OBJC_CLASS_$_NSStoryboardSegue
  Referenced from: /Applications/Sliver.app/Contents/MacOS/Sliver
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Applications/Sliver.app/Contents/MacOS/Sliver
abort_with_payload: reason: Symbol not found: _OBJC_CLASS_$_NSStoryboardSegue
  Referenced from: /Applications/Sliver.app/Contents/MacOS/Sliver
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Applications/Sliver.app/Contents/MacOS/Sliver; code: 4
Abort trap: 6

System Information OS: Ubuntu 21.04 hirsute Kernel: x86_64 Linux 5.11.0-31-generic

| Software | Version            |
| Darling  | master @ 9393db2c6 |
| Sliver   | 6.1                |

DavidBerdik avatar Aug 30 '21 02:08 DavidBerdik

Simmilar with Telegram.dmg:

sudo darling /home/pav/.darling/Applications/Telegram.app/Contents/MacOS/Telegram 

dyld: Symbol not found: _OBJC_CLASS_$_NSHapticFeedbackManager
  Referenced from: /Volumes/SystemRoot/home/pav/.darling/Applications/Telegram.app/Contents/MacOS/../Frameworks/TGUIKit.framework/Versions/A/TGUIKit
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Volumes/SystemRoot/home/pav/.darling/Applications/Telegram.app/Contents/MacOS/../Frameworks/TGUIKit.framework/Versions/A/TGUIKit
abort_with_payload: reason: Symbol not found: _OBJC_CLASS_$_NSHapticFeedbackManager
  Referenced from: /Volumes/SystemRoot/home/pav/.darling/Applications/Telegram.app/Contents/MacOS/../Frameworks/TGUIKit.framework/Versions/A/TGUIKit
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Volumes/SystemRoot/home/pav/.darling/Applications/Telegram.app/Contents/MacOS/../Frameworks/TGUIKit.framework/Versions/A/TGUIKit; code: 4

p182 avatar Sep 05 '21 14:09 p182

@p182 As far as I can tell, this is happening because Darling has effectively no AppKit support at this time. I believe they are very slowly working on it, but it's nowhere near mature enough to be usable.

I would like one of the devs to confirm that before closing this, though.

DavidBerdik avatar Sep 05 '21 17:09 DavidBerdik

"effectively no AppKit support" might just be too strong of an expression — we have tons of AppKit code, and some apps working :slightly_smiling_face:

That doesn't mean we have all the latest stuff Apple keeps coming up with, though. In particular, we don't support storyboards yet. Better try some apps that target OS X 10.6 or so.

bugaevc avatar Sep 05 '21 18:09 bugaevc

we have tons of AppKit code, and some apps working 🙂

Ah, okay. I knew that the project has tons of AppKit code, but I was under the impression that it was lots and lots of boilerplate and not actually really usable yet.

DavidBerdik avatar Sep 05 '21 18:09 DavidBerdik

Can you perform darling-stub-gen on AppKit to bring it from macOS to Linux? I have similar issue https://github.com/darlinghq/darling/issues/1036

superbonaci avatar Sep 11 '21 05:09 superbonaci

This is not something that I have tried, but I have a feeling that AppKit is way too involved for that to be doable and that if it was feasible, someone else would have done it already. Perhaps @bugaevc can answer that?

DavidBerdik avatar Sep 11 '21 11:09 DavidBerdik

How would generating stubs bring AppKit to Linux? Do you understand what stubs are?

LubosD avatar Sep 11 '21 11:09 LubosD

Do you understand what stubs are?

I have basically no understanding of what they are. I know just enough to know that they aren't really a serious solution to missing libraries.

DavidBerdik avatar Sep 11 '21 11:09 DavidBerdik

What if I just copy the /System/Library/Frameworks/AppKit.framework/ folder from a real macOS to Linux? Should that work or you have to do some kind of "installation" or native "compilation"?

superbonaci avatar Sep 11 '21 17:09 superbonaci

That would not work at all.

AppKit has backend(s), and Apple's one is very different from ours. There has been some work to make our backends at least look more like Apple's, but we're not there yet, and even that likely wouldn't be nearly enough to make Apple's AppKit work on Darling.

bugaevc avatar Sep 11 '21 17:09 bugaevc