Bug 12139

Summary: ERROR: Multiple .bb files are due to be built which each provide gzip-native
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher
Version: 2.4.1   
Target Milestone: 2.5 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Juro Bystricky 2017-09-28 17:09:21 UTC
When I try to use gzip-native (as opposed to host gzip),  I set in my local.conf:

do_rootfs[depends] += "gzip-replacement-native:do_populate_sysroot"
EXTRANATIVEPATH += "gzip-native"

and then:

$ bitbake core-image-minimal

complains:

ERROR: Multiple .bb files are due to be built which each provide gzip-native:########                                                                              | ETA:  0:00:03
  virtual:native:/data/master/poky/meta/recipes-extended/pigz/pigz_2.3.4.bb                                                                                                       
  virtual:native:/data/master/poky/meta/recipes-extended/gzip/gzip_1.8.bb                                                                                                         
A list of tasks depending on these providers is shown and may help explain where the dependency comes from.                                                                       
virtual:native:/data/master/poky/meta/recipes-extended/pigz/pigz_2.3.4.bb has unique dependees:                                                                                   
  virtual:native:/data/master/poky/meta/recipes-core/expat/expat_2.2.3.bb:do_unpack                                                                                               
  /data/master/poky/meta/recipes-core/expat/expat_2.2.3.bb:do_prepare_recipe_sysroot                                                                                              
  virtual:native:/data/master/poky/meta/recipes-core/expat/expat_2.2.3.bb:do_prepare_recipe_sysroot                                                                               
  /data/master/poky/meta/recipes-core/expat/expat_2.2.3.bb:do_unpack                                                                                                              
virtual:native:/data/master/poky/meta/recipes-extended/gzip/gzip_1.8.bb has unique dependees:                                                                                     
                                                                                                                                                                                  
It could be that one recipe provides something the other doesn't and should. The following provider and runtime provider differences may be helpful.                              
virtual:native:/data/master/poky/meta/recipes-extended/pigz/pigz_2.3.4.bb has unique provides:                                                                                    
  pigz-native                                                                                                                                                                     
virtual:native:/data/master/poky/meta/recipes-extended/pigz/pigz_2.3.4.bb has unique rprovides:                                                                                   
  pigz-native                                                                                                                                                                     
virtual:native:/data/master/poky/meta/recipes-extended/gzip/gzip_1.8.bb has unique provides:                                                                                      
  gzip-replacement-native                                                                                                                                                         
virtual:native:/data/master/poky/meta/recipes-extended/gzip/gzip_1.8.bb has unique rprovides:                                                                                     
  gzip-native      


I definitely cannot use the host gzip, so how do I proceed?
Comment 1 Juro Bystricky 2017-10-04 23:38:33 UTC
I should mentioned that I also tried all kinds of PREFERRED_PROVIDER settings, such as:

PREFERRED_PROVIDER_gzip-native = "gzip-native"
PREFERRED_PROVIDER_gzip-native = "gzip-replacement-native"
PREFERRED_PROVIDER_virtual/gzip-native="gzip-native"

until I ran out of ideas.
Comment 2 Juro Bystricky 2017-12-06 22:11:28 UTC
I should mention that I need to differentiate between pigz and gzip, as (contrary what pigz claims) pigz ** does not ** support identical command line options as gzip.
In particular:

gzip -n 
pigz -n

behave differently. I think you need to specify

pigz -n -T 

to emulate 

gzip -n

However, I don't think gzip supports -T.
So pretending pigz is the same as gzip is not just confusing but also (in some cases) wrong.
Comment 3 Juro Bystricky 2017-12-07 21:25:33 UTC
I will file a separate bug reflecting the fact taht pigz is not a drop in replacement for gzip.
Comment 4 Ross Burton 2018-02-06 12:00:36 UTC
The fix for 12410 handles this too.
Comment 5 Ross Burton 2018-02-20 20:14:12 UTC
Fixed in oe-core 1624b7bfea7ac31c344a6cfcc7865a038e943814 by ensuring that pigz isn't a gzip replacement.