RESOLVED FIXED 224602
MacCatalyst ANGLE is linked with @loader_path/../../../libANGLE-shared.dylib
https://bugs.webkit.org/show_bug.cgi?id=224602
Summary MacCatalyst ANGLE is linked with @loader_path/../../../libANGLE-shared.dylib
Kimmo Kinnunen
Reported 2021-04-15 05:29:19 PDT
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,
Attachments
Patch (1.76 KB, patch)
2021-04-20 10:01 PDT, Alex Christensen
no flags
Patch (1.78 KB, patch)
2021-04-20 14:18 PDT, Alex Christensen
no flags
Kimmo Kinnunen
Comment 1 2021-04-15 05:30:07 PDT
Alex Christensen
Comment 2 2021-04-20 09:56:56 PDT
DYLIB_INSTALL_NAME_BASE is probably wrong when WK_ALTERNATE_FRAMEWORKS_DIR is used.
Alex Christensen
Comment 3 2021-04-20 09:59:44 PDT
I'm planning to fix this this afternoon.
Alex Christensen
Comment 4 2021-04-20 10:01:40 PDT
EWS Watchlist
Comment 5 2021-04-20 10:02:32 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Kimmo Kinnunen
Comment 6 2021-04-20 11:05:38 PDT
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?
Alex Christensen
Comment 7 2021-04-20 12:14:45 PDT
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.
Alex Christensen
Comment 8 2021-04-20 13:32:21 PDT
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.
Alexey Proskuryakov
Comment 9 2021-04-20 14:09:30 PDT
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.
Alex Christensen
Comment 10 2021-04-20 14:15:58 PDT
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.
Alex Christensen
Comment 11 2021-04-20 14:18:40 PDT
EWS
Comment 12 2021-04-20 14:45:29 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.