<?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>128596</bug_id>
          
          <creation_ts>2014-02-11 05:29:18 -0800</creation_ts>
          <short_desc>&apos;ar T&apos; is not portable and breaks the build on FreeBSD</short_desc>
          <delta_ts>2014-02-17 12:23:15 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>128598</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Allison Lortie (desrt)">desrt</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>gustavo</cc>
    
    <cc>landry</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>979370</commentid>
    <comment_count>0</comment_count>
    <who name="Allison Lortie (desrt)">desrt</who>
    <bug_when>2014-02-11 05:29:18 -0800</bug_when>
    <thetext>Source/autotools/SetupLibtool.m4 has:

if test -z &quot;$AR_FLAGS&quot;; then
    AR_FLAGS=&quot;cruT&quot;
fi
AC_SUBST([AR_FLAGS])


GNU ar documents the &apos;T&apos; flag like so:

       T   Make the specified archive a thin archive.  If it already exists and is a regular archive, the existing
           members must be present in the same directory as archive.

FreeBSD ar documents the &apos;T&apos; flag like so:

     -T      Use only the first fifteen characters of the archive member name
             or command line file name argument when naming archive members.


This fragment of Source/WebKit2/GNUmakefile.am:

libWebCoreLayerGtk2.a: $(webcore_layer_gtk2_deps)
        $(AM_V_GEN)
        $(AM_V_at)$(shell rm -f $@)
        $(AM_V_at)$(shell find . -name &quot;*.o&quot; &gt; objects_list)
        $(AM_V_at)$(foreach archive, $(webcore_layer_gtk2_archives), $(shell $(AR) t $(archive) | xargs -n1 basename | xargs -I obj_file grep -F obj_file objects_list | xargs -n50 $(AR) $(AR_FLAGS) $@))
        $(AM_V_at)$(shell rm -f objects_list)


results in a bunch of arguments like &apos;./Source/WebCore/platform/graphics/libPlatform_la-FloatRect.o&apos; being passed to &apos;ar&apos;.

Of course, most of those arguments will share the same first 15 characters, and as a result, a large number of files are not included in the archive.



Webkit should not use &apos;ar T&apos; on systems with a non-GNU toolchain, or it should explicitly require a GNU toolchain and make sure it uses that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>979376</commentid>
    <comment_count>1</comment_count>
      <attachid>223846</attachid>
    <who name="Allison Lortie (desrt)">desrt</who>
    <bug_when>2014-02-11 05:58:58 -0800</bug_when>
    <thetext>Created attachment 223846
SetupLibtool.m4: use &apos;ar T&apos; only on GNU ar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>979380</commentid>
    <comment_count>2</comment_count>
      <attachid>223848</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-02-11 06:16:38 -0800</bug_when>
    <thetext>Created attachment 223848
Patch

The patch looks fine, here&apos;s the updated one with the changelog entry.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>979832</commentid>
    <comment_count>3</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-02-12 04:12:48 -0800</bug_when>
    <thetext>Committed r163954: &lt;http://trac.webkit.org/changeset/163954&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981587</commentid>
    <comment_count>4</comment_count>
    <who name="Landry Breuil">landry</who>
    <bug_when>2014-02-17 11:46:42 -0800</bug_when>
    <thetext>I know this has been fixed/commited, but as it was already sort-of fixed in https://bugs.webkit.org/show_bug.cgi?id=118732, couldnt you set AR_FLAGS=cru in the build environment to avoid having to patch autohell this way ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981589</commentid>
    <comment_count>5</comment_count>
    <who name="Allison Lortie (desrt)">desrt</who>
    <bug_when>2014-02-17 11:52:07 -0800</bug_when>
    <thetext>I don&apos;t think it should be expected to have to set an environment variable to prevent it from containing non-POSIX values...

If anything, it should be the other way around.

I think having this check can make everyone happy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981599</commentid>
    <comment_count>6</comment_count>
    <who name="Landry Breuil">landry</who>
    <bug_when>2014-02-17 12:00:23 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; I don&apos;t think it should be expected to have to set an environment variable to prevent it from containing non-POSIX values...
&gt; 
&gt; If anything, it should be the other way around.
&gt; 
&gt; I think having this check can make everyone happy.

I totally agree (and i&apos;m happy with the check for OpenBSD too!), was just wondering about the reasoning - usually it&apos;s not so easy to get non-linux fixes in :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981616</commentid>
    <comment_count>7</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-02-17 12:23:15 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; I totally agree (and i&apos;m happy with the check for OpenBSD too!), was
&gt; just wondering about the reasoning - usually it&apos;s not so easy to get
&gt; non-linux fixes in :)

The solution proposed by Ryan looked just fine to me. And I&apos;ve been
pushing non-linux fixes for a long time btw :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>223846</attachid>
            <date>2014-02-11 05:58:58 -0800</date>
            <delta_ts>2014-02-11 06:16:38 -0800</delta_ts>
            <desc>SetupLibtool.m4: use &apos;ar T&apos; only on GNU ar</desc>
            <filename>0004-SetupLibtool.m4-use-ar-T-only-on-GNU-ar.patch</filename>
            <type>text/plain</type>
            <size>907</size>
            <attacher name="Allison Lortie (desrt)">desrt</attacher>
            
              <data encoding="base64">RnJvbSAxNjgyMzE2MmI5ZDA1NGZkY2QyNWQzMTg3N2I2Y2E4Y2JkZjExYTE2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBSeWFuIExvcnRpZSA8ZGVzcnRAZGVzcnQuY2E+CkRhdGU6IFR1
ZSwgMTEgRmViIDIwMTQgMDg6NTY6MTcgLTA1MDAKU3ViamVjdDogW1BBVENIIDQvNF0gU2V0dXBM
aWJ0b29sLm00OiB1c2UgJ2FyIFQnIG9ubHkgb24gR05VIGFyCgonYXIgVCcgaXMgYSBHTlUgZXh0
ZW5zaW9uIGFuZCAtVCBtZWFucyBzb21ldGhpbmcgZW50aXJlbHkgZGlmZmVyZW50IG9uCkJTRCwg
c28gbWFrZSBzdXJlIG91ciAnYXInIGlzIEdOVSBhci4KLS0tCiBTb3VyY2UvYXV0b3Rvb2xzL1Nl
dHVwTGlidG9vbC5tNCB8IDYgKysrKystCiAxIGZpbGUgY2hhbmdlZCwgNSBpbnNlcnRpb25zKCsp
LCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvU291cmNlL2F1dG90b29scy9TZXR1cExpYnRv
b2wubTQgYi9Tb3VyY2UvYXV0b3Rvb2xzL1NldHVwTGlidG9vbC5tNAppbmRleCAxYzhmZWIwLi4w
NTU0NWNhIDEwMDY0NAotLS0gYS9Tb3VyY2UvYXV0b3Rvb2xzL1NldHVwTGlidG9vbC5tNAorKysg
Yi9Tb3VyY2UvYXV0b3Rvb2xzL1NldHVwTGlidG9vbC5tNApAQCAtNiw3ICs2LDExIEBAIEFDX1NV
QlNUKFtMSUJKQVZBU0NSSVBUQ09SRUdUS19WRVJTSU9OXSkKIEFDX1NVQlNUKFtMSUJXRUJLSVQy
R1RLX1ZFUlNJT05dKQogCiBpZiB0ZXN0IC16ICIkQVJfRkxBR1MiOyB0aGVuCi0gICAgQVJfRkxB
R1M9ImNydVQiCisgICAgaWYgIiR7QVI6LWFyfSIgLVYgfCBncmVwIC1xICdHTlUgYXInOyB0aGVu
CisgICAgICAgIEFSX0ZMQUdTPSJjcnVUIgorICAgIGVsc2UKKyAgICAgICAgQVJfRkxBR1M9ImNy
dSIKKyAgICBmaQogZmkKIEFDX1NVQlNUKFtBUl9GTEFHU10pCiAKLS0gCjEuOC41LjIKCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>223848</attachid>
            <date>2014-02-11 06:16:38 -0800</date>
            <delta_ts>2014-02-12 04:08:28 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>128596.diff</filename>
            <type>text/plain</type>
            <size>1022</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0NoYW5nZUxvZyBiL0NoYW5nZUxvZwppbmRleCAwYmEzNjE0Li5hMGM2YTA2
IDEwMDY0NAotLS0gYS9DaGFuZ2VMb2cKKysrIGIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQgQEAK
KzIwMTQtMDItMTEgIFJ5YW4gTG9ydGllICA8ZGVzcnRAZGVzcnQuY2E+CisKKyAgICAgICAgJ2Fy
IFQnIGlzIG5vdCBwb3J0YWJsZSBhbmQgYnJlYWtzIHRoZSBidWlsZCBvbiBGcmVlQlNECisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMjg1OTYKKworICAg
ICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBDcmVhdGUgdGhpbiBh
cmNoaXZlcyBvbmx5IGlmIHdlIGFyZSB1c2luZyBHTlUgYXIuCisKKyAgICAgICAgKiBTb3VyY2Uv
YXV0b3Rvb2xzL1NldHVwTGlidG9vbC5tNDoKKwogMjAxNC0wMi0xMCAgS3J6eXN6dG9mIFdvbGFu
c2tpICA8ay53b2xhbnNraUBzYW1zdW5nLmNvbT4KIAogICAgICAgICBBZGQgdGhlIENTU19TSEFQ
RV9JTlNJREUgdG8gQ01ha2UgZmVhdHVyZSBsaXN0CmRpZmYgLS1naXQgYS9Tb3VyY2UvYXV0b3Rv
b2xzL1NldHVwTGlidG9vbC5tNCBiL1NvdXJjZS9hdXRvdG9vbHMvU2V0dXBMaWJ0b29sLm00Cmlu
ZGV4IDFjOGZlYjAuLjA1NTQ1Y2EgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9hdXRvdG9vbHMvU2V0dXBM
aWJ0b29sLm00CisrKyBiL1NvdXJjZS9hdXRvdG9vbHMvU2V0dXBMaWJ0b29sLm00CkBAIC02LDcg
KzYsMTEgQEAgQUNfU1VCU1QoW0xJQkpBVkFTQ1JJUFRDT1JFR1RLX1ZFUlNJT05dKQogQUNfU1VC
U1QoW0xJQldFQktJVDJHVEtfVkVSU0lPTl0pCiAKIGlmIHRlc3QgLXogIiRBUl9GTEFHUyI7IHRo
ZW4KLSAgICBBUl9GTEFHUz0iY3J1VCIKKyAgICBpZiAiJHtBUjotYXJ9IiAtViB8IGdyZXAgLXEg
J0dOVSBhcic7IHRoZW4KKyAgICAgICAgQVJfRkxBR1M9ImNydVQiCisgICAgZWxzZQorICAgICAg
ICBBUl9GTEFHUz0iY3J1IgorICAgIGZpCiBmaQogQUNfU1VCU1QoW0FSX0ZMQUdTXSkKIAo=
</data>
<flag name="review"
          id="247908"
          type_id="1"
          status="+"
          setter="gustavo"
    />
          </attachment>
      

    </bug>

</bugzilla>