Bug 438201 - -MD can place dependency problems in wrong place
-MD can place dependency problems in wrong place
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ccache (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-19 13:41 EDT by Gavin Scott
Modified: 2011-04-25 14:54 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.4-13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-26 14:42:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gavin Scott 2008-03-19 13:41:00 EDT
Description of problem:

ccache with -MD does not honor the gcc manual's description of where the
resulting dependency file is placed:

"      -MD -MD is equivalent to -M -MF file, except that -E is not implied.
           The driver determines file based on whether an -o option is given.
           If it is, the driver uses its argument but with a suffix of .d,
           otherwise it take the basename of the input file and applies a .d
           suffix."

With -MD alone, ccache uses the fallback method described above of adding .d to
the basename of the input file.

Version-Release number of selected component (if applicable):

ccache-2.4-8.fc7

How reproducible:

always

Steps to Reproduce:
1. gcc -c -MD test.c -o obj/foo.o
  
Actual results:

[gavin@boll bug]$ rm -rf *
[gavin@boll bug]$ mkdir obj
[gavin@boll bug]$ echo '#include <stdio.h>' > test.c
[gavin@boll bug]$ /usr/lib64/ccache/gcc -c -MD test.c -o obj/foo.o
[gavin@boll bug]$ find .
.
./test.d
./test.c
./obj
./obj/foo.o


Expected results:

[gavin@boll bug]$ rm -rf *
[gavin@boll bug]$ mkdir obj
[gavin@boll bug]$ echo '#include <stdio.h>' > test.c
[gavin@boll bug]$ /usr/bin/gcc -c -MD test.c -o obj/foo.o
[gavin@boll bug]$ find .
.
./test.c
./obj
./obj/foo.o
./obj/foo.d


Additional info:

This took me awhile to track down due to the way that ccache masquerades as gcc
itself.  Looks like I'm not the only one:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24732

The depends-bugfix patch contained in this 2006 ccache mailing list post (which
got no replies) may be a fix for this problem:

http://lists.samba.org/archive/ccache/2006q4/000249.html
Comment 1 Ville Skyttä 2008-03-19 18:51:50 EDT
Thanks for the detailed bug report.  A similar patch has been in the Debian
package for half a year apparently with no bad effects, and it fixes your test
case for me on F8 so I've included it in 2.4-13.

2.4-13 is destined to Rawhide/F9 only for now, and possibly to F8 a bit later;
it's unknown at this time whether F7 will be updated any more.  But there's an
F7 scratch build available if you want to test it:
http://koji.fedoraproject.org/koji/taskinfo?taskID=522829
Comment 2 Ville Skyttä 2008-03-19 18:52:32 EDT
Debian bug discussion: http://bugs.debian.org/217713
Comment 3 Gavin Scott 2008-03-20 15:53:50 EDT
ccache-2.4-13.fc7.x86_64.rpm from your link in Comment #1 does indeed fix the
problem for me on F7.  Thanks!
Comment 4 Bug Zapper 2008-05-14 11:23:37 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Ville Skyttä 2008-05-14 11:34:56 EDT
Bumping release to F-8, no plans to ship this for F-7 (see comment 1).
Comment 6 Bug Zapper 2008-11-26 05:13:07 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Ville Skyttä 2008-11-26 14:42:07 EST
F-8 update is not planned any more either, marking as fixed in current release.
Comment 8 Fedora Update System 2011-04-02 07:45:36 EDT
ccache-2.4-19.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/ccache-2.4-19.el5
Comment 9 Fedora Update System 2011-04-25 14:54:13 EDT
ccache-2.4-19.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.