<?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>3474</bug_id>
          
          <creation_ts>2012-11-21 20:19:39 +0000</creation_ts>
          <short_desc>RPM -dev packages with pkgconfig files depend on pkgconfig</short_desc>
          <delta_ts>2013-01-31 08:38:18 +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>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Bogdan Marinescu">bogdan.a.marinescu</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>dvhart</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>nitin.a.kamble</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27609</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-11-21 20:19:39 +0000</bug_when>
    <thetext>From clean, do a RPM build of a -dev image and you&apos;ll get an image construction failure:

| error: Failed dependencies:
| 	pkgconfig is needed by libz-dev-1.2.7-r0.i586

rpmdeps is adding a pkgconfig dependency to -dev packages which contain a .pc file, but I didn&apos;t build pkgconfig so there isn&apos;t a package to install.

I&apos;m a firm believer that just because a package ships a .pc it doesn&apos;t inherently depend on pkgconfig (the source package that wants to use pkgconfig does, and that&apos;s where the dependency should be), so we should patch that out of rpmdeps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28085</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-12-07 16:59:30 +0000</bug_when>
    <thetext>The dependency is &apos;real&apos;, in that the -dev packages do contain a .pc file, and to use it you need pkgconfig... it&apos;s just how do we tell the build system when to build it, if it&apos;s need is only detected after a given packages build-time.

One possible solution to this is to treat pkgconfig as a required tool.  It&apos;s small enough that it should be fairly quick to build the package and then ignore it from that point forward.

The downside is pkgconfig depends on glib-2.0 and popt.  So that might drag in additional dependencies that -do- take a lot longer to build.  I&apos;ve not traced the over all dependency set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28086</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-12-07 17:02:32 +0000</bug_when>
    <thetext>libz-dev doesn&apos;t require pkgconfig, as a program linking to libz doens&apos;t have to use pkgconfig (it could just #include &lt;zlib.h&gt; and hope for the best).

The pkg-config dependency is always a build-dependency on the package that is using pkg-config.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28087</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-12-07 17:05:27 +0000</bug_when>
    <thetext>Any package that provides a .pc file gets an automatic dependency on pkgconfig from the per-file dep generator used by RPM.. (and maybe someday by the other packaging backends.)

There -are- -dev packages that do actually state a dependency on pkgconfig however.. libtelephony-dev is one of them.  A specific dependence on pkgconfig is declared within the pkgconfig file itself.

It&apos;s also very common that configure scripts for packages do depend on pkgconfig or on scripts that call pkgconfig.  So for a -dev system we do need it, we just have to figure out the best way to add it to the mix.

(Maybe the answer is if the IMAGE_FEATURES of dev-pkgs is enabled, pkgconfig is also built?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28092</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-12-07 17:22:41 +0000</bug_when>
    <thetext>&quot;Any package that provides a .pc file gets an automatic dependency on pkgconfig from the per-file dep generator used by RPM&quot;

Yes, and that&apos;s what I was moaning about initially.

If dev-pkgs pulls in pkgconfig why shouldn&apos;t it also pull in gcc, make, automake, scons, cmake, waf...

If someone expects to actually compile stuff then they&apos;ll need to install the tools they&apos;ll need.  tools-sdk is the obvious starting point there and the docs claim it pulls in pkgconfig.

libtelepathy-glib having an explicit dependency on pkgconfig is interesting and I suspect very unusual.  It depends on &gt;= 0.21 which was released in 2006... we could easily patch that out and honestly I think asking upstream to remove it would work fine - it&apos;s serving no useful purpose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28123</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-12-10 15:52:21 +0000</bug_when>
    <thetext>I&apos;ve just submitted a patch from telepathy-glib upstream that removes the pkgconfig dependency from telepathy-glib.pc.  Are there any other pkgconfig files that do this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28124</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-12-10 16:33:11 +0000</bug_when>
    <thetext>We would need to audit the system.  Using the RPM backend, you can query the packages and look for references of &quot;pkgconfig(pkg-config)&quot;.  This will point out any specific dependency on pkgconfig itself.

Also, one alternative suggestion.  We could change the hard dependencies for the &apos;pkgconfig....&apos; into recommends instead.  This would still ensure the right set of packages are installed, but would prevent failures if pkgconfig itself was not available.

If this is a direction we want to look at, it will take some development.  In OE we will need to have a way to filter the dependency list and move the pkgconfig items to be runtime-recommends... and we will have to extend RPM to add a way to specify the runtime-recommends (as opposed to requirements.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29183</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-01-25 10:58:10 +0000</bug_when>
    <thetext>*** Bug 3627 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29199</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-01-25 12:52:07 +0000</bug_when>
    <thetext>I&apos;d suggest for now we just filter out the dependencies on pkgconfig itself...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29292</commentid>
    <comment_count>9</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-29 13:33:58 +0000</bug_when>
    <thetext>I can&apos;t reproduce this on the latest master (HEAD at cfb082961a6c9ac3d65738031c4071210529cd07). I&apos;ve tried RPM builds for both core-image-sato-dev and core-image-minimal-dev and both succeeded without errors. Do I need to do anything else?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29299</commentid>
    <comment_count>10</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-01-29 16:54:19 +0000</bug_when>
    <thetext>Bogdan,
  Try these steps:

1. Start a new build form scratch for core-image-sato for lets say sugarbay BSP
2. Once step 1 is complete, then try building core-image-lsb-sdk

It is possible that this issue may not happen while building lsb images from scratch. And in my testing I have built the lsb image always after building the sato image.

  Also Paul was working on this or similar bug, so I wonder if Paul has anything to say on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29300</commentid>
    <comment_count>11</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-01-29 16:55:38 +0000</bug_when>
    <thetext>Paul,
  Do you have any thing to add on this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29307</commentid>
    <comment_count>12</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-01-29 18:03:11 +0000</bug_when>
    <thetext>Nitin, can you add your host info, I wonder if there some host difference that are getting involved between Nitin and Bogdan&apos;s system.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29347</commentid>
    <comment_count>13</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-30 12:57:43 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Bogdan,
&gt;   Try these steps:
&gt; 
&gt; 1. Start a new build form scratch for core-image-sato for lets say sugarbay
&gt; BSP
&gt; 2. Once step 1 is complete, then try building core-image-lsb-sdk
&gt; 
&gt; It is possible that this issue may not happen while building lsb images from
&gt; scratch. And in my testing I have built the lsb image always after building
&gt; the sato image.
&gt; 
&gt;   Also Paul was working on this or similar bug, so I wonder if Paul has
&gt; anything to say on this bug.

Sorry, still no luck:

/poky/buildx [] $ MACHINE=sugarbay bitbake core-image-sato
Parsing recipes: 100% |#############################################################################################################################################################################| Time: 00:00:11
Parsing of 831 .bb files complete (0 cached, 831 parsed). 1139 targets, 32 skipped, 0 masked, 0 errors.

Build Configuration:
BB_VERSION        = &quot;1.17.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.10&quot;
TARGET_SYS        = &quot;x86_64-poky-linux&quot;
MACHINE           = &quot;sugarbay&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.3+snapshot-20130130&quot;
TUNE_FEATURES     = &quot;m64&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;b3474:27c8af1e3a9092caa19bd813c4dd0747de766dc5&quot;
meta-intel        
meta-sugarbay     = &quot;master:5164713bfbef16e1a49bc599ec0d738df52ab254&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 5905 tasks of which 4982 didn&apos;t need to be rerun and all succeeded.
/poky/buildx [] $ MACHINE=sugarbay bitbake core-image-lsb-sdk
Loading cache: 100% |###############################################################################################################################################################################| ETA:  00:00:00
Loaded 1140 entries from dependency cache.

Build Configuration:
BB_VERSION        = &quot;1.17.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.10&quot;
TARGET_SYS        = &quot;x86_64-poky-linux&quot;
MACHINE           = &quot;sugarbay&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.3+snapshot-20130130&quot;
TUNE_FEATURES     = &quot;m64&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;b3474:27c8af1e3a9092caa19bd813c4dd0747de766dc5&quot;
meta-intel        
meta-sugarbay     = &quot;master:5164713bfbef16e1a49bc599ec0d738df52ab254&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: QA Issue: dhcp: Files/directories were installed but not shipped
  /etc/dhclient.conf.example
  /etc/dhcpd.conf.example
NOTE: Tasks Summary: Attempted 6817 tasks of which 4786 didn&apos;t need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29371</commentid>
    <comment_count>14</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-01-31 00:20:38 +0000</bug_when>
    <thetext>It is possible this is an sstate relocation issue caused by:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9a26b9c69c47c87ce71a06f76682c187767e7897

Were the people reproducing this building from an sstate cache that was built in an alternative location? I suspect Ross was since I know something about his setup. 

Nitin: What about you?

To verify this issue, you need to clean out the sstate cache after applying the above fix since we don&apos;t track dependencies on native utils in the sstate hashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29372</commentid>
    <comment_count>15</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-01-31 00:45:13 +0000</bug_when>
    <thetext>RP,
  I am not sharing the sstate cache across different machines. At the most I may have had updated the poky &amp; meta-intel branches in between the separate image builds. 

Bogdan,
  If it is not reproducible anymore, we can close it now. Next time if I encounter it, I will try to gather more information for reproducing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29379</commentid>
    <comment_count>16</comment_count>
    <who name="Bogdan Marinescu">bogdan.a.marinescu</who>
    <bug_when>2013-01-31 08:38:18 +0000</bug_when>
    <thetext>As per Nitin&apos;s indications, I am closing this bug as &quot;not reproducible&quot; for now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>