<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15007</bug_id>
          
          <creation_ts>2023-01-13 14:32:17 +0000</creation_ts>
          <short_desc>nativesdk-pkgconfig doesn&apos;t work</short_desc>
          <delta_ts>2023-02-09 16:02:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>0.0.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94719</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-01-13 14:32:17 +0000</bug_when>
    <thetext>If you try and use pkg-config from buildtools-tarball, you find it is searching host paths:

pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build&gt; source buildtools/environment-setup-x86_64-pokysdk-linux 
pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build&gt; strace -f pkg-config --variable=dridriverdir dri

will show it searched:

/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/pkgconfig

/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/share/pkgconfig

We&apos;ll need to set PKG_CONFIG_PATH to search the sysroot, then the host locations within the SDK environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94766</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-19 15:51:47 +0000</bug_when>
    <thetext>Note that when this is resolved we should be able to revert &quot;selftest/virgl: use pkg-config from the host&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94774</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-19 17:06:52 +0000</bug_when>
    <thetext>Reproducer: install buildtools tarball, source the env, run &quot;pkg-config --cflags drm&quot;.  The search path is &quot;suboptimal&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94780</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-20 12:49:57 +0000</bug_when>
    <thetext>buildtools-tarball-extended, that is.  Normal buildtools has no pkgconfig.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94802</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-26 14:36:49 +0000</bug_when>
    <thetext>Patch on the list to add PKG_CONFIG_LIBDIR to the buildtools environment script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94915</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-02-09 16:02:15 +0000</bug_when>
    <thetext>Fixed in 8f768a3f4c7ff477e994d60800e5a1b83891615a.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>