<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>224599</bug_id>
          
          <creation_ts>2021-04-15 05:15:46 -0700</creation_ts>
          <short_desc>ld: warning: static initializer found in &apos;...Objects-normal/x86_64/UnifiedSource85.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning</short_desc>
          <delta_ts>2021-04-22 05:16:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dino</cc>
    
    <cc>kbr</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1750573</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-04-15 05:15:46 -0700</bug_when>
    <thetext>ld: warning: static initializer found in &apos;...Objects-normal/x86_64/UnifiedSource85.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning

These warnings here have hidden a real problem:

ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource85.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource133.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource136.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource156.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource217.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource220.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource229.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource231.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource309.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource319.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
ld: warning: static initializer found in &apos;/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource374.o&apos;. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
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, etc.
ld: warning: linking with (/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio) but not using any symbols from it
ld: warning: linking with (/System/Library/PrivateFrameworks/URLFormatting.framework/Versions/A/URLFormatting) but not using any symbols from it
ld: warning: linking with (/usr/lib/libAccessibility.dylib) but not using any symbols from it

Note: the part about libANGLE-shared.dylib is a real bug, but it&apos;s hidden in the the no inits warning.

Maybe the warning should be removed if it has no other purpose than being ignored?

Most of these probably are RefCountedLeakCounter. Should I change that to not warn?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750800</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2021-04-15 15:30:32 -0700</bug_when>
    <thetext>Static initializers are not allowed in WebKit for performance reasons. So this is a real bug too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750936</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-04-15 22:18:47 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #1)
&gt; Static initializers are not allowed in WebKit for performance reasons. So
&gt; this is a real bug too.

There&apos;s an exception of &quot;Debug build in these specific files defined by check-global-initializers&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1753116</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-22 05:16:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/77013991&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>