Compiling scripts after upgrading from Tiger to Leopard

I recently upgraded my MacBook Pro to run with Leopard. Before the update, I was able to pre-compile root scripts. Now, I get many errors. Apparently, the compiler does not find some of the standard header files.

I searched for the missing header files (e.g. iosfwd.h) and they are in the directory:
/Developer/SDKs/MacOSX10.5.sdk/usr/include/gcc/darwin/3.3/c++/

However, I do not know how to let the root compiler know about these header files.

I attach the error messages that came up when compiling a short program, and my .profile file. I installed root from the binary distribution.

–Henric

.L plot8.c+

Info in TUnixSystem::ACLiC: creating shared library /Data/Analysis/Polarization/./plot8_c.so
In file included from /Data/Analysis/Root//include/Rtypes.h:30,
from /Data/Analysis/Root//include/TObject.h:31,
from /Data/Analysis/Root//include/TNamed.h:26,
from /Data/Analysis/Root//include/TDirectory.h:25,
from /Data/Analysis/Root//include/TROOT.h:29,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.h:30,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Root//include/Rtypeinfo.h:32:20: error: typeinfo: No such file or directory
In file included from /Data/Analysis/Root//include/TObject.h:40,
from /Data/Analysis/Root//include/TNamed.h:26,
from /Data/Analysis/Root//include/TDirectory.h:25,
from /Data/Analysis/Root//include/TROOT.h:29,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.h:30,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Root//include/Riosfwd.h:33:24: error: iosfwd: No such file or directory
In file included from /Data/Analysis/Root//include/TObject.h:208,
from /Data/Analysis/Root//include/TNamed.h:26,
from /Data/Analysis/Root//include/TDirectory.h:25,
from /Data/Analysis/Root//include/TROOT.h:29,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.h:30,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Root//include/TBuffer.h:31:18: error: vector: No such file or directory
In file included from /Data/Analysis/Root//include/TCollection.h:34,
from /Data/Analysis/Root//include/TSeqCollection.h:26,
from /Data/Analysis/Root//include/TList.h:26,
from /Data/Analysis/Root//include/TNamed.h:29,
from /Data/Analysis/Root//include/TDirectory.h:25,
from /Data/Analysis/Root//include/TROOT.h:29,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.h:30,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Root//include/TString.h:47:18: error: string: No such file or directory
In file included from /Data/Analysis/Root//include/TQClass.h:32,
from /Data/Analysis/Root//include/TQObject.h:212,
from /Data/Analysis/Root//include/TVirtualPad.h:42,
from /Data/Analysis/Root//include/TPad.h:26,
from /Data/Analysis/Root//include/TCanvas.h:25,
from /Data/Analysis/Polarization/./plot8.c:1,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.h:32,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Root//include/TClass.h:42:15: error: map: No such file or directory
In file included from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:16:
/Data/Analysis/Polarization/./tmp_16_7T47aR.h:33:21: error: algorithm: No such file or directory
In file included from /Data/Analysis/Root//include/RtypesImp.h:19,
from /Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:28:
/Data/Analysis/Root//include/Api.h:21:19: error: ostream: No such file or directory
/Data/Analysis/Polarization/./tmp_16_7T47aR.cxx:59:15: error: new: No such file or directory
/Data/Analysis/Root//include/Riosfwd.h:35: error: ‘std::istream’ has not been declared
/Data/Analysis/Root//include/Riosfwd.h:36: error: ‘std::ostream’ has not been declared
/Data/Analysis/Root//include/Riosfwd.h:37: error: ‘std::fstream’ has not been declared
/Data/Analysis/Root//include/Riosfwd.h:38: error: ‘std::ifstream’ has not been declared
/Data/Analysis/Root//include/Riosfwd.h:39: error: ‘std::ofstream’ has not been declared
/Data/Analysis/Root//include/TObject.h:147: error: ‘ostream’ has not been declared
/Data/Analysis/Root//include/TBuffer.h:48: error: ISO C++ forbids declaration of ‘vector’ with no type
/Data/Analysis/Root//include/TBuffer.h:48: error: typedef name may not be a nested-name-specifier
/Data/Analysis/Root//include/TBuffer.h:48: error: expected ‘;’ before ‘<’ token
/Data/Analysis/Root//include/TBuffer.h:63: error: ‘InfoList_t’ does not name a type
/Data/Analysis/Root//include/TBuffer.h: In constructor ‘TBuffer::TBuffer()’:
/Data/Analysis/Root//include/TBuffer.h:72: error: class ‘TBuffer’ does not have any field named ‘fInfos’
/Data/Analysis/Root//include/TBuffer.h: In function ‘TBuffer& operator>>(TBuffer&, Tmpl*&)’:
/Data/Analysis/Root//include/TBuffer.h:332: error: must #include before using typeid
/Data/Analysis/Root//include/TBuffer.h:332: error: no matching function for call to ‘TBuffer::GetClass()’
/Data/Analysis/Root//include/TBuffer.h:306: note: candidates are: static TClass* TBuffer::GetClass(const std::type_info&)
/Data/Analysis/Root//include/TBuffer.h:307: note: static TClass* TBuffer::GetClass(const char*)
/Data/Analysis/Root//include/TBuffer.h: In function ‘TBuffer& operator<<(TBuffer&, const Tmpl*)’:
/Data/Analysis/Root//include/TBuffer.h:339: error: must #include before using typeid
/Data/Analysis/Root//include/TBuffer.h:339: error: no matching function for call to ‘TBuffer::GetClass()’
/Data/Analysis/Root//include/TBuffer.h:306: note: candidates are: static TClass* TBuffer::GetClass(const std::type_info&)
/Data/Analysis/Root//include/TBuffer.h:307: note: static TClass* TBuffer::GetClass(const char*)
/Data/Analysis/Root//include/TString.h: At global scope:
/Data/Analysis/Root//include/TString.h:231: error: expected unqualified-id before ‘&’ token
/Data/Analysis/Root//include/TString.h:231: error: expected ‘,’ or ‘…’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:231: error: ISO C++ forbids declaration of ‘parameter’ with no type
/Data/Analysis/Root//include/TString.h:231: error: ‘TString::TString(int)’ and ‘TString::TString(Ssiz_t)’ cannot be overloaded
/Data/Analysis/Root//include/TString.h:259: error: expected unqualified-id before ‘&’ token
/Data/Analysis/Root//include/TString.h:259: error: expected ‘,’ or ‘…’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:259: error: ISO C++ forbids declaration of ‘parameter’ with no type
/Data/Analysis/Root//include/TString.h:356: error: ISO C++ forbids declaration of ‘istream’ with no type
/Data/Analysis/Root//include/TString.h:356: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:357: error: ISO C++ forbids declaration of ‘istream’ with no type
/Data/Analysis/Root//include/TString.h:357: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:359: error: ISO C++ forbids declaration of ‘istream’ with no type
/Data/Analysis/Root//include/TString.h:359: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:360: error: ISO C++ forbids declaration of ‘istream’ with no type
/Data/Analysis/Root//include/TString.h:360: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:361: error: ISO C++ forbids declaration of ‘istream’ with no type
/Data/Analysis/Root//include/TString.h:361: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/TString.h:395: error: expected constructor, destructor, or type conversion before ‘&’ token
/Data/Analysis/Root//include/TString.h:396: error: expected constructor, destructor, or type conversion before ‘&’ token
/Data/Analysis/Root//include/TDirectory.h: In member function ‘void TDirectory::GetObject(const char*, T*&)’:
/Data/Analysis/Root//include/TDirectory.h:135: error: must #include before using typeid
/Data/Analysis/Root//include/TDirectory.h:135: error: no matching function for call to ‘TBuffer::GetClass()’
/Data/Analysis/Root//include/TBuffer.h:306: note: candidates are: static TClass* TBuffer::GetClass(const std::type_info&)
/Data/Analysis/Root//include/TBuffer.h:307: note: static TClass* TBuffer::GetClass(const char*)
/Data/Analysis/Root//include/TDirectory.h: In member function ‘Int_t TDirectory::WriteObject(const T*, const char*, const Option_t*)’:
/Data/Analysis/Root//include/TDirectory.h:184: error: must #include before using typeid
/Data/Analysis/Root//include/TDirectory.h:184: error: no matching function for call to ‘TBuffer::GetClass()’
/Data/Analysis/Root//include/TBuffer.h:306: note: candidates are: static TClass* TBuffer::GetClass(const std::type_info&)
/Data/Analysis/Root//include/TBuffer.h:307: note: static TClass* TBuffer::GetClass(const char*)
/Data/Analysis/Root//include/TAttLine.h: At global scope:
/Data/Analysis/Root//include/TAttLine.h:48: error: ‘ostream’ has not been declared
/Data/Analysis/Root//include/TAttFill.h:45: error: ‘ostream’ has not been declared
/Data/Analysis/Root//include/TAttText.h:53: error: ‘ostream’ has not been declared
/Data/Analysis/Root//include/TAttMarker.h:49: error: ‘ostream’ has not been declared
/Data/Analysis/Root//include/TClass.h:147: error: ISO C++ forbids declaration of ‘multimap’ with no type
/Data/Analysis/Root//include/TClass.h:147: error: invalid use of ‘::’
/Data/Analysis/Root//include/TClass.h:147: error: expected ‘;’ before ‘<’ token
/Data/Analysis/Root//include/TClass.h:278: error: ISO C++ forbids declaration of ‘multimap’ with no type
/Data/Analysis/Root//include/TClass.h:278: error: invalid use of ‘::’
/Data/Analysis/Root//include/TClass.h:278: error: expected ‘;’ before ‘<’ token
/Data/Analysis/Root//include/TClass.h:282: error: expected ;' before 'static' /Data/Analysis/Root//include/TClass.h: In function 'TClass* ROOT::GetClass(T*)': /Data/Analysis/Root//include/TClass.h:315: error: must #include <typeinfo> before using typeid /Data/Analysis/Root//include/TClass.h: In function 'TClass* ROOT::GetClass(const T*)': /Data/Analysis/Root//include/TClass.h:316: error: must #include <typeinfo> before using typeid /Data/Analysis/Root//include/TPad.h: At global scope: /Data/Analysis/Root//include/TPad.h:129: error: 'ostream' has not been declared /Data/Analysis/Root//include/TCanvas.h:204: error: 'ostream' has not been declared /Data/Analysis/Polarization/./plot8.c: In function 'float plot()': /Data/Analysis/Polarization/./plot8.c:6: warning: unused variable 'i' /Data/Analysis/Root//include/Api.h: At global scope: /Data/Analysis/Root//include/Api.h:23: error: 'std::string' has not been declared /Data/Analysis/Root//include/Api.h:24: error: 'std::ostream' has not been declared /Data/Analysis/Root//include/Api.h:203: error: expected )’ before ‘&’ token
/Data/Analysis/Root//include/Api.h:216: error: ‘std::string’ has not been declared
/Data/Analysis/Root//include/Api.h:217: error: ‘std::string’ has not been declared
/Data/Analysis/Root//include/Api.h:218: error: ‘std::string’ has not been declared
/Data/Analysis/Root//include/Api.h:219: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/Api.h:220: error: ‘std::string’ has not been declared
/Data/Analysis/Root//include/Api.h:227: error: ‘std::string’ has not been declared
/Data/Analysis/Root//include/Api.h:229: error: using-declaration for non-member at class scope
/Data/Analysis/Root//include/Api.h:229: error: expected ‘;’ before ‘&’ token
/Data/Analysis/Root//include/Api.h:230: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/TClassEdit.h:49: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/TClassEdit.h:56: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/TClassEdit.h:57: error: ‘std::vector’ has not been declared
/Data/Analysis/Root//include/TClassEdit.h:57: error: expected ‘,’ or ‘…’ before ‘<’ token
/Data/Analysis/Root//include/TClassEdit.h:60: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/TClassEdit.h:61: error: ‘string’ in namespace ‘std’ does not name a type
/Data/Analysis/Root//include/TCollectionProxy.h: In static member function ‘static TVirtualCollectionProxy* TCollectionProxy::GenProxy(const T&)’:
/Data/Analysis/Root//include/TCollectionProxy.h:350: error: must #include before using typeid
/Data/Analysis/Root//include/TCollectionProxy.h: In static member function ‘static TClassStreamer* TCollectionProxy::GenClassStreamer(const T&)’:
/Data/Analysis/Root//include/TCollectionProxy.h:403: error: must #include before using typeid
/Data/Analysis/Root//include/TCollectionProxy.h: In static member function ‘static TMemberStreamer* TCollectionProxy::GenMemberStreamer(const T&)’:
/Data/Analysis/Root//include/TCollectionProxy.h:439: error: must #include before using typeid
/Data/Analysis/Root//include/TCollectionProxy.h: At global scope:
/Data/Analysis/Root//include/TCollectionProxy.h:547: error: ‘vector’ is not a member of ‘std’
/Data/Analysis/Root//include/TCollectionProxy.h:547: error: ‘vector’ is not a member of ‘std’
/Data/Analysis/Root//include/TCollectionProxy.h:547: error: missing ‘>’ to terminate the template argument list
/Data/Analysis/Root//include/TCollectionProxy.h:547: error: template argument 1 is invalid
/Data/Analysis/Root//include/TCollectionProxy.h:547: error: expected initializer before ‘bool’
/Data/Analysis/Polarization/./plot8.c: In function ‘float plot()’:
/Data/Analysis/Polarization/./plot8.c:7: warning: control reaches end of non-void function
i686-apple-darwin9-g+±4.0.1: /Data/Analysis/Polarization/./tmp_16_7T47aR.o: No such file or directory
i686-apple-darwin9-g+±4.0.1: no input files
Error in : Compilation failed!

relevant part of .profile file:
CPATH=/Developer/SDKs/MacOSX10.5.sdk/usr/include/
export CPATH

LIBRARY_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/lib/
export LIBRARY_PATH

export ROOTSYS=/Data/Analysis/Root/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
export MANPATH=$MANPATH:$ROOTSYS/man

Sorry, I meant to send this to the support list and not to the announce list.
–HK

Did you recompile ROOT on Leopard? If not do that first.

Cheers, Fons.