<?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>58737</bug_id>
          
          <creation_ts>2011-04-16 18:08:15 -0700</creation_ts>
          <short_desc>[GTK] Undefined Symbol build error &quot;_objc_registerThreadWithCollector&quot; when building WebKit GTK Mac OS X on Snow Leopard</short_desc>
          <delta_ts>2014-12-09 14:06:16 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>N/A</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>126492</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>devchan1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>berto</cc>
    
    <cc>cgarcia</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>jeremyhu</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>387299</commentid>
    <comment_count>0</comment_count>
      <attachid>89935</attachid>
    <who name="">devchan1</who>
    <bug_when>2011-04-16 18:08:15 -0700</bug_when>
    <thetext>Created attachment 89935
Patch to avoid including os x specific threading code when bullding WebKit GTK

The following build error occurs when building WebKit GTK rev 84097 on Mac OS X Snow Leopard:

Undefined symbols:
  &quot;_objc_registerThreadWithCollector&quot;, referenced from:
      WTF::initializeCurrentThreadInternal(char const*)in libJavaScriptCore.a(libJavaScriptCore_la-ThreadingPthreads.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [Programs/jsc] Error 1
make: *** [all] Error 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>387300</commentid>
    <comment_count>1</comment_count>
      <attachid>89936</attachid>
    <who name="">devchan1</who>
    <bug_when>2011-04-16 18:10:15 -0700</bug_when>
    <thetext>Created attachment 89936
Patch to avoid including os x specific threading code when bullding WebKit GTK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758138</commentid>
    <comment_count>2</comment_count>
    <who name="Jeremy Huddleston Sequoia">jeremyhu</who>
    <bug_when>2012-11-04 11:55:27 -0800</bug_when>
    <thetext>That&apos;s not the right fix.

I think you actually want to change OS(MAC_OS_X) to PLATFORM(MAC).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758139</commentid>
    <comment_count>3</comment_count>
    <who name="Jeremy Huddleston Sequoia">jeremyhu</who>
    <bug_when>2012-11-04 12:02:36 -0800</bug_when>
    <thetext>Yeah, that patch is no longer valid, but it is fixed with:

sed -i &quot;s:OS(MAC_OS_X):PLATFORM(MAC):&quot; Source/WTF/wtf/ThreadingPthreads.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927866</commentid>
    <comment_count>4</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-09-11 10:55:32 -0700</bug_when>
    <thetext>Is this still relevant?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927877</commentid>
    <comment_count>5</comment_count>
    <who name="Jeremy Huddleston Sequoia">jeremyhu</who>
    <bug_when>2013-09-11 11:11:20 -0700</bug_when>
    <thetext>Yes.  Please make the provided change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927971</commentid>
    <comment_count>6</comment_count>
      <attachid>211348</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-09-11 14:05:14 -0700</bug_when>
    <thetext>Created attachment 211348
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>928007</commentid>
    <comment_count>7</comment_count>
      <attachid>211348</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-09-11 15:14:21 -0700</bug_when>
    <thetext>Comment on attachment 211348
Patch

Are you sure this is what Qt wants on Mac too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>928008</commentid>
    <comment_count>8</comment_count>
      <attachid>211348</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-09-11 15:15:35 -0700</bug_when>
    <thetext>Comment on attachment 211348
Patch

If Qt doesn’t also want this code, then I think the original that specifically called out PLATFORM(GTK) might in fact be what we want.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956396</commentid>
    <comment_count>9</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-12-04 08:02:25 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (From update of attachment 211348 [details])
&gt; If Qt doesn’t also want this code, then I think the original that
&gt; specifically called out PLATFORM(GTK) might in fact be what we want.

I guess this doesn&apos;t matter anymore and we can apply the patch as it
is?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968460</commentid>
    <comment_count>10</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-01-15 13:54:43 -0800</bug_when>
    <thetext>Jeremy, can you confirm if this is still working fine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968479</commentid>
    <comment_count>11</comment_count>
    <who name="Jeremy Huddleston Sequoia">jeremyhu</who>
    <bug_when>2014-01-15 14:53:38 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; Jeremy, can you confirm if this is still working fine?

The issue still exists (at least in webkit-gtk 2.3.3).  We&apos;re still doing the following OS/Platform fixes:

    # https://bugs.webkit.org/show_bug.cgi?id=99683
    reinplace &quot;s:PLATFORM(MAC):OS(DARWIN):g&quot; \
        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp

    # https://bugs.webkit.org/show_bug.cgi?id=58737
    reinplace &quot;s:OS(MAC_OS_X):PLATFORM(MAC):&quot; \
        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968622</commentid>
    <comment_count>12</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-01-15 23:22:29 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt;     # https://bugs.webkit.org/show_bug.cgi?id=58737
&gt;     reinplace &quot;s:OS(MAC_OS_X):PLATFORM(MAC):&quot; \
&gt;         ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp

Ok, this one is still fine, now it only needs to be reviewed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053036</commentid>
    <comment_count>13</comment_count>
      <attachid>211348</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2014-12-06 10:12:43 -0800</bug_when>
    <thetext>Comment on attachment 211348
Patch

Is this change correct for iOS too? I&apos;d r+, but I&apos;d prefer someone who knows the apple ports to do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053783</commentid>
    <comment_count>14</comment_count>
      <attachid>211348</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-12-09 07:41:34 -0800</bug_when>
    <thetext>Comment on attachment 211348
Patch

This does no harm on iOS, but our long term direction is to use PLATFORM directly as little as possible and use more specific #if statements so the platform configuration system works and is not tied to specific platforms. I guess the real issue here is that GTK is choosing not to support garbage collection, so ideally the condition would be #if USE(COCOA_GC) or something along those lines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053833</commentid>
    <comment_count>15</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-12-09 10:11:09 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; ideally the condition would be #if USE(COCOA_GC) or something along
&gt; those lines.

It looks like a good policy, but I guess it doesn&apos;t make sense to
define COCOA_GC just for this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053837</commentid>
    <comment_count>16</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-12-09 10:20:46 -0800</bug_when>
    <thetext>Committed r177023: &lt;http://trac.webkit.org/changeset/177023&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053938</commentid>
    <comment_count>17</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-12-09 14:06:16 -0800</bug_when>
    <thetext>(In reply to comment #15)
&gt; It looks like a good policy, but I guess it doesn&apos;t make sense to
&gt; define COCOA_GC just for this case.

I believe there are a number of other places in the code that should use COCOA_GC. It&apos;s just that the other places don&apos;t simply fail to compile. One possible example is the code in the adoptNS function in RetainPtr.h. It uses &quot;#if defined(OBJC_NO_GC)&quot; and instead it should use &quot;#if !USE(COCOA_GC)&quot;. This is a missed optimization opportunity.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>89935</attachid>
            <date>2011-04-16 18:08:15 -0700</date>
            <delta_ts>2013-09-11 15:14:42 -0700</delta_ts>
            <desc>Patch to avoid including os x specific threading code when bullding WebKit GTK</desc>
            <filename>patch-WebKit-gtk-ThreadingPthreads.cpp.diff</filename>
            <type>text/plain</type>
            <size>812</size>
            <attacher>devchan1</attacher>
            
              <data encoding="base64">LS0tIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS93dGYvVGhyZWFkaW5nUHRocmVhZHMuY3BwCTIwMTEt
MDQtMTYgMTM6MTA6NDYuMDAwMDAwMDAwIC0wNDAwCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUv
d3RmL1RocmVhZGluZ1B0aHJlYWRzLmNwcC5wYXRjaGVkCTIwMTEtMDQtMTYgMTM6MTA6MjMuMDAw
MDAwMDAwIC0wNDAwCkBAIC01NSw3ICs1NSw3IEBACiAjaW5jbHVkZSA8d3RmL1Bhc3NPd25QdHIu
aD4KICNlbmRpZgogCi0jaWYgT1MoTUFDX09TX1gpICYmICFkZWZpbmVkKEJVSUxESU5HX09OX0xF
T1BBUkQpCisjaWYgT1MoTUFDX09TX1gpICYmICFkZWZpbmVkKEJVSUxESU5HX09OX0xFT1BBUkQp
ICYmICFQTEFURk9STShHVEspCiAjaW5jbHVkZSA8b2JqYy9vYmpjLWF1dG8uaD4KICNlbmRpZgog
CkBAIC0xOTQsNyArMTk0LDcgQEAKICAgICBVTlVTRURfUEFSQU0odGhyZWFkTmFtZSk7CiAjZW5k
aWYKIAotI2lmIE9TKE1BQ19PU19YKSAmJiAhZGVmaW5lZChCVUlMRElOR19PTl9MRU9QQVJEKQor
I2lmIE9TKE1BQ19PU19YKSAmJiAhZGVmaW5lZChCVUlMRElOR19PTl9MRU9QQVJEKSAmJiAhUExB
VEZPUk0oR1RLKQogICAgIC8vIEFsbCB0aHJlYWRzIHRoYXQgcG90ZW50aWFsbHkgdXNlIEFQSXMg
YWJvdmUgdGhlIEJTRCBsYXllciBtdXN0IGJlIHJlZ2lzdGVyZWQgd2l0aCB0aGUgT2JqZWN0aXZl
LUMKICAgICAvLyBnYXJiYWdlIGNvbGxlY3RvciBpbiBjYXNlIEFQSSBpbXBsZW1lbnRhdGlvbnMg
dXNlIGdhcmJhZ2UtY29sbGVjdGVkIG1lbW9yeS4KICAgICBvYmpjX3JlZ2lzdGVyVGhyZWFkV2l0
aENvbGxlY3RvcigpOwo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>89936</attachid>
            <date>2011-04-16 18:10:15 -0700</date>
            <delta_ts>2013-09-11 15:15:03 -0700</delta_ts>
            <desc>Patch to avoid including os x specific threading code when bullding WebKit GTK</desc>
            <filename>patch-WebKit-gtk-ThreadingPthreads.cpp.diff</filename>
            <type>text/plain</type>
            <size>812</size>
            <attacher>devchan1</attacher>
            
              <data encoding="base64">LS0tIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS93dGYvVGhyZWFkaW5nUHRocmVhZHMuY3BwCTIwMTEt
MDQtMTYgMTM6MTA6NDYuMDAwMDAwMDAwIC0wNDAwCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUv
d3RmL1RocmVhZGluZ1B0aHJlYWRzLmNwcC5wYXRjaGVkCTIwMTEtMDQtMTYgMTM6MTA6MjMuMDAw
MDAwMDAwIC0wNDAwCkBAIC01NSw3ICs1NSw3IEBACiAjaW5jbHVkZSA8d3RmL1Bhc3NPd25QdHIu
aD4KICNlbmRpZgogCi0jaWYgT1MoTUFDX09TX1gpICYmICFkZWZpbmVkKEJVSUxESU5HX09OX0xF
T1BBUkQpCisjaWYgT1MoTUFDX09TX1gpICYmICFkZWZpbmVkKEJVSUxESU5HX09OX0xFT1BBUkQp
ICYmICFQTEFURk9STShHVEspCiAjaW5jbHVkZSA8b2JqYy9vYmpjLWF1dG8uaD4KICNlbmRpZgog
CkBAIC0xOTQsNyArMTk0LDcgQEAKICAgICBVTlVTRURfUEFSQU0odGhyZWFkTmFtZSk7CiAjZW5k
aWYKIAotI2lmIE9TKE1BQ19PU19YKSAmJiAhZGVmaW5lZChCVUlMRElOR19PTl9MRU9QQVJEKQor
I2lmIE9TKE1BQ19PU19YKSAmJiAhZGVmaW5lZChCVUlMRElOR19PTl9MRU9QQVJEKSAmJiAhUExB
VEZPUk0oR1RLKQogICAgIC8vIEFsbCB0aHJlYWRzIHRoYXQgcG90ZW50aWFsbHkgdXNlIEFQSXMg
YWJvdmUgdGhlIEJTRCBsYXllciBtdXN0IGJlIHJlZ2lzdGVyZWQgd2l0aCB0aGUgT2JqZWN0aXZl
LUMKICAgICAvLyBnYXJiYWdlIGNvbGxlY3RvciBpbiBjYXNlIEFQSSBpbXBsZW1lbnRhdGlvbnMg
dXNlIGdhcmJhZ2UtY29sbGVjdGVkIG1lbW9yeS4KICAgICBvYmpjX3JlZ2lzdGVyVGhyZWFkV2l0
aENvbGxlY3RvcigpOwo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>211348</attachid>
            <date>2013-09-11 14:05:14 -0700</date>
            <delta_ts>2014-12-09 07:41:34 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>58737.diff</filename>
            <type>text/plain</type>
            <size>1503</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XVEYvQ2hhbmdlTG9nIGIvU291cmNlL1dURi9DaGFuZ2VMb2cK
aW5kZXggMTllM2M1My4uOWFhZmE5ZiAxMDA2NDQKLS0tIGEvU291cmNlL1dURi9DaGFuZ2VMb2cK
KysrIGIvU291cmNlL1dURi9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNiBAQAorMjAxMy0wOS0xMSAg
QWxiZXJ0byBHYXJjaWEgIDxiZXJ0b0BpZ2FsaWEuY29tPgorCisgICAgICAgIFVuZGVmaW5lZCBT
eW1ib2wgYnVpbGQgZXJyb3IgIl9vYmpjX3JlZ2lzdGVyVGhyZWFkV2l0aENvbGxlY3RvciIgd2hl
biBidWlsZGluZyBXZWJLaXQgR1RLIE1hYyBPUyBYIG9uIFNub3cgTGVvcGFyZAorICAgICAgICBo
dHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NTg3MzcKKworICAgICAgICBS
ZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBSZXBsYWNlIE9TKE1BQ19PU19Y
KSB3aXRoIFBMQVRGT1JNKE1BQykgdG8gcHJldmVudCB1c2luZworICAgICAgICBvc3gtc3BlY2lm
aWMgY29kZSBpbiBXZWJLaXRHVEsrIGJ1aWxkcy4KKworICAgICAgICAqIHd0Zi9UaHJlYWRpbmdQ
dGhyZWFkcy5jcHA6CisgICAgICAgIChXVEY6O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mFnZSBjb2xsZWN0b3IgaW4gY2FzZSBBUEkgaW1wbGVtZW50
YXRpb25zIHVzZSBnYXJiYWdlLWNvbGxlY3RlZCBtZW1vcnkuCiAgICAgb2JqY19yZWdpc3RlclRo
cmVhZFdpdGhDb2xsZWN0b3IoKTsK
</data>
<flag name="review"
          id="233439"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>