MacCatalyst ANGLE is linked with @loader_path/../../../libANGLE-shared.dylib The path may be wrong. The use of @loader_path is probably wrong. ld: warning: invalid -install_name (@loader_path/../../../libANGLE-shared.dylib) in dependent dylib (/Users/kkinnunen/Build/Debug-maccatalyst/libANGLE-shared.dylib). Dylibs/frameworks which might go in dyld shared cache cannot link with dylib that uses @rpath, @loader_path,
<rdar://76602857>
DYLIB_INSTALL_NAME_BASE is probably wrong when WK_ALTERNATE_FRAMEWORKS_DIR is used.
I'm planning to fix this this afternoon.
Created attachment 426562 [details] Patch
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment on attachment 426562 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426562&action=review > Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig:28 > DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../; Out of curiosity, in which this loader_path is correct?
The use of @loader_path is necessary when we use WK_RELOCATABLE_FRAMEWORKS because we need to be able to relocate them and have dyld still find the dylib relative to the framework.
Comment on attachment 426562 [details] Patch When building project ANGLE: INSTALL_PATH\=/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks DYLIB_INSTALL_NAME_BASE\=/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks When building project ANGLE_iosmac before this change: INSTALL_PATH\=/System/iOSSupport//System/Library/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks DYLIB_INSTALL_NAME_BASE\=@loader_path/../../../ When building project ANGLE_iosmac after this change: INSTALL_PATH\=/System/iOSSupport//System/Library/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks DYLIB_INSTALL_NAME_BASE\=/System/iOSSupport//System/Library/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks This leads me to believe this will fix the problem.
Comment on attachment 426562 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426562&action=review > Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig:26 > +DYLIB_INSTALL_NAME_BASE_USE_ALTERNATE_FRAMEWORKS_DIR_YES = @(INSTALL_PATH); Looking at other projects, and even at the below line, we are using DYLIB_INSTALL_NAME_BASE for this case, not INSTALL_PATH. There is probably no difference in practice, but let's use the same solution as elsewhere.
I verified that does the same thing so I'll do it. I also verified that when using relocatable frameworks, DYLIB_INSTALL_NAME_BASE is @loader_path/../../../ so there *should* be no problem there.
Created attachment 426589 [details] Patch
Committed r276318 (236799@main): <https://commits.webkit.org/236799@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426589 [details].