<?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>180949</bug_id>
          
          <creation_ts>2017-12-18 14:11:55 -0800</creation_ts>
          <short_desc>[GTK][WPE] Conditionalize libTASN1 use behind ENABLE_SUBTLE_CRYPTO in the CMake files</short_desc>
          <delta_ts>2017-12-19 16:47:51 -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>WebCore Misc.</component>
          <version>Other</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          <dependson>181012</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1382902</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2017-12-18 14:11:55 -0800</bug_when>
    <thetext>When ENABLE_SUBTLE_CRYPTO is disable the include paths and libraries should not include missing LIBTASN1 references.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1382904</commentid>
    <comment_count>1</comment_count>
      <attachid>329682</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2017-12-18 14:13:53 -0800</bug_when>
    <thetext>Created attachment 329682
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383038</commentid>
    <comment_count>2</comment_count>
      <attachid>329682</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-12-18 20:09:14 -0800</bug_when>
    <thetext>Comment on attachment 329682
Patch

Clearing flags on attachment: 329682

Committed r226094: &lt;https://trac.webkit.org/changeset/226094&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383039</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-12-18 20:09:16 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383040</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-12-18 20:10:17 -0800</bug_when>
    <thetext>&lt;rdar://problem/36123388&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383147</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-19 09:10:31 -0800</bug_when>
    <thetext>This actually is not the best way to do it. Two problems:

1) The check is still done unconditionally in OptionsWPE.cmake, even though ENABLE_SUBTLE_CRYPTO is no longer mandatory for WPE. That&apos;s wrong. So it&apos;s currently impossible to build without Libtasn1, and the added conditionals in PlatformWPE.cmake are useless as they&apos;ll never be reached. The check for Libtasn1 should instead be moved down and placed inside an if (ENABLE_SUBTLE_CRYPTO) block in OptionsWPE.cmake, then it will really be possible to build without.

2) It&apos;s simpler to unconditionally add _LIBRARIES and _INCLUDE_DIRS in Platform*.cmake. If the checks are made conditional in Options*.cmake, then (I think) the _LIBRARIES and _INCLUDE_DIRS variables will expand to empty strings, so adding conditionals in Platform*.cmake should not be needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383148</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-19 09:16:56 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #5)
&gt; 2) It&apos;s simpler to unconditionally add _LIBRARIES and _INCLUDE_DIRS in
&gt; Platform*.cmake. If the checks are made conditional in Options*.cmake, then
&gt; (I think) the _LIBRARIES and _INCLUDE_DIRS variables will expand to empty
&gt; strings, so adding conditionals in Platform*.cmake should not be needed.

Although it might be a bit confusing to intentionally use undefined variables, it is IMO good style in this case, because the Platform*.cmake files will otherwise become a mess of unneeded conditionals for different build configurations.

It&apos;s unfortunate that the existing code does not always follow this style. E.g.:

# Source/WebCore/PlatformGTK.cmake
if (ENABLE_WAYLAND_TARGET)
    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
        ${WAYLAND_INCLUDE_DIRS}
    )
    list(APPEND WebCore_LIBRARIES
        ${WAYLAND_LIBRARIES}
    )
endif ()
 
I believe that condition is not needed, because ${WAYLAND_INCLUDE_DIRS} and ${WAYLAND_LIBRARIES} are only defined if ENABLE_WAYLAND_TARGET is true; they can be appended to WebCore_SYSTEM_INCLUDE_DIRECTORIES and WebCore_LIBRARIES unconditionally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383152</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2017-12-19 09:21:23 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; (In reply to Michael Catanzaro from comment #5)
&gt; &gt; 2) It&apos;s simpler to unconditionally add _LIBRARIES and _INCLUDE_DIRS in
&gt; &gt; Platform*.cmake. If the checks are made conditional in Options*.cmake, then
&gt; &gt; (I think) the _LIBRARIES and _INCLUDE_DIRS variables will expand to empty
&gt; &gt; strings, so adding conditionals in Platform*.cmake should not be needed.
&gt; 
&gt; Although it might be a bit confusing to intentionally use undefined
&gt; variables, it is IMO good style in this case, because the Platform*.cmake
&gt; files will otherwise become a mess of unneeded conditionals for different
&gt; build configurations.
&gt; 
&gt; It&apos;s unfortunate that the existing code does not always follow this style.
&gt; E.g.:
&gt; 
&gt; # Source/WebCore/PlatformGTK.cmake
&gt; if (ENABLE_WAYLAND_TARGET)
&gt;     list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
&gt;         ${WAYLAND_INCLUDE_DIRS}
&gt;     )
&gt;     list(APPEND WebCore_LIBRARIES
&gt;         ${WAYLAND_LIBRARIES}
&gt;     )
&gt; endif ()
&gt;  
&gt; I believe that condition is not needed, because ${WAYLAND_INCLUDE_DIRS} and
&gt; ${WAYLAND_LIBRARIES} are only defined if ENABLE_WAYLAND_TARGET is true; they
&gt; can be appended to WebCore_SYSTEM_INCLUDE_DIRECTORIES and WebCore_LIBRARIES
&gt; unconditionally.

I was hitting a linker or build error (can&apos;t recall which, this was a while ago) when they were unconditional. I wouldn&apos;t have touched this otherwise. Maybe just a side effect of our platform at Tesla?

I was just following the style of similar conditionals. If you feel this should be cleaned up for all cases, then let track that separately. I don&apos;t have the cycles to do it though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383156</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-19 09:25:28 -0800</bug_when>
    <thetext>(In reply to Timothy Hatcher from comment #7)
&gt; I was hitting a linker or build error (can&apos;t recall which, this was a while
&gt; ago) when they were unconditional. I wouldn&apos;t have touched this otherwise.
&gt; Maybe just a side effect of our platform at Tesla?

I don&apos;t know.

I don&apos;t expect you to clean up all cases, just Libtasn1, since that&apos;s what this patch is about. I would revert this patch and change the unconditional check for Libtasn1 in OptionsWPE.cmake to look more like the check in OptionsGTK.cmake instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383157</commentid>
    <comment_count>9</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2017-12-19 09:29:39 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; (In reply to Timothy Hatcher from comment #7)
&gt; &gt; I was hitting a linker or build error (can&apos;t recall which, this was a while
&gt; &gt; ago) when they were unconditional. I wouldn&apos;t have touched this otherwise.
&gt; &gt; Maybe just a side effect of our platform at Tesla?
&gt; 
&gt; I don&apos;t know.
&gt; 
&gt; I don&apos;t expect you to clean up all cases, just Libtasn1, since that&apos;s what
&gt; this patch is about. I would revert this patch and change the unconditional
&gt; check for Libtasn1 in OptionsWPE.cmake to look more like the check in
&gt; OptionsGTK.cmake instead.

Okay, I&apos;ll do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383291</commentid>
    <comment_count>10</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2017-12-19 14:00:56 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; (In reply to Timothy Hatcher from comment #7)
&gt; &gt; I was hitting a linker or build error (can&apos;t recall which, this was a while
&gt; &gt; ago) when they were unconditional. I wouldn&apos;t have touched this otherwise.
&gt; &gt; Maybe just a side effect of our platform at Tesla?
&gt; 
&gt; I don&apos;t know.
&gt; 
&gt; I don&apos;t expect you to clean up all cases, just Libtasn1, since that&apos;s what
&gt; this patch is about. I would revert this patch and change the unconditional
&gt; check for Libtasn1 in OptionsWPE.cmake to look more like the check in
&gt; OptionsGTK.cmake instead.

OptionsGTK.cmake and OptionsWPE.cmake are identical in how they require the Libtasn1 package. I don&apos;t know what you are wanting to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383343</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-19 15:00:12 -0800</bug_when>
    <thetext>Oops, I was looking at my stale local checkout! Indeed, no changes are required there.

In that case, I&apos;m tempted to say that all we need to do is revert this patch. I don&apos;t think reverting it should cause any link errors, as explained above. If it does, I&apos;d like to see the error.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>329682</attachid>
            <date>2017-12-18 14:13:53 -0800</date>
            <delta_ts>2017-12-18 20:09:14 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-180949-20171218141353.patch</filename>
            <type>text/plain</type>
            <size>2851</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjI2MDc3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMWY4MzQxMTE1NjVhNmQy
ODc5ZjA4YjEwNTJiNjY0ZjRjMDcxMGU5YS4uMWYwNmY1ZmEzMWM5ZTlhNmU0OTRiNzE5ZGZiZTcy
MjJlMmZlNDk0OCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDE1IEBACiAyMDE3LTEyLTE4ICBUaW1v
dGh5IEhhdGNoZXIgIDx0aW1vdGh5QGhhdGNoZXIubmFtZT4KIAorICAgICAgICBbR1RLXVtXUEVd
IENvbmRpdGlvbmFsaXplIGxpYlRBU04xIHVzZSBiZWhpbmQgRU5BQkxFX1NVQlRMRV9DUllQVE8g
aW4gdGhlIENNYWtlIGZpbGVzCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0xODA5NDkKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4K
KworICAgICAgICAqIFBsYXRmb3JtR1RLLmNtYWtlOiBNb3ZlIHRoZSBpbmNsdWRlIHBhdGggYW5k
IGxpYnJhcnkgYWRkaXRpb25zIHRvIGNvbmRpdGlvbmFsIEVOQUJMRV9TVUJUTEVfQ1JZUFRPIHNl
Y3Rpb24uCisgICAgICAgICogUGxhdGZvcm1XUEUuY21ha2U6IERpd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gICAke0dMSUJfTElC
UkFSSUVTfQogICAgICR7SUNVX0xJQlJBUklFU30KICAgICAke0xJQlNPVVBfTElCUkFSSUVTfQot
ICAgICR7TElCVEFTTjFfTElCUkFSSUVTfQogICAgICR7VVBPV0VSR0xJQl9MSUJSQVJJRVN9CiAg
ICAgJHtXUEVfTElCUkFSSUVTfQogKQpAQCAtODIsNyArODEsMTUgQEAgbGlzdChBUFBFTkQgV2Vi
Q29yZV9JTkNMVURFX0RJUkVDVE9SSUVTCiAgICAgJHtHTElCX0lOQ0xVREVfRElSU30KICAgICAk
e0lDVV9JTkNMVURFX0RJUlN9CiAgICAgJHtMSUJTT1VQX0lOQ0xVREVfRElSU30KLSAgICAke0xJ
QlRBU04xX0lOQ0xVREVfRElSU30KICAgICAke1VQT1dFUkdMSUJfSU5DTFVERV9ESVJTfQogICAg
ICR7V1BFX0lOQ0xVREVfRElSU30KICkKKworaWYgKEVOQUJMRV9TVUJUTEVfQ1JZUFRPKQorICAg
IGxpc3QoQVBQRU5EIFdlYkNvcmVfU1lTVEVNX0lOQ0xVREVfRElSRUNUT1JJRVMKKyAgICAgICAg
JHtMSUJUQVNOMV9JTkNMVURFX0RJUlN9CisgICAgKQorICAgIGxpc3QoQVBQRU5EIFdlYkNvcmVf
TElCUkFSSUVTCisgICAgICAgICR7TElCVEFTTjFfTElCUkFSSUVTfQorICAgICkKK2VuZGlmICgp
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>