If the directory is already in the built-in search path (like /Users/minshall/src/import/sage/sage-5.4.1/local/include if you use the gcc that Sage compiled) then the -I option is ignored.
-Idir Add the directory dir to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. However, you should not use this option to add directories that contain vendor-supplied system header files (use -isystem for that). If you use more than one -I option, the directories are scanned in left-to-right order; the standard system directories come after. If a standard system include directory, or a directory specified with -isystem, is also specified with -I, the -I option will be ignored. The directory will still be searched but as a system directory at its normal position in the system include chain. This is to ensure that GCC's procedure to fix buggy system headers and the ordering for the include_next directive are not inadvertently changed. If you really need to change the search order for system directories, use the -nostdinc and/or -isystem options. http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Directory-Options.html#Directory-Options On Friday, December 14, 2012 7:58:35 PM UTC, Greg Minshall wrote: > > Volker, > > No its first -I<dir>, then *_INCLUDE_PATH, then the path thats hard-wired >> into the compiler. But since Sage builds its own compiler you are >> effectively overriding the search path. > > > however, this doesn't explain the failure i was having, where > ---- > gcc -c -I. -I../src/headers -I../src/language > -I/Users/minshall/src/import/sage/sage-5.4.1/local/include -O3 -Wall > -fno-strict-aliasing -fomit-frame-pointer -g -o gp_rl.o > ../src/gp/gp_rl.c > ---- > (i.e., with -I<...>/sage-5.4.1/local/include is on the command line) > appears to have picked up the <readline/readline.h> from /usr/include, > rather than from <...>/sage-5.4.1/local/include. > > or, am i missing something? (maybe i don't understand your second > sentence?) > > Greg > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
