<?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>132220</bug_id>
          
          <creation_ts>2014-04-26 03:16:00 -0700</creation_ts>
          <short_desc>[GTK] GObject introspection links to installed libs when using jhbuild</short_desc>
          <delta_ts>2014-08-06 11:25:57 -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>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>Gtk, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>132226</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bunhere</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>lantw44</cc>
    
    <cc>rakuco</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1004332</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-04-26 03:16:00 -0700</bug_when>
    <thetext>See:

/home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/Source/WebKit2/tmp-introspecttMzAlB/WebKit2WebExtension-3.0.o:(.data+0x4b8): referencia a `webkit_dom_vtt_cue_get_type&apos; sin definir (this is undefined reference in English)
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command &apos;[&apos;/home/cgarcia/src/git/icecream/bin/cc&apos;, &apos;-o&apos;, &apos;/home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/Source/WebKit2/tmp-introspecttMzAlB/WebKit2WebExtension-3.0&apos;, &apos;-Wno-deprecated-declarations&apos;, &apos;-L/home/cgarcia/gnome/lib64&apos;, &apos;/home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/Source/WebKit2/tmp-introspecttMzAlB/WebKit2WebExtension-3.0.o&apos;, &apos;-L.&apos;, &apos;-Wl,-rpath=.&apos;, &apos;-Wl,--no-as-needed&apos;, &apos;-lwebkit2gtk-3.0&apos;, &apos;-ljavascriptcoregtk-3.0&apos;, &apos;-L/home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib&apos;, &apos;-Wl,-rpath=/home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib&apos;, &apos;-Wl,--export-dynamic&apos;, &apos;-pthread&apos;, &apos;-L/home/cgarcia/gnome/lib64&apos;, &apos;-lgmodule-2.0&apos;, &apos;-lgtk-3&apos;, &apos;-lgdk-3&apos;, &apos;-latk-1.0&apos;, &apos;-lpangocairo-1.0&apos;, &apos;-lgdk_pixbuf-2.0&apos;, &apos;-lcairo-gobject&apos;, &apos;-lpango-1.0&apos;, &apos;-lcairo&apos;, &apos;-lsoup-2.4&apos;, &apos;-lgio-2.0&apos;, &apos;-lgobject-2.0&apos;, &apos;-lglib-2.0&apos;]&apos; returned non-zero exit status 1

As you can see there&apos;s two -L/home/cgarcia/gnome/lib64, and the first one is very early an takes precedence. That first one comes from the LDFLAGS env varaibles that jhbuild sets. The other one, which is correctly set after the builddir paths, is deduced by g-ir-scanner from the lib arguments passed using ldd. This didn&apos;t happen with autotools because g-ir-scanner used libtool. 
This is not a problem when using the internal jhbuild because we never run make install for webkit, only for the dependencies, so the linker never finds a installed webkit in jhbuild env.
Since we are already overriding the CFLAGS env var we can simply override LDFLAGS as well to unset it, since g-ir-scanner will do the right thing deducing all library paths using ldd.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1004333</commentid>
    <comment_count>1</comment_count>
      <attachid>230240</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-04-26 03:22:03 -0700</bug_when>
    <thetext>Created attachment 230240
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1004343</commentid>
    <comment_count>2</comment_count>
      <attachid>230240</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2014-04-26 08:27:01 -0700</bug_when>
    <thetext>Comment on attachment 230240
Patch

Seems reasonable, though I wonder if some flags should be passed through. What is the value of LDFLAGS that is causing the incorrect link.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1004346</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-04-26 12:03:20 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 230240 [details])
&gt; Seems reasonable, though I wonder if some flags should be passed through. What is the value of LDFLAGS that is causing the incorrect link.

$ jhbuild run env | grep LDFLAGS
LDFLAGS=-L/home/cgarcia/gnome/lib64

That&apos;s added later guessed from the deps. We are already overriding the CFLAGS as well. jhbuild sets the LDFLAGS env var to make sure the programs compiled during configure build against the jhbuild environment. Note that this only affects the temporary files compiled by gobject-introspection to generate the gir files, so I&apos;m pretty sure it&apos;s safe to override the LDFLAGS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1004498</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-04-28 00:52:17 -0700</bug_when>
    <thetext>Committed r167873: &lt;http://trac.webkit.org/changeset/167873&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1027236</commentid>
    <comment_count>5</comment_count>
    <who name="Ting-Wei Lan">lantw44</who>
    <bug_when>2014-08-06 11:25:57 -0700</bug_when>
    <thetext>Ignoring LDFLAGS causes build failure on FreeBSD because it cannot find libintl via LDFLAGS.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>230240</attachid>
            <date>2014-04-26 03:22:03 -0700</date>
            <delta_ts>2014-04-27 04:03:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk-g-i-link.diff</filename>
            <type>text/plain</type>
            <size>2093</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA5MTk3NTE1Li43MGRlYzJiIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjAg
QEAKKzIwMTQtMDQtMjYgIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29t
PgorCisgICAgICAgIFtHVEtdIEdPYmplY3QgaW50cm9zcGVjdGlvbiBsaW5rcyB0byBpbnN0YWxs
ZWQgbGlicyB3aGVuIHVzaW5nIGpoYnVpbGQKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5v
cmcvc2hvd19idWcuY2dpP2lkPTEzMjIyMAorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIFRoZSBwcm9ibGVtIGlzIHRoYXQgZ29iamVjdC1pbnRyb3NwZWN0
aW9uIGlzIGxpbmtpbmcgdGhlIHRlbXBvcmFyeQorICAgICAgICBiaW5hcmllcyBhZGRpbmcgdGhl
IGxpYnJhcnkgcGF0aHMgcHJlc2VudCBMREZMQUdTIGVudmlyb25tZW50CisgICAgICAgIHZhcmlh
YmxlIGZpcnN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naXIKICAg
ICBERVBFTkRTIFdlYktpdDIKICAgICBERVBFTkRTIEphdmFTY3JpcHRDb3JlLTMtZ2lyCi0gICAg
Q09NTUFORCBDQz0ke0NNQUtFX0NfQ09NUElMRVJ9IENGTEFHUz0tV25vLWRlcHJlY2F0ZWQtZGVj
bGFyYXRpb25zCisgICAgQ09NTUFORCBDQz0ke0NNQUtFX0NfQ09NUElMRVJ9IENGTEFHUz0tV25v
LWRlcHJlY2F0ZWQtZGVjbGFyYXRpb25zIExERkxBR1M9CiAgICAgICAgICR7SU5UUk9TUEVDVElP
Tl9TQ0FOTkVSfQogICAgICAgICAtLXF1aWV0CiAgICAgICAgIC0td2Fybi1hbGwKQEAgLTcyMiw3
ICs3MjIsNyBAQCBhZGRfY3VzdG9tX2NvbW1hbmQoCiAgICAgT1VUUFVUICR7Q01BS0VfQklOQVJZ
X0RJUn0vV2ViS2l0MldlYkV4dGVuc2lvbi0ke1dFQktJVEdUS19BUElfVkVSU0lPTn0uZ2lyCiAg
ICAgREVQRU5EUyBKYXZhU2NyaXB0Q29yZS0zLWdpcgogICAgIERFUEVORFMgJHtDTUFLRV9CSU5B
UllfRElSfS9XZWJLaXQyLSR7V0VCS0lUR1RLX0FQSV9WRVJTSU9OfS5naXIKLSAgICBDT01NQU5E
IENDPSR7Q01BS0VfQ19DT01QSUxFUn0gQ0ZMQUdTPS1Xbm8tZGVwcmVjYXRlZC1kZWNsYXJhdGlv
bnMKKyAgICBDT01NQU5EIENDPSR7Q01BS0VfQ19DT01QSUxFUn0gQ0ZMQUdTPS1Xbm8tZGVwcmVj
YXRlZC1kZWNsYXJhdGlvbnMgTERGTEFHUz0KICAgICAgICAgJHtJTlRST1NQRUNUSU9OX1NDQU5O
RVJ9CiAgICAgICAgIC0tcXVpZXQKICAgICAgICAgLS13YXJuLWFsbAo=
</data>
<flag name="review"
          id="254631"
          type_id="1"
          status="+"
          setter="mrobinson"
    />
          </attachment>
      

    </bug>

</bugzilla>