<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div><br>Hi<br><br>I've had to work through some problems compiling gdal 1.4.0 with the intel v9.1 compilers (specifically 9.1.043) that I though others may encounter too. I am not sure if the problems are related to my particular environment or to the GDAL build scripts. Here goes anyway;<br><br>1. during the configure stage the configure script tests the compiler for _GNU* #defs to decide whether it is invoking the GNU C compiler or not. By default the Intel C compilers define these flags for GNU compatibility. configure ends up deciding that it is invoking GNU C by another name, so starts invoking gcc directly, at which point it is using GCC and no longer doing what I want.<br><br>To work around this set the following environment variables;<br><br>&nbsp;&nbsp;&nbsp; CC=icc # you must already have this!<br>&nbsp;&nbsp;&nbsp;
 CFLAGS="-gcc-version=330 -no-gcc"<br>&nbsp;&nbsp;&nbsp; CXXFLAGS="-gcc-version=330 -no-gcc"<br><br>The -no-gcc stops icc from pre-defining the _GNU #defs and avoids the configure confusion.<br><br>2. During make install the ngpython build fails. It attempts to invoke a C compiler but leaves out the compiler name (ie no gcc or icc in the command line). This results in an error "invalid option -d" (reported by /bin/sh when trying to handle args intended for a compiler).<br><br>3. Compilation of the swig python glue files fails with lots of pre-processor related logic regarding _GNU #defs. The swig code uses lots of #def checks for GNU compiler versions.<br><br>To fix 2 and 3 I had to do the following;<br><br>&nbsp; - manually edit swig/python/GNUmakefile to add AFTER include ../../GDALmake.opt;<br>&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS="-w -gcc-version=330" &nbsp;&nbsp;  # this un-does part of what we did in the fix for (1)<br>&nbsp; - after running a make install (which will still
 fail with "invalid option -d")<br>&nbsp;&nbsp;&nbsp;&nbsp; cd swig/python<br>&nbsp;&nbsp;&nbsp;&nbsp; CC=icc CFLAGS="-w -gcc-version=330" python setup.py install <br><br>I could not figure out why it is necessary to invoke the python setup.py install step out-side the make install job, but this is the only way I could get the compiler choice to be enacted correctly.<br><br>Cheers<br>&nbsp;&nbsp;&nbsp;&nbsp; <br><br><br><br>&nbsp;&nbsp;&nbsp; <br></div></div></body></html>