Problems compiling on os x 10.9

[quote=“unelg”]root [2] TString first_parameter="/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.“
root [3] gSystem->Which(first_parameter, “arrow_down.xpm”)
(char* 0x7f98540c3030)”/Users/ngu/jroot/abc/icons/arrow_down.xpm"[/quote]

This is really weird. Now I have to ask something else:

  1. Can you, please, check access permissions on directories/files (xmps)?
  2. In gui/gui/src/TGPicture.cxx, line ~106, after the code fragment:

TGPicture *pic = (TGPicture *)fPicList->FindObject(pname); if (pic && !pic->IsScaled()) { if (pic->fPic == kNone) return 0; pic->AddReference(); return pic; }

and before

Can you, please, add something like:

if (pname == "arrow_down.xpm") std::cout<<"Path: "<<fPath.Data()<<std::endl;

And now after

please, add:

if (pname == "arrow_down.xpm") std::cout<<"picnam: "<<picnam<<std::endl;

The setup should be the same as before (with thisroot.sh etc.) and you’ll have to create a TBrowser

I’m afraid this is not what you need to compile (this is not the branch I’ve mentioned in this topic).

Do:
git clone root.cern.ch/git/root.git any-name-you-want
cd any-name-you-want
git checkout -t origin/v5-34-00-patches
./configure
make[/quote]

I followed the instructions and it compiled, seems to work. Why do I not run make install?

I’m afraid this is not what you need to compile (this is not the branch I’ve mentioned in this topic).

Do:
git clone root.cern.ch/git/root.git any-name-you-want
cd any-name-you-want
git checkout -t origin/v5-34-00-patches
./configure
make[/quote]

I followed the instructions and it compiled, seems to work. Why do I not run make install?[/quote]

Because you do not need it.
If I do make install I have “Everything already installed”. If you use some special paths in your configure, may be, you can use make install if you want.

Thanks for the help. I don’t really have a reason to run Mavericks in the first place. Is there any way to differentiate between the developer Mavericks and the official release?

I think no (if you have a Gold Master) - on my mac it did not update since it’s already Mavericks. Build number is different though.

I did the additions you asked:

root [2] system ("ls -la /Users/ngu/jroot/abc/icons/arrow_down.xpm")
-rw-r--r--  1 ngu  staff  185 Oct 24 05:48 /Users/ngu/jroot/abc/icons/arrow_down.xpm
(const int)0
root [3] TBrowser aa
Icon Path:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found

[quote=“unelg”]I did the additions you asked:

root [2] system ("ls -la /Users/ngu/jroot/abc/icons/arrow_down.xpm")
-rw-r--r--  1 ngu  staff  185 Oct 24 05:48 /Users/ngu/jroot/abc/icons/arrow_down.xpm
(const int)0
root [3] TBrowser aa
Icon Path:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found[/quote]

Hmm, ok, I'm sorry I have to ask you to do these things, but I think this long-standing problem with arrow_down.xpm and similar xpms must be resolved ONCE AND FOREVER, it's not good/right that nobody cares :slight_smile:
So, can you, please, have a look - TGPicture.cxx, the same function, we know now, that the file found, so,
the remaining part is:

 [code]TImage *img = TImage::Open(picnam);
     if (!img) {
       pic = new TGPicture(pname);
       pic->fAttributes.fColormap  = fClient->GetDefaultColormap();
       pic->fAttributes.fCloseness = 40000; // Allow for "similar" colors
       pic->fAttributes.fMask      = kPASize | kPAColormap | kPACloseness;
       fPicList->Add(pic);
       delete [] picnam;
       return 0;
    }
 
    pic = new TGPicture(pname, img->GetPixmap(), img->GetMask());
   delete [] picnam;
    delete img;
   fPicList->Add(pic);
    return pic;[/code]

Can you, please, add print statements as before to understand, where does this method return 0?
So, is it TImage::Open(picname) who returns this disgusting null? :slight_smile:

pic: rootdb_s.xpm
picnam3a: /Users/ngu/jroot/abc/icons/closetab.png
picnam3b: /Users/ngu/jroot/abc/icons/closetab.png
picnam5a: /Users/ngu/jroot/abc/icons/closetab.png
picnam5b: /Users/ngu/jroot/abc/icons/closetab.png
pic: closetab.png
picnam3a: /Users/ngu/jroot/abc/icons/closetab_d.png
picnam3b: /Users/ngu/jroot/abc/icons/closetab_d.png
picnam5a: /Users/ngu/jroot/abc/icons/closetab_d.png
picnam5b: /Users/ngu/jroot/abc/icons/closetab_d.png
pic: closetab_d.png
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
pic: arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
pic: arrow_up.xpm
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found

   if (pname == "arrow_down.xpm")
      std::cout<<"picnam: "<<picnam<<std::endl;


   if (!picnam) {
      std::cout<<"picnam1: "<<picnam<<std::endl;
      pic = new TGPicture(pname);
      pic->fAttributes.fColormap  = fClient->GetDefaultColormap();
      pic->fAttributes.fCloseness = 40000; // Allow for "similar" colors
      pic->fAttributes.fMask      = kPASize | kPAColormap | kPACloseness;
      fPicList->Add(pic);
      std::cout<<"picnam2: "<<picnam<<std::endl;
      return 0;
   }

      std::cout<<"picnam3a: "<<picnam<<std::endl;
   TImage *img = TImage::Open(picnam);
      std::cout<<"picnam3b: "<<picnam<<std::endl;
   if (!img) {
      std::cout<<"picnam4a: "<<picnam<<std::endl;
      pic = new TGPicture(pname);
      pic->fAttributes.fColormap  = fClient->GetDefaultColormap();
      pic->fAttributes.fCloseness = 40000; // Allow for "similar" colors
      pic->fAttributes.fMask      = kPASize | kPAColormap | kPACloseness;
      fPicList->Add(pic);
      std::cout<<"picnam4b: "<<picnam<<std::endl;
      delete [] picnam;
      return 0;
   }
      std::cout<<"picnam5a: "<<picnam<<std::endl;

   pic = new TGPicture(pname, img->GetPixmap(), img->GetMask());
      std::cout<<"picnam5b: "<<picnam<<std::endl;
   delete [] picnam;
   delete img;
      std::cout<<"pic: "<<pname<<std::endl;
   fPicList->Add(pic);
   return pic;

So, actually, it creates an image an returns non-null pointer?
Weird, this seems to be simply impossible, since the code that produces the error message looks like this (gui/gui/src/TGScrollBar.cxx):

[code]fHeadPic = fClient->GetPicture(“arrow_up.xpm”);//your 5a/5b output is about this
fTailPic = fClient->GetPicture(“arrow_down.xpm”);//another 5a/5b

if (!fHeadPic || !fTailPic) {
Error(“TGVScrollBar”, “arrow_*.xpm not found”);
return;
}[/code]

While ROOT uses overloaded operator new/delete for TObject derived classes, I guess it never returns 0.

Interesting !!!
I print the pointers if they are null, and it turns out the second one is null.
0x7f9f7ba84c80 0x0
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found

I tried by changing the place or even loading the same xpm: always one pointer is null.
Looks like an initialization problem?

[quote=“unelg”]Interesting !!!
I print the pointers if they are null, and it turns out the second one is null.
0x7f9f7ba84c80 0x0
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found

I tried by changing the place or even loading the same xpm: always one pointer is null.
Looks like an initialization problem?[/quote]

Hmmmm, can you, please, print a pointer value immediately after this last ‘new TGPicture’? (you have print5a/print5b but unfortunately you are printing the name and not the pointer, but it’s good to print both the name and the resulting pointer).

Also, even if it’s not 0 it does not mean that later (when we call GetPicture again) picture pool does not do something wrong returning 0 :slight_smile:

There is also:

if (pic && !pic->IsScaled()) { if (pic->fPic == kNone) return 0; pic->AddReference(); return pic; }

Can you, please, add a print here also:

if (pic && !pic->IsScaled()) { if (pname == "arrow_down.xpm")std::cout<<"not scaled???\n"; if (pic->fPic == kNone) return 0; pic->AddReference(); return pic; }

If it’s the “arrow down” who’s null later in TGVSrcollBar.

Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm 0x7ff0a9af2c80
pic: arrow_down.xpm
getting xpms <~~~~~~~~~~~~ LOOK AT THIS ONE. WHY AFTER after actually getting the XPM ? (code below)
got down xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7ff0a9af3f60
pic: arrow_up.xpm
got up xpm
0x7ff0a9af3f60 0x0
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found

std::cout <<"getting xpms"<<std::endl;
   fTailPic = fClient->GetPicture("arrow_down.xpm");
std::cout <<"got down xpm"<<std::endl;
   fHeadPic = fClient->GetPicture("arrow_up.xpm");
std::cout <<"got up xpm"<<std::endl;

Hi, have a look at my edited message, please. Can you add one more print? :slight_smile:

Well, it’s probably not only TGVScrollBar who’s using picture pool and asks for “arrow_*.xpm”.

did it. Who is asking the down.xpm for the first time? and WHY?

Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm 0x7fb75a2c40d0
pic: arrow_down.xpm
getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7fb75a2c5380
pic: arrow_up.xpm
got up xpm
not scaled???
got down xpm
0x7fb75a2c5380  0x0

Ok, I’m sorry, from the beginning I was quite sure it’s too much to ask you to compile ROOT in the debug mode and run root in a debugger with breakpoints, but now I see it would be much better solution instead of all these prints :slight_smile:

[quote=“unelg”]did it. Who is asking the down.xpm for the first time? and WHY?
[/quote]

Well, it’s not really important, probably, somebody else - take a list-box for example or any control, which has an “expand” functionality - they all have a button with a triangle, which is exactly “arrow_down.xpm”.
Ok, now, let me check the code to see what is this ‘scaled’ and when it’s ‘true’/‘false’ and why.
I’ll probably ask something else a bit later :slight_smile:

Well, at one point, I’ll go home for a while…

ok, sure :slight_smile:

In my case, this block with ‘not scaled’ is also called (any many times BTW), but it looks like this statement:
if (pic->fPic == kNone)
…return

is never executed.
Can you replace it with:

if (pic->fPic == kNone) { if (pname == "arrow_down.xpm") std::cout<<"????\n"; return 0; }

Otherwise, I do not see where the 0 comes from.

getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7fe2bbb3c580
pic: arrow_up.xpm
got up xpm
not scaled???
???
got down xpm
0x7fe2bbb3c580 0x0

[quote=“unelg”]getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7fe2bbb3c580
pic: arrow_up.xpm
got up xpm
not scaled???
???
got down xpm
0x7fe2bbb3c580 0x0[/quote]

Ok, I’ll investigate further and let you know tomorrow/or this weekend :slight_smile: I have a feeling, we’ll end with libxpm/libasimage-related problems :slight_smile:)
My guess (the last thing you can check today) even though pointer for arrow_up.xpm is NOT NULL, pic->fPic is kNone though. May be, you can check this? When printing 5b, also, print (after a pointer) pic->fPic?

BTW it can be interesting to see your ‘configure’ log :slight_smile: And also to know if you have MacPorts installed and some other libraries like libxpm/libafterimage (I’m only guessing, not sure if libafterimage is needed here)

picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm 0x7fe84b34e4f0 0
pic: arrow_down.xpm
getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7fe84b34f7d0 0

 std::cout<<"picnam5b: "<<picnam<< " "<<pic<< "  "<< pic->fPic <<std::endl;