Bug 657857 - ccache generates invalid error when compiling with specific options, makes Eclipse projects problematic
Summary: ccache generates invalid error when compiling with specific options, makes Ec...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ccache
Version: 14
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-28 13:47 UTC by Hedayat Vatankhah
Modified: 2010-11-30 22:46 UTC (History)
2 users (show)

Fixed In Version: ccache-3.1.3-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-30 22:46:10 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Eclipse Project 330249 None None None Never
Samba Project 7827 None None None Never

Description Hedayat Vatankhah 2010-11-28 13:47:23 UTC
Description of problem:
If you create a simple C/C++ project in Eclipse with the default settings and try 
to build in Debug configuration, it'll fail with an error message like this:
cc1plus: error: to generate dependencies you must specify either -M or -MM

This is not an eclipse error, a sample command like this generates the same error:
g++ -g3 -c -MMD -MP -MF"MyFile.d" -MT"MyFile.d" -o"MyFile.o" "../MyFile.cpp"

Apparently, this is a ccache bug, if you export CCACHE_DISABLE=1 or run g++ directly:
/usr/bin/g++ -g3 -c -MMD -MP -MF"MyFile.d" -MT"MyFile.d" -o"MyFile.o" "../MyFile.cpp"

You won't see the error message. (The error will vanish if you add an space after MT and MF options too).

Anyway, this bug brings a considerable inconvenience when using Eclipse since there is no way to add spaces after MF and MT there. The only solution is to add some flags or disable CCACHE completely.

Version-Release number of selected component (if applicable):
ccache-3.1-1.fc14.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install ccache
2. run the sample command given above for a sample source code
  
Actual results:
fails with the given error

Expected results:
should compile successfully (if the source code is OK!)

Additional info:
affects a lot of users

Comment 1 Ville Skyttä 2010-11-28 15:20:33 UTC
ccache 3.1.2 is currently in updates-testing; it probably won't help with this issue but it wouldn't hurt to try:

https://admin.fedoraproject.org/updates/ccache-3.1.2-1.fc14

Cc'd and copied upstream.

Comment 2 Joel Rosdahl 2010-11-28 15:42:25 UTC
Yes, the problem is that GCC accepts -MFarg and MTarg (and -MQarg) without spaces (which is undocumented) but ccache doesn't.

Comment 3 Fedora Update System 2010-11-28 20:03:44 UTC
ccache-3.1.3-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ccache-3.1.3-1.fc14

Comment 4 Hedayat Vatankhah 2010-11-28 21:02:24 UTC
Works fine. Thank you for your fast support :)

Comment 5 Fedora Update System 2010-11-29 21:33:55 UTC
ccache-3.1.3-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ccache'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ccache-3.1.3-1.fc14

Comment 6 Fedora Update System 2010-11-30 22:45:40 UTC
ccache-3.1.3-1.fc14 has been pushed to the Fedora 14 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.