Hello MacRooters,
I run ROOT CVS version (4.03.05) on MacOs X.3.9. I have sent last week
a message
(http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk05/0850.html)
concerning TMapFile on MacOsX but I had no answers. Except for my bad
use of root-cint (thanks to Fons for his quick answer ;-) ), I still not
can use TMapFile on MacOsX, althought I run rootn.exe. I have tried
several ROOT versions, and I even loaded and compiled the CVS version.
The result is always the same: under rootn.exe, when I try to generate a
TMapFile, I obtain the following error message:
rootn.exe
FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for macosx with thread support.
CINT/ROOT C/C++ Interpreter version 5.15.169, Mar 14 2005 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] TMapFile *mf=TMapFile::Create("tutu.map","recreate",10000) Error in <TMapFile::TMapFile>: no memory mapped file capability available Use rootn.exe or link application against "-lNew" root [1]
I tried to track the problem. It appears that the fgHasCustomNewDelete field in TStorage is not set even if rootn.exe is executed. Since this flag is tested in the TMapFile::MapToAddress() method, and the result is kFALSE, the TMapFile::Create method returns the above error message. I tried to track where this flag was set to kTRUE via a TStorage::SetCustomNewDelete() and I found it was called in the G__Base2.cxx and in NexDelete.cxx files. Unfortunately, my understanding of C++ does not allow me to go further. I also tried to set it before calling the TMapFile::Create method, but in this case ROOT crashes with the follwing error message when I update the TMapFile:
rootn.exe
FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for macosx with thread support.
CINT/ROOT C/C++ Interpreter version 5.15.169, Mar 14 2005 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }.
root [0] TStorage::SetCustomNewDelete() root [1] TMapFile *mf=TMapFile::Create("tutu.map","recreate",10000) root [2] mf->Print() Memory mapped file: tutu.map Title: Option: CREATE Mapped Memory region: 0x3e000 - 0x41000 (0.01 MB) Current breakval: 0x3e10c root [3] TH1F *h1=new TH1F("h1","test",100,0,100) root [4] mf->Update()Fatal in <CustomReAlloc2>: space was not allocated via custom new aborting
Is the fact that this flag is not set correctly for rootn.exe due to MacOsX limitations? Did I make something wrong or missed something when I have compiled my ROOT versions on MacOsX (I don't think so because this problem is present with the compiled version of ROOT 4.02.00 for MacOsX provided by Fons)? Do I have to set a special environement variable on MacOsX to allow the memory sharing? These errors can be easily reproduced by running the tutorial hprod.C. I have also to mention that all is running correctly on Scientific Linux. That is why I think it might be a configuration problem on my Mac or a general problem on MacOsX.3.9. Has somebody tested hprod.C on his Mac? Did it run correctly? I hope that the indications I give will be helpfull for sombedy to help me ;-).
Thanks for your answers.
Friendly
-- Daniel CUSSOL LPC Caen IN2P3/ENSICAEN/Universite de Caen Boulevard du Marechal Juin 14050 CAEN CEDEX e-mail : cussol_at_in2p3.fr Tel : +33-(0)2-31-45-29-73 FAX : +33-(0)2-31-45-25-49Received on Mon Apr 25 2005 - 10:50:28 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET