<?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>232933</bug_id>
          
          <creation_ts>2021-11-10 02:46:30 -0800</creation_ts>
          <short_desc>FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR</short_desc>
          <delta_ts>2022-04-15 10:23:08 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanavin">alex.kanavin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annulen</cc>
    
    <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1813517</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2021-11-10 02:46:30 -0800</bug_when>
    <thetext>FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1813521</commentid>
    <comment_count>1</comment_count>
      <attachid>443789</attachid>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2021-11-10 02:50:54 -0800</bug_when>
    <thetext>Created attachment 443789
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1841661</commentid>
    <comment_count>2</comment_count>
      <attachid>443789</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-02-15 05:18:24 -0800</bug_when>
    <thetext>Comment on attachment 443789
Patch

It took me a little while to convince myself that this was correct, but I suppose there&apos;s no way for cross-compilation to work otherwise, so OK.

That said, not all pkg-config variables are paths, but you&apos;re prepending this to all of them, e.g. version numbers are now going to contain filesystem paths. Also, it&apos;s generally not appropriate to prepend this variable even to most filesystem paths: it only makes sense in this particular case because you&apos;re executing those binaries during the build itself. Now, because the macro is only used immediately below, we know that&apos;s not a problem with how it is currently used, but it is still a semantic problem that we need to solve before landing. You can fix it in either of two ways: you could rename the macro to indicate it is only supposed to be used to get paths to binaries for use during compilation (this might result in a weird name, _GIR_GET_ PKGCONFIG_VAR_BUT_ONLY_IF_ITS_A_PATH_TO_A_BINARY_THAT_WE_ARE_ABOUT_TO_EXECUTE does not sound very swell), or maybe it would be better to do the append later after calling the macro so that we can leave it as a generic macro for getting any variable. Either way would work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842446</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-02-16 12:21:11 -0800</bug_when>
    <thetext>A change has landed that removes the code altogether, so I need to check if this patch is still relevant, and rework accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842483</commentid>
    <comment_count>4</comment_count>
      <attachid>452238</attachid>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-02-16 13:12:43 -0800</bug_when>
    <thetext>Created attachment 452238
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844621</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-02-22 02:52:09 -0800</bug_when>
    <thetext>Ping :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844706</commentid>
    <comment_count>6</comment_count>
      <attachid>452238</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-02-22 07:58:28 -0800</bug_when>
    <thetext>Comment on attachment 452238
Patch

This looks fine to me, but Adrian mentioned something about not liking this. Adrian?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1857950</commentid>
    <comment_count>7</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-04-04 11:09:19 -0700</bug_when>
    <thetext>Ping!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1858613</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-04-05 15:11:38 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; Comment on attachment 452238 [details]
&gt; Patch
&gt; 
&gt; This looks fine to me, but Adrian mentioned something about not liking this.
&gt; Adrian?

So what&apos;s suspicious about this is that when cross-compiling, the sysroot
refers to the location of the *target platform* files (libraries, headers,
etc.) but in the case of programs to execute during the build, we cannot
(typically, at least) run them on the *build host*. Prefixing the sysroot
is the wrong thing to do in the general case, what one does is passing
-DCMAKE_PROGRAM_PATH= to tell if where to look for programs used during
compilation and that will run in the *build host*.

Now, I do know that GI is cross-compilation trouble, and at least Yocto
and Buildroot use qemu&apos;s userspace emulation to run the tools; but how to
treat the particularities of GI tooling is the choice of each particular
build system. I would rather not have a workaround for some compilation
system in the WebKit source tree—such a think should not be needed, and
proof of that is Buildroot can builds WebKitGTK with introspection enabled
without a patch like this:

  https://git.busybox.net/buildroot/tree/package/webkitgtk/webkitgtk.mk?h=2022.02.x#n68</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1858615</commentid>
    <comment_count>9</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-04-05 15:12:25 -0700</bug_when>
    <thetext>(ooops, s/think/thing/ in my previous comment)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860588</commentid>
    <comment_count>10</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-04-11 23:36:13 -0700</bug_when>
    <thetext>Right, this actually makes sense. I can withdraw this patch and mark it as yocto-specific in our tree to prevent further submissions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860606</commentid>
    <comment_count>11</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-04-12 00:26:31 -0700</bug_when>
    <thetext>(In reply to Alexander Kanavin from comment #10)
&gt; Right, this actually makes sense. I can withdraw this patch and mark it as
&gt; yocto-specific in our tree to prevent further submissions.

👍️

Of course if you run into any other issues, please do ask and we can try
to help out --</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860607</commentid>
    <comment_count>12</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-04-12 00:27:00 -0700</bug_when>
    <thetext>(In reply to Alexander Kanavin from comment #10)
&gt; Right, this actually makes sense. I can withdraw this patch and mark it as
&gt; yocto-specific in our tree to prevent further submissions.

👍️

Of course if you run into any other issues, please do ask and we can try
to help out -- we do want people to be able to package and cross build
WebKit after all :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860674</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-12 08:07:31 -0700</bug_when>
    <thetext>(In reply to Alexander Kanavin from comment #10)
&gt; Right, this actually makes sense. I can withdraw this patch and mark it as
&gt; yocto-specific in our tree to prevent further submissions.

And add a link to this bug too, if you don&apos;t mind, so people can find this discussion in the future.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>443789</attachid>
            <date>2021-11-10 02:50:54 -0800</date>
            <delta_ts>2022-02-16 13:12:35 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-232933-20211110115052.patch</filename>
            <type>text/plain</type>
            <size>1486</size>
            <attacher name="Alexander Kanavin">alex.kanavin</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjgyODEwCmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvRmlu
ZEdPYmplY3RJbnRyb3NwZWN0aW9uLmNtYWtlIGIvU291cmNlL2NtYWtlL0ZpbmRHT2JqZWN0SW50
cm9zcGVjdGlvbi5jbWFrZQppbmRleCBiYmU0NzQyNDY1YzdiZmU1YTZhYzAzN2I4NTRhODc0OGE5
NzRkNjkwLi40ZDQyMGVjNjcwZjFiNjhmY2ViM2E5N2Y2YTRjZTVkODA3Yjc3NDZkIDEwMDY0NAot
LS0gYS9Tb3VyY2UvY21ha2UvRmluZEdPYmplY3RJbnRyb3NwZWN0aW9uLmNtYWtlCisrKyBiL1Nv
dXJjZS9jbWFrZS9GaW5kR09iamVjdEludHJvc3BlY3Rpb24uY21ha2UKQEAgLTI2LDYgKzI2LDcg
QEAgbWFjcm8oX0dJUl9HRVRfUEtHQ09ORklHX1ZBUiBfb3V0dmFyIF92YXJuYW1lIF9leHRyYV9h
cmdzKQogICAgIGVsc2UgKCkKICAgICAgICAgc3RyaW5nKFJFR0VYIFJFUExBQ0UgIltcclxuXSIg
IiAiIF9yZXN1bHQgIiR7X3Jlc3VsdH0iKQogICAgICAgICBzdHJpbmcoUkVHRVggUkVQTEFDRSAi
ICskIiAiIiAgX3Jlc3VsdCAiJHtfcmVzdWx0fSIpCisgICAgICAgIHN0cmluZyhDT05DQVQgX3Jl
c3VsdCAkRU5We1BLR19DT05GSUdfU1lTUk9PVF9ESVJ9ICIke19yZXN1bHR9IikKICAgICAgICAg
c2VwYXJhdGVfYXJndW1lbnRzKF9yZXN1bHQpCiAgICAgICAgIHNldCgke19vdXR2YXJ9ICR7X3Jl
c3VsdH0gQ0FDSEUgSU5URVJOQUwgIiIpCiAgIC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olete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>452238</attachid>
            <date>2022-02-16 13:12:43 -0800</date>
            <delta_ts>2022-04-15 10:23:08 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-232933-20220216221242.patch</filename>
            <type>text/plain</type>
            <size>1869</size>
            <attacher name="Alexander Kanavin">alex.kanavin</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjg5OTE3CmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvRmlu
ZEdPYmplY3RJbnRyb3NwZWN0aW9uLmNtYWtlIGIvU291cmNlL2NtYWtlL0ZpbmRHT2JqZWN0SW50
cm9zcGVjdGlvbi5jbWFrZQppbmRleCBiZTk2ODE0YTdmZjcxZDExYTUxYWEwMGNjNzc3ZWM2OTBh
YTFmOWY3Li5lZThhOGZhYjMwZGIzMDk4MTkxYmE4NTVjNTJkYWNjNzcxODBhNjAyIDEwMDY0NAot
LS0gYS9Tb3VyY2UvY21ha2UvRmluZEdPYmplY3RJbnRyb3NwZWN0aW9uLmNtYWtlCisrKyBiL1Nv
dXJjZS9jbWFrZS9GaW5kR09iamVjdEludHJvc3BlY3Rpb24uY21ha2UKQEAgLTMwLDYgKzMwLDkg
QEAgaWYgKFBLR19DT05GSUdfRk9VTkQpCiAgICAgICAgIHBrZ19nZXRfdmFyaWFibGUoSU5UUk9T
UEVDVElPTl9HRU5FUkFURSBnb2JqZWN0LWludHJvc3BlY3Rpb24tMS4wIGdfaXJfZ2VuZXJhdGUp
CiAgICAgICAgIHBrZ19nZXRfdmFyaWFibGUoSU5UUk9TUEVDVElPTl9HSVJESVIgZ29iamVjdC1p
bnRyb3NwZWN0aW9uLTEuMCBnaXJkaXIpCiAgICAgICAgIHBrZ19nZXRfdmFyaWFibGUoSU5UUk9T
UEVDVElPTl9UWVBFTElCRElSIGdvYmplY3QtaW50cm9zcGVjdGlvbi0xLjAgdHlwZWxpYmRpcikK
KyAgICAgICAgc2V0KElOVF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