I have been using root 5.18/00 on Mac Os X 10.4.11 without troubles until, today, I installed some (apparently) independent programs, namely some Perl modules using CPAN.
Then I restarted my work on root and none of the macros that were compiling – and I know I did not modify since – compiled anymore. I looked for different error messages and the most characteristic one is:
[quote]
Info in TUnixSystem::ACLiC: creating shared library /Users/gibelin/Experiments/e473s/./create_time_cal_hist_C.so
/usr/include/c++/4.0.0/memory: In function ‘std::pair<_Tp*, ptrdiff_t> std::__get_temporary_buffer(ptrdiff_t, _Tp*)’:
/usr/include/c++/4.0.0/memory:83: error: ‘nothrow’ was not declared in this scope
:0: error: too many arguments to function ‘void* operator new(long unsigned int)’
/usr/include/c++/4.0.0/memory:83: error: at this point in file
/usr/include/c++/4.0.0/memory: In function ‘void std::return_temporary_buffer(_Tp*)’:
/usr/include/c++/4.0.0/memory:123: error: ‘nothrow’ was not declared in this scope
i686-apple-darwin8-g+±4.0.1: /Users/gibelin/Experiments/e473s/./tmp_0_auDPBH.o: No such file or directory
i686-apple-darwin8-g+±4.0.1: no input files
Error in : Compilation failed![/quote]
I thought that somehow root was not linking to the good libraries anymore or something like this. I hence decided to recompile ROOT the way I always did. No problem, root itself could be created and installed. But the error remained. I reinstalled XCode (!). Recompiled ROOT. Same behavior.
Thank you for the quick answer.
You are certainly right, but then I don’t understand why root could compile without problem since I would I thought the header used were the same.
Although my next question is not directly root related but do you have any idea how I can reverse the process ?
[quote]You are certainly right, but then I don’t understand why root could compile without problem since I would I thought the header used were the same. [/quote]Yes but ROOT may not be using all the headers
One simple test you could do is that try to compile create_time_cal_hist.C by hand (i.e. without ACliC) to see if we can narrow down the problem.
Cheers,
Philippe.
PS. I am not familiar enough with Mac to advise you on the installation procedure
Sorry but I don’t quite understand what you mean “by hand” using ACliC.
Maybe because I forgot to tell you that I am compiling create_time_cal_hist.C using in ROOT:
Humm I did not write what I meant .
I meant by hand without ACLiC or in other word directly, simply with g++: g++ -c `root-config --cflags` create_time_cal_hist.C
Ok. try to see what ACLiC really does:root [] gDebug = 7;
root [] .L create_time_cal_hist.C++
you should end up (after wadding through the LoadLibraryMap message) with a rootcint and g++ command line. What are they?
this fails with essentially the error messages of my fist post
[quote]
/usr/include/c++/4.0.0/memory: In function ‘std::pair<_Tp*, ptrdiff_t> std::__get_temporary_buffer(ptrdiff_t, _Tp*)’:
/usr/include/c++/4.0.0/memory:83: error: ‘nothrow’ was not declared in this scope
:0: error: too many arguments to function ‘void* operator new(long unsigned int)’
/usr/include/c++/4.0.0/memory:83: error: at this point in file
/usr/include/c++/4.0.0/memory: In function ‘void std::return_temporary_buffer(_Tp*)’:
/usr/include/c++/4.0.0/memory:123: error: ‘nothrow’ was not declared in this scope
[/quote][/quote]
I assume you mean thatg++ -c -O3 -funroll-loops -floop-optimize2 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -DR__HAVE_CONFIG -D_REENTRANT -I/usr/local/include/root -I/usr/local/include/root create_time_cal_hist.Ccompiles fine but
Listing the whole directory will be too long since it is my analysis working directory. I supposed that what the compiler is looking for is at least headers.
There is also in this directory other directories that contain headers from other codes.
So I did the following tests:
move create_time_cal_hist.C to another folder and replace -I/Users/gibelin/Experiments/e473s by -I. and this compiled.
I copied all the files and the sub-directory to independant directory and removed one by one the subdirectories, while trying to compile with all the flags (including the -I. instead of I/Users/gibelin/Experiments/e473s).
I first comfirmed that the -I. flags used in the new directory made the compilation failed. Removing the subdirectory did not changed anything. Then I removed type by type every single file. I finally found a 0kb file, named “new” when removed solved the problem.
Thank you Philippe for the great help.
But any idea why this file is the reason of all this noise ?
[quote]I finally I found a 0kb file, named “new” when removed solved the problem … But any idea why this file will be the reason of all this noise ? [/quote]Absolutely . This file is used instead of the compiler’s header file named ‘new’ (which contains a lot of essential declarations!.
Cheers,
Philippe.
PS. And this behavior is somewhat compiler version dependent.