catastrophic error: cannot open source file "stdarg.h"
I am trying to install GMT (version 4.5.7) with netCDF (version 4.0.1) using the install parameters provided by the http://gmt.soest.hawaii.eduin a Mac Pro with OS X 10.7.3 using Intel Fortran Composer XE 2011 and C++ Composer XE 2011. I am encountering an error in the configuration of the status of the netCDF, specifically in executing libtool commands. In "Making check in libsrc", this error occurs:
error.c(11): catastrophic error: cannot open source file "stdarg.h"
I am not really sure how this could be solved though I have found a quite similar problem reported in 2009. The suggested solution is an upgrade and I'm not sure if the similar approach is still applicable today. Could anyone please suggest a solution to this issue?
I am not really sure which installation notes you are referring to. I actually installed Intel C++ Composer and Fortran Composer (both versions XE 2011) using licensed DVDs. I just followed the installation wizard. After then, I installed Xcode using the file from Apple Developer. I did not find any installation notes so I just installed it following the advice of several internet fora.
I have also asked Unidata for advise on installing netCDF since the problem seems to occur in the configuration of netCDF. They said that the configuration is picking up g++ as my preferred c++ compiler (see below).However, I have chosen icc as my default compiler.Quoting the message: "I see configure is picking up g++ as the C++ compiler, and I'm not sure it'scompatible with icc that you're using as the C compiler."
> checking CXX... g++ > checking CXXFLAGS... -g -O2 > checking type g++... g++ is /usr/bin/g++ > checking FC... ifort > checking FFLAGS... -g > checking type ifort... ifort is /usr/bin/ifort
I have tried changing my environment settings to CXX='' and changing the configuration option to disable cxx. However, this doesn't solve the issue.
Then, I tried searching for "stdarg.h"filenames in my system. It gives the following directories:
and ifthe 'stdarg.h' is not found in these foldersthere will be a compilation error.
I checked these paths and I have found 'stdarg.h'. I think I have a proper installation of C/C++ compiler though as I have stated in the previous post, the installation seems to choose g++ as my compiler and it may be incompatible with icc, my preferred c++ compiler.
I am not sure how to address this since I am really new to these things.
icc refers to g++ in order to locate several of the standard headers and libraries, so they had better be compatible. I don't know what you mean by "installation seems to choose g++." g++ must be active in order for icc to work. Applications which want g++ will use it; in order to use icc you must leave g++ active, set the icc environment variables by sourceing iccvars scripts, and invoke icc or icpc explicitly. If your installation has a symlink which make cc into an alias for gcc, that will remain unless you change it yourself.
> After then, I installed Xcode using the file from Apple Developer.
The installation of the Intel compilers requires that Xcode be installed before the compilers are installed. (And that you reinstall the compilers whenever you install a new/different version of Xcode.)
BTW, just for the record, which version of Xcode are you using?
Try uninstalling the compilers and Xcode in that order (look in the Xcode and compiler release notes for instructions for uninstalling). Then install Xcode, make sure it works and afterwards install the compilers.
Thanks, Jeff Arnold! Now I get it. :) I'm entirely new to handling Mac and servers so I really appreciate your explanation.
I am using Xcode 4.3.1, build version is 4E1019. I checked if the installation was carried out succesfully and working properly. I issued the command $ cc --version and I got the expected and correct response. I am not sure if OS X 10.7.3 with Xcode 4.3.1 is supported by intel (update 6 of release notes says that it supports Mac OS X 10.7 with Xcode 4.1. Another thread from Intel Network says that Xcode 4.3 is not yet supported).
It seems that uninstalling Xcode completely is a bit complicated so I'll try keeping the one that I have and then reinstall the compilers.
Since the installation of Intel Fortran and c++ composers do not recognize the real folders where I kept Xcode (I tried a lot of different folders after switching the path of Xcode using $ xcode-select -switch ), I just used "/" as the "location" of the Xcode as suggested here:http://software.intel.com/en-us/forums/showthread.php?t=103171
Now I have successfully installed GMT4.5.7 and netCDF4.0.1. However, I think, full integration of Xcode and the composers were not carried out successfully as there is no second copy of "opt/intel/..." underXcode directories (I checked just a few folders such as /Applications/Xcode.app/Contents/Developer). I am not sure how this would affect the performance of my computer in the future.