Bug 8918 - C++ compiler -I flag not working properly
: C++ compiler -I flag not working properly
Status: NEW
Product: Development platform
Madde
: 5.0-final
: All Maemo
: Unspecified normal (vote)
: ---
Assigned To: Madde Support
: sdk-madde-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-02-08 13:01 UTC by Kevin Ottens
Modified: 2011-01-27 16:57 UTC (History)
3 users (show)

See Also:


Attachments


Note

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


Description Kevin Ottens (reporter) 2010-02-08 13:01:05 UTC
SOFTWARE VERSION: MADDE 0.6.14

EXACT STEPS LEADING TO PROBLEM: 
Specifying "-I/path/foo" outside of sysroots will be ignored. Apparently only
absolute paths leading inside sysroots or relative paths (-I. -I..) seem to
work.

EXPECTED OUTCOME:
-I/path/foo should make the compiler find files within /path/foo when #include
is used in the source code.

ACTUAL OUTCOME:
Lots of "No such file or directory" errors as the compiler doesn't find
required include files to compile source (since some of the include directories
are ignored).

REPRODUCIBILITY: always

Note that cmake extensively uses absolute path, so this problem is likely to
arise in most cmake based projects. You should be able to reproduce the issue
with any of them I think.
Comment 1 Tomi Ollila 2010-02-09 09:01:58 UTC
"Fixing" this requires some heuristics to unix gcc toolwrapper; maybe
not patching paths that are close to current working directory or something.

Making these work is outside the scope of the project just now, but if it is
easy why not make best effort to work with more use cases.
Comment 2 Tomi Ollila 2010-02-12 13:54:41 UTC
One alternative is to use some environment variable to 
affect whether command line path mangling is to be done...

... at some point we might even change the default if
it works better that way.

In the beginning this variable would affect the operation
of gcc wrappers and pkg-config.
Comment 3 Kevin Ottens (reporter) 2010-02-12 14:03:10 UTC
I think it is mainly about detecting where are the build and source dirs. There
can probably be some heuristic based on the input file (which points somewhere
in the source dir) when the -c parameter is used and on the -o parameter (which
points somewhere in the build dir).

Then the challenge is to find out how much you can climb up the tree before
being out of the build dir or source dir.

Just brainstorming here.
Comment 4 Tomi Ollila 2011-01-27 16:57:38 UTC
Follow

http://bugs.meego.com/show_bug.cgi?id=12809

for new developments on this issue.