Bug 226668 - Weak external symbols found in WebKit.framework with Release+Coverage configuration
Summary: Weak external symbols found in WebKit.framework with Release+Coverage configu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 226562
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-04 16:02 PDT by David Kilzer (:ddkilzer)
Modified: 2021-06-06 07:44 PDT (History)
10 users (show)

See Also:


Attachments
Patch v1 (7.06 KB, patch)
2021-06-04 16:12 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (28.66 KB, patch)
2021-06-05 12:06 PDT, David Kilzer (:ddkilzer)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch v3 (29.95 KB, patch)
2021-06-05 12:37 PDT, David Kilzer (:ddkilzer)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch v4 (29.96 KB, patch)
2021-06-05 12:41 PDT, David Kilzer (:ddkilzer)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch v5 (29.99 KB, patch)
2021-06-05 13:08 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2021-06-04 16:02:13 PDT
Weak external symbols found in WebKit.framework with Release+Coverage configuration:

PhaseScriptExecution Check\ For\ Weak\ VTables\ and\ Externals WebKit.build/Release/WebKit.build/Script-5DF408C5131DD46700130071.sh
    cd Source/WebKit
    /bin/sh -c WebKit.build/Release/WebKit.build/Script-5DF408C5131DD46700130071.sh
ERROR: WebKit has a weak external symbol in it (Release/WebKit.framework/Versions/A/WebKit)
ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
ERROR: symbol _TCCAccessPreflight
ERROR: symbol _TCCAccessPreflightWithAuditToken
Command /bin/sh failed with exit code 1

Follow-up to Bug 226562.
Comment 1 Radar WebKit Bug Importer 2021-06-04 16:03:22 PDT
<rdar://problem/78890081>
Comment 2 David Kilzer (:ddkilzer) 2021-06-04 16:12:07 PDT
Created attachment 430629 [details]
Patch v1
Comment 3 Alex Christensen 2021-06-04 16:16:49 PDT
Comment on attachment 430629 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=430629&action=review

> Source/WebKit/ChangeLog:3
> +        Weak external symbols found in WebKit.framework with Release+Coverage configuration

I'm happy to see activity around coverage.

> Source/WebKit/Configurations/WebKit.unexp:8
> +__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE

I wonder if these are needed any more.  I'm not sure what use of std::stringstream we have in WebKit.  Maybe we used to.  I can't imagine we are re-exporting its use from ANGLE

> Source/WebKit/Configurations/WebKit.unexp:20
> +# Methods from std::__1::function<void (WebCore::PolicyAction)> class.

These shouldn't be needed any more because we use WTF::Function for that.

> Source/WebKit/Configurations/WebKit.unexp:33
> +# Soft-linked functions in source files.  Most probably have

These should probably instead be moved to a TCCSoftLink.{h, cpp}
Comment 4 David Kilzer (:ddkilzer) 2021-06-05 10:37:48 PDT
Comment on attachment 430629 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=430629&action=review

>> Source/WebKit/Configurations/WebKit.unexp:8
>> +__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE
> 
> I wonder if these are needed any more.  I'm not sure what use of std::stringstream we have in WebKit.  Maybe we used to.  I can't imagine we are re-exporting its use from ANGLE

There are similar entries in WebCore.unexp.  Let's clean these up in a separate patch.

>> Source/WebKit/Configurations/WebKit.unexp:20
>> +# Methods from std::__1::function<void (WebCore::PolicyAction)> class.
> 
> These shouldn't be needed any more because we use WTF::Function for that.

I'll remove these from UNEXPORTED_SYMBOL_LDFLAGS in Configurations/WebKit.xcconfig.

>> Source/WebKit/Configurations/WebKit.unexp:33
>> +# Soft-linked functions in source files.  Most probably have
> 
> These should probably instead be moved to a TCCSoftLink.{h, cpp}

LOL...thanks for reminding me of the correct way to fix this.  It's been too long!
Comment 5 David Kilzer (:ddkilzer) 2021-06-05 12:06:51 PDT
Created attachment 430655 [details]
Patch v2
Comment 6 David Kilzer (:ddkilzer) 2021-06-05 12:37:47 PDT
Created attachment 430657 [details]
Patch v3
Comment 7 David Kilzer (:ddkilzer) 2021-06-05 12:41:48 PDT
Created attachment 430658 [details]
Patch v4
Comment 8 David Kilzer (:ddkilzer) 2021-06-05 13:08:41 PDT
Created attachment 430659 [details]
Patch v5
Comment 9 EWS 2021-06-06 07:44:53 PDT
Committed r278535 (238533@main): <https://commits.webkit.org/238533@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430659 [details].