Bug 272053 - Remove configure-xcode-for-embedded-development
Summary: Remove configure-xcode-for-embedded-development
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Williams
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-04-02 13:36 PDT by Brooke Vibber
Modified: 2024-05-01 11:39 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brooke Vibber 2024-04-02 13:36:33 PDT
The configure-xcode-for-embedded-development script doesn't work with Xcode 15.3 on macOS 14.4.1/x86_64 when run with sudo:

% xcodebuild -version
Xcode 15.3
Build version 15E204a

% sudo Tools/Scripts/configure-xcode-for-embedded-development                                                               
Traceback (most recent call last):
  File "/Users/bvibber/src/webkit/WebKit/Tools/Scripts/configure-xcode-for-embedded-development", line 175, in <module>
    main()
  File "/Users/bvibber/src/webkit/WebKit/Tools/Scripts/configure-xcode-for-embedded-development", line 170, in main
    update_xcspec_files()
  File "/Users/bvibber/src/webkit/WebKit/Tools/Scripts/configure-xcode-for-embedded-development", line 132, in update_xcspec_files
    raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), dest_spec_path)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('/Applications/Xcode.app/Contents/Developer/Library/Xcode/Plug-ins/XCBSpecifications.ideplugin/Contents/Resources/Embedded-Shared.xcspec')

This seems to prevent building JavaScriptCore when attempting to build for device (assuming it is in fact possible to build and run on device for testing bugs).
Comment 1 Brooke Vibber 2024-04-02 15:41:53 PDT
This also seems to prevent JavaScriptCore from building for ios-simulator, which _ought_ to be runnable with a local build from what I understand. A build completes, but it complains that JSC is missing on run:

% ./Tools/Scripts/run-safari --ios-simulator
Can't find built framework at "/Users/bvibber/src/webkit/WebKit/WebKitBuild/Release-iphonesimulator/JavaScriptCore.framework/JavaScriptCore".
Comment 2 Radar WebKit Bug Importer 2024-04-03 12:41:22 PDT
<rdar://problem/125864015>
Comment 3 Alexey Proskuryakov 2024-04-03 12:44:53 PDT
It is not possible to run on device, but the rest should be possible. It is surprising that we don't seem to have run into this when upgrading our bots to iOS 14.4.1 SDK recently, I wonder if there is some step missing.
Comment 4 Elliott Williams 2024-04-03 17:09:31 PDT
Out of curiosity, did you try skipping configure-xcode-for-embedded-development entirely? I have anecdotal evidence that it's no longer needed due to changes in Xcode.
Comment 5 Brooke Vibber 2024-04-04 10:22:54 PDT
No, but if I build after running and getting the error the resulting simulator binary doesn't run because JavaScriptCore is missing.
Comment 6 Alexey Proskuryakov 2024-04-09 08:41:09 PDT
I verified that both debug and release builds succeed on a fresh install without configure-xcode-for-embedded-development. A couple notes:

- The error about missing JavaScriptCore is almost certainly because of release/debug mismatch (build-webkit has produced a debug, but run-safari is looking for a release directory). The workaround it to run `run-safari --ios-simulator --debug`.

- Neither debug nor release build actually works in this scenario, filed bug 272400 and bug 272401.
Comment 7 Brooke Vibber 2024-04-09 09:30:21 PDT
(In reply to Alexey Proskuryakov from comment #6)
> I verified that both debug and release builds succeed on a fresh install
> without configure-xcode-for-embedded-development. A couple notes:
> 
> - The error about missing JavaScriptCore is almost certainly because of
> release/debug mismatch (build-webkit has produced a debug, but run-safari is
> looking for a release directory). The workaround it to run `run-safari
> --ios-simulator --debug`.
> 
> - Neither debug nor release build actually works in this scenario, filed bug
> 272400 and bug 272401.

Awesome, I'll test simulator with a fresh build -- the right way -- soon. :) Thanks for the check and for following up!
Comment 8 Brooke Vibber 2024-04-09 12:09:32 PDT
Good news: it builds and starts up in the simulator (on an M1 MacBook Air)
Bad news: it immediately crashes

% ./Tools/Scripts/run-safari --debug --ios-simulator

Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in /Users/bvibber/src/webkit/WebKit/WebKitBuild/Debug-iphonesimulator.
com.apple.mobilesafari: 20606
Comment 9 Elliott Williams 2024-04-30 12:01:44 PDT
Pull request: https://github.com/WebKit/WebKit/pull/27941
Comment 10 EWS 2024-05-01 11:39:41 PDT
Committed 278218@main (9c98cfba3429): <https://commits.webkit.org/278218@main>

Reviewed commits have been landed. Closing PR #27941 and removing active labels.