Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 465312

Summary: Noticing odd portage behavior when building gcc with USE="-gcj" on command line
Product: Portage Development Reporter: Miles Georgi <azimux>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300071    

Description Miles Georgi 2013-04-09 23:25:44 UTC
This seems odd to me and is probably a bug of some sort in portage or the gcc ebuilds.

[code]
monkfish ~ # emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-devel/gcc-4.6.3:4.6  USE="cxx fortran gcj mudflap (multilib
) nls nptl openmp (-altivec) -doc (-fixed-point) -graphite -gtk (-hardened) (-li
bssp) -multislot -nopie -nossp -objc -objc++ -objc-gc {-test} -vanilla" 0 kB
[/code]

[code]
monkfish ~ # USE="-gcj" emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS    ] sys-devel/gcc-4.5.4:4.5 [4.6.3:4.6] USE="cxx fortran mudflap (m
ultilib) nls nptl openmp (-altivec) -doc (-fixed-point) -gcj -graphite -gtk (-ha
rdened) (-libssp) -lto -multislot -nopie -nossp -objc -objc++ -objc-gc {-test} -
vanilla" 0 kB
[/code]

Why would passing USE="-gcj" tell portage to downgrade gcc instead of rebuilding the most recent version?

Actually, I just tried something a little more strange, which is what makes me think this might be a bug: if I install gcc:4.5 with gcj and then try [code]USE="-gcj" emerge -pv gcc[/code] it will try rebuilding 4.6 without the flag instead of 4.5.

Reproducible: Always

Steps to Reproduce:
1. Install gcc 4.6 with gcj USE flag and no other gcc installed
2. run: USE="-gcj" emerge -pv gcc


Actual Results:  
It attempts to emerge gcc:4.5

Expected Results:  
I would expect a rebuild of gcc:4.6 with -gcj
Comment 1 Zac Medico gentoo-dev 2013-04-10 16:12:30 UTC
This looks like it may be the same issue that triggers bug 438502. Please post the portage versions and use depclean to show the reverse dependencies of gcc:

   emerge --version
   emerge -pv --depclean gcc
Comment 2 Miles Georgi 2013-04-10 16:27:30 UTC
miles@monkfish ~ $ emerge --version
Portage 2.1.11.55 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.7.10-ge
ntoo x86_64)
miles@monkfish ~ $ emerge -pv --depclean gcc

Calculating dependencies... done!
  sys-devel/gcc-4.6.3 pulled in by:
    @system requires sys-devel/gcc
    app-text/pdftk-1.44 requires >=sys-devel/gcc-4.3.1[gcj]
    dev-db/mysql-5.1.67 requires >=sys-devel/gcc-3.4.6
    sys-devel/llvm-3.1-r2 requires >=sys-devel/gcc-3.0
    sys-libs/glibc-2.15-r3 requires >=sys-devel/gcc-3.4.4, >=sys-devel/gcc-4.3

>>> No packages selected for removal by depclean
Packages installed:   575
Packages in world:    87
Packages in system:   42
Required packages:    575
Number to remove:     0
miles@monkfish ~ $
Comment 3 Zac Medico gentoo-dev 2013-04-10 17:35:48 UTC
(In reply to comment #2)
> Calculating dependencies... done!
>   sys-devel/gcc-4.6.3 pulled in by:
>     @system requires sys-devel/gcc
>     app-text/pdftk-1.44 requires >=sys-devel/gcc-4.3.1[gcj]

So, it's pulling in gcc:4.5 in order to keep that >=sys-devel/gcc-4.3.1[gcj] dep satisfied by your installed gcc:4.6. We may have a similar bug filed already, but I'm not sure yet.