ACLiC: Compilation problems On Mac (Darwin 8)

Dear rooters,

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.

Any help highly welcome.

Best
Julien

Hi,

I wonder if your download did not partially update the compile headers (i.e. I notice /usr/include/c++/4.0.0 versus i686-apple-darwin8-g+±4.0.1).

Cheers,
Philippe

Dear Philippe,

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 ?

Best
julien

[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 :slight_smile:

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 :frowning:

Dear Philippe,

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:

.L create_time_cal_hist.C++

Hi,

Humm I did not write what I meant :slight_smile:.
I meant by hand without ACLiC or in other word directly, simply with g++: g++ -c `root-config --cflags` create_time_cal_hist.C

Cheers,
Philippe.

Ok, this is working fine.

Which means that ROOT (or ACliC) is looking for something else… here you know better than me.

Hi,

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?

Cheers
Philippe.

rootcint --lib-list-prefix=/Users/gibelin/Experiments/e473s/./tmp.3.5KQINmmap -f /Users/gibelin/Experiments/e473s/./tmp_1_2MIFzw.cxx -c -p -I/usr/local/include/root -I/usr/local/include/root /Users/gibelin/Experiments/e473s/./create_time_cal_hist.C /Users/gibelin/Experiments/e473s/./tmp.2.9exxNflinkdef.h cd /Users/gibelin/Experiments/e473s/. ; g++ -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 -I/Users/gibelin/Experiments/e473s/. -I/Users/gibelin/Experiments/e473s /Users/gibelin/Experiments/e473s/./tmp_1_2MIFzw.cxx ; MACOSX_DEPLOYMENT_TARGET=10.4 g++ /Users/gibelin/Experiments/e473s/./tmp_1_2MIFzw.o -bundle -undefined dynamic_lookup -O2 -bind_at_load -o /Users/gibelin/Experiments/e473s/./create_time_cal_hist_C.so cd /Users/gibelin/Experiments/e473s/. ; g++ -c -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -DR__HAVE_CONFIG -D_REENTRANT -I/usr/local/include/root -I/usr/local/include/root -I/Users/gibelin/Experiments/e473s/. -I/Users/gibelin/Experiments/e473s /Users/gibelin/Experiments/e473s/./tmp_1_2MIFzw.cxx; g++ /Users/gibelin/Experiments/e473s/./tmp_1_2MIFzw.o -O2 -bind_at_load -o /Users/gibelin/Experiments/e473s/./tmp.5.ngLfkp /usr/local/lib/root/libRIO.dylib /usr/local/lib/root/libMatrix.dylib /usr/local/lib/root/libHist.dylib /usr/local/lib/root/libGraf.dylib /usr/local/lib/root/libGpad.dylib /usr/local/lib/root/libGX11.dylib /usr/local/lib/root/libGui.dylib /usr/local/lib/root/libGX11TTF.dylib /usr/local/lib/root/libSpectrum.dylib /usr/local/lib/root/libNet.dylib /usr/local/lib/root/libTree.dylib /usr/local/lib/root/libGraf3d.dylib /usr/local/lib/root/libTreePlayer.dylib /usr/local/lib/root/libCore.dylib /usr/local/lib/root/libCint.dylib /usr/local/lib/root/libRint.dylib /usr/lib/libstdc++.6.dylib /usr/lib/libgcc_s.1.dylib /usr/lib/system/libmathCommon.A.dylib -lm -lpthread -ldl [/code]

What doesg++ -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 -I/Users/gibelin/Experiments/e473s/. -I/Users/gibelin/Experiments/e473s create_time_cal_hist.Cdo? (i.e. succeed of fail)?

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]

Waht is the output of root-config --cflags(i.e. I am trying to find the difference between the earlier working ocmpilation and the now failing one.

Cheers,
Philippe.

Ok. I see were you are going. So to answer your question:

root-config --cflags

gives

Now I compared this with what we had in the buggy case, and interestingly enough it seems that both the flags:

are responsible for the bug.
I think we found the flags but I don’t quite follow what is REALLY the problem !

Cheers
Julien[/quote]

Hi,

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

g++ -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 -I/Users/gibelin/Experiments/e473s/. -I/Users/gibelin/Experiments/e473s create_time_cal_hist.Cfails?

If this is the case, what is the content of /Users/gibelin/Experiments/e473s?

Cheers,
Philippe

Yes, indeed you are right.

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 ?

Cheers
Julien

[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 :slight_smile:. 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.