Bug 250440

Summary: Build WebKit for iOS failed, b(l) ARM64 branch out of range
Product: WebKit Reporter: 929388885
Component: WebCore Misc.Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: 929388885, achristensen, ajuma, ap, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: iOS 16   

Description 929388885 2023-01-10 22:27:07 PST
ld: b(l) ARM64 branch out of range (134443420 max is +/-128MB): from __ZN3PAL19ScreenSleepDisabler11updateStateEv (0x00033C5C) to _objc_msgSend$setIdleTimerDisabled: (0x0806AE80) in '__ZN3PAL19ScreenSleepDisabler11updateStateEv' from /Users/vanney/Library/Developer/Xcode/DerivedData/WebKitBuild/Debug-iphoneos/libPAL.a(SleepDisablerIOS.o) for architecture arm64
Comment 1 Alexey Proskuryakov 2023-01-12 12:35:10 PST
We are not seeing this in continuous integration. How did you build (revision, Xcode version, command)?
Comment 2 Radar WebKit Bug Importer 2023-01-17 22:28:16 PST
<rdar://problem/104367167>
Comment 3 Ali Juma 2023-02-09 06:50:53 PST
(In reply to Alexey Proskuryakov from comment #1)
> We are not seeing this in continuous integration. How did you build
> (revision, Xcode version, command)?

I'm running into this as well, at revision https://commits.webkit.org/260059@main

This reproduces with both Xcode 14.0 and 14.2, on an M1 MacBook Pro, with command "build-webkit --debug --ios-simulator".

Given that continuous integration is unaffected, I wonder if this is specific to targeting ARM using the public SDK, since the debug builder bot only targets x86_64 simulators.

Release builds work for me.
Comment 4 Alex Christensen 2023-02-09 15:00:54 PST
I thought I fixed this with 259898@main.  Ali's revision seems to be right after that, though.  Strange.
Comment 5 Alex Christensen 2023-02-09 17:53:02 PST
I did see this before that change and didn't see it after it, so in at least one configuration it fixed it.  Please confirm if this is still an issue.
Comment 6 Ali Juma 2023-02-10 10:28:36 PST
(In reply to Alex Christensen from comment #5)
> I did see this before that change and didn't see it after it, so in at least
> one configuration it fixed it.  Please confirm if this is still an issue.

Yes, I'm still getting this for debug builds (tried again at 260074@main with Xcode 14.2).
Comment 7 929388885 2023-02-14 03:33:31 PST
(In reply to Alexey Proskuryakov from comment #1)
> We are not seeing this in continuous integration. How did you build
> (revision, Xcode version, command)?

I still got this error today. 

B(l) ARM64 branch out of range (135033724 max is +/-128MB): from __ZN3PAL26webDefaultCFStringEncodingEv (0x0007B3F0) to _objc_msgSend$isEqualToString: (0x08142920) in '__ZN3PAL26webDefaultCFStringEncodingEv' from /Users/vanney/Library/Developer/Xcode/DerivedData/WebKitBuild/Debug-iphoneos/libPAL.a(TextEncodingRegistryIOS.o) for architecture arm64

I build from master(commit: 3563129ef78f) with xcode 14.2. And build for iOS device (iPhone 13 - iOS 16.2); not build for simulator. 

My build steps:
1. sudo Tools/Scripts/configure-xcode-for-embedded-development
2. Open WebKit.xcworkspace with xcode
3. Change baseSDK from Mac to iOS
4. Select "Everything up to Webkit" scheme
5. Start build
Comment 8 Alex Christensen 2023-02-17 14:48:50 PST
yeah, I'm seeing this today, too.
Comment 9 Alex Christensen 2023-02-17 15:21:19 PST
Pull request: https://github.com/WebKit/WebKit/pull/10308
Comment 10 EWS 2023-02-17 16:53:10 PST
Committed 260479@main (d881460ef50f): <https://commits.webkit.org/260479@main>

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