maemo.org Bugzilla – Bug 8918
C++ compiler -I flag not working properly
Last modified: 2011-01-27 16:57:38 UTC
You need to
before you can comment on or make changes to this bug.
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
-I/path/foo should make the compiler find files within /path/foo when #include
is used in the source code.
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
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.
"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.
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.
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.
for new developments on this issue.