Skip to content

Instantly share code, notes, and snippets.

@navyxliu
Last active October 31, 2023 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navyxliu/98756246d73a68635c23e5b22e9a00f1 to your computer and use it in GitHub Desktop.
Save navyxliu/98756246d73a68635c23e5b22e9a00f1 to your computer and use it in GitHub Desktop.
Building your own jsc

troubleshooting

➜  WebKit git:(main) ./WebKitBuild/Debug/jsc
dyld[8692]: Symbol not found: __ZN3JSC27retrieveTypeImportAttributeEPNS_14JSGlobalObjectERKN3WTF7HashMapINS2_6RefPtrINS2_17UniquedStringImplENS2_12RawPtrTraitsIS5_EENS2_21DefaultRefDerefTraitsIS5_EEEENS2_6StringENS2_11DefaultHashISA_EENS2_10HashTraitsISA_EENSE_ISB_EENS2_15HashTableTraitsEEE
  Referenced from: <BD3D10DA-F74B-3755-8B54-29D1F10163E5> /Users/xxinliu/Devel/WebKit/WebKitBuild/Debug/jsc (built for macOS 14.0 which is newer than running OS)
  Expected in:     <957522FA-9B44-3C8F-9BD4-A209C728B133> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
[1]    8692 abort      ./WebKitBuild/Debug/jsc

The problem here is JSC depends on WTF(who would name its library that? it seems the acronym of webkit's template framework). Dynamic loader has difficulty to resolve this symbol in WTF. we need to teach dynamic laoder to get from what you built

one way to around arount it. ./Tools/Scripts/run-jsc --debug This is equivalence of DYLD_FRAMEWORK_PATH=/Users/xxinliu/Devel/WebKit/WebKitBuild/Debug /Users/xxinliu/Devel/WebKit/WebKitBuild/Debug/jsc --useDollarVM=1

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