Bug 438201 - -MD can place dependency problems in wrong place
Summary: -MD can place dependency problems in wrong place
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ccache
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-19 17:41 UTC by Gavin Scott
Modified: 2011-04-25 18:54 UTC (History)
1 user (show)

Fixed In Version: 2.4-13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-26 19:42:07 UTC


Attachments (Terms of Use)

Description Gavin Scott 2008-03-19 17:41:00 UTC
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 22:51:50 UTC
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 22:52:32 UTC
Debian bug discussion: http://bugs.debian.org/217713

Comment 3 Gavin Scott 2008-03-20 19:53:50 UTC
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 15:23:37 UTC
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 15:34:56 UTC
Bumping release to F-8, no plans to ship this for F-7 (see comment 1).

Comment 6 Bug Zapper 2008-11-26 10:13:07 UTC
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 19:42:07 UTC
F-8 update is not planned any more either, marking as fixed in current release.

Comment 8 Fedora Update System 2011-04-02 11:45:36 UTC
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 18:54:13 UTC
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.