Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256061 - x11-misc/makedepend - makedepend does not handle directories and files with the same name correctly
Summary: x11-misc/makedepend - makedepend does not handle directories and files with t...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-23 06:56 UTC by Alexandru Botezatu
Modified: 2009-01-25 15:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the problem (patch,371 bytes, patch)
2009-01-23 06:57 UTC, Alexandru Botezatu
Details | Diff
files supporting test case (bug_scenario_files.tzr.bz2,502 bytes, application/octet-stream)
2009-01-23 06:57 UTC, Alexandru Botezatu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Botezatu 2009-01-23 06:56:13 UTC
Consider the following scenario:

foo.cpp has the following includes:
#include <utility>
#include "bar.h"

bar.h has the following includes:
#include "utility/bazz.h"

running 'makedepend -I. foo.cpp' will give the following error:

failed to read ./utility

The reason is that makedepend does not bother to check if the file it is trying to open is actually a directory. It should ignore directories with the same name as the include file it is trying to parse.

A fix is attached to the bug.

 

Reproducible: Always

Steps to Reproduce:
1.Unpack attached file 
2.cd makedepend_bug
3.makedepend -I. foo.cpp


Actual Results:  
makedepend: error:  failed to read ./utility

Expected Results:  
Makedepend should run successfully

a patch is attached that fixes the problem.
Comment 1 Alexandru Botezatu 2009-01-23 06:57:09 UTC
Created attachment 179408 [details, diff]
Patch to fix the problem
Comment 2 Alexandru Botezatu 2009-01-23 06:57:59 UTC
Created attachment 179410 [details]
files supporting test case

Run it with:
cd makedepend_bug
makedepend -I. foo.cpp
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2009-01-25 15:53:55 UTC
makedepend has been deprecated by upstream for quite a while now and is only kept around for systems where the C compiler cannot generate dependency information (gcc can, sun's cc can too apparently).

So this is definitely a issue that needs to be reported to FreeDesktop's bugzilla (http://bugs.freedesktop.org/) so that it can be fixed there.

If you can, I strongly suggest you try using gcc's dependency tracking system rather than makedepend's.

Thanks