Installing ROOT on Mac OS X 10.6 with --enable-qt

Hello!
I am installing root (v5.26/00d) from source on Mac OS X 10.6.4 (64bit) and have problems related to the usage of port and mac-specific installation of Qt:

  1. output of the ./configure --help specifies that

    though the search is done for Qt/qglobal.h which makes a difference for the qt4-mac.

  2. it is supposed that the libraries are installed in one directory, which is not the case. The layout is:

/opt/local/libexec/qt4-mac/lib/LibName.framework/LibName -> Versions/4/LibName
or
/opt/local/libexec/qt4-mac/lib/LibName.framework/Versions/4/LibName

for all the libraries which are checked by configure: QtCore, QtGui, Qt3Support etc.
(e.g. /opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/QtCore)

  1. check for moc is done in $QTDIR or $QTDIR/bin where $QTDIR is a “location of qt.h” (Qt/qglobal.h in fact) which is /opt/local/libexec/qt4-mac/include in my case. Moc is located in /opt/local/libexec/qt4-mac/bin.

Another small issue with configure: curses-incdir variable requests a location of (n)curses.h (/opt/local/include/ncurses) and uses this value for include path, but ncurses looks for header files ncurses/xxx.h therefore there is a need to add /opt/local/include by hand.

Cint7 doesn’t compile but this problem has already been reported.

I managed to compile root with arguments:

and result:

but when launching it I receive the message:

Error: cannot open file "iostream" (tmpfile):2: *** Interpreter error recovered *** Error: cannot open file "_string" (tmpfile):2: *** Interpreter error recovered *** Error: cannot open file "RtypesCint.h" (tmpfile):2: *** Interpreter error recovered *** Error: cannot open file "DllImport.h" (tmpfile):2: *** Interpreter error recovered ***
Root crashes when I try to launch a TBrowser:

[code]Error in TGComboBox::TGComboBox: arrow_down.xpm not found
Error in TGVScrollBar::TGVScrollBar: arrow_*.xpm not found

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

Thread 1 (process 66181):
#0 0x00007fff80bc2c90 in wait4 ()
#1 0x00007fff80bd723e in system ()
#2 0x00000001001174ef in TUnixSystem::StackTrace ()
#3 0x0000000100115fda in TUnixSystem::DispatchSignals ()
#4
#5 0x00000001030eaa51 in TGVScrollBar::SetPosition ()
#6 0x00000001030b6ee2 in TGListBox::Layout ()
#7 0x00000001030b6aff in TGListBox::Resize ()
#8 0x0000000103078ec5 in TGComboBox::Init ()
#9 0x0000000103079896 in TGComboBox::TGComboBox ()
#10 0x0000000103085623 in TGFSComboBox::TGFSComboBox ()
#11 0x00000001031376fb in TRootBrowserLite::CreateBrowser ()
#12 0x0000000103138bfe in TRootBrowserLite::TRootBrowserLite ()
#13 0x0000000103138cc8 in TRootBrowserLite::NewBrowser ()
#14 0x00000001033edd2a in G__G__Gui3_252_0_56 ()
#15 0x000000010092e30a in Cint::G__CallFunc::Execute ()
#16 0x00000001000fedd1 in TCint::CallFunc_ExecInt ()
#17 0x00000001000242c0 in TMethodCall::Execute ()
#18 0x0000000100010005 in TPluginHandler::ExecPlugin ()
#19 0x000000010314c12d in TRootGuiFactory::CreateBrowserImp ()
#20 0x0000000100076080 in TBrowser::TBrowser ()
#21 0x00000001002159db in G__G__Base1_80_0_3 ()
#22 0x000000010092b946 in Cint::G__ExceptionWrapper ()
#23 0x00000001009e858c in G__execute_call ()
#24 0x00000001009e932b in G__call_cppfunc ()
#25 0x00000001009c3c8c in G__interpret_func ()
#26 0x00000001009ac8d1 in G__getfunction ()
#27 0x00000001009dff6b in G__new_operator ()
#28 0x0000000100a16846 in G__exec_statement ()
#29 0x000000010096c4ac in G__exec_tempfile_core ()
#30 0x000000010096c786 in G__exec_tempfile_fp ()
#31 0x0000000100a212f4 in G__process_cmd ()
#32 0x000000010010435e in TCint::ProcessLine ()
#33 0x000000010006e46b in TApplication::ProcessLine ()
#34 0x00000001012dad3f in TRint::HandleTermInput ()
#35 0x00000001012d92b7 in TTermInputHandler::Notify ()
#36 0x00000001012db23d in TTermInputHandler::ReadNotify ()
#37 0x00000001001156c2 in TUnixSystem::CheckDescriptors ()
#38 0x00000001001159f5 in TUnixSystem::DispatchOneEvent ()
#39 0x00000001000aa02d in TSystem::InnerLoop ()
#40 0x00000001000acc33 in TSystem::Run ()
#41 0x000000010006cad7 in TApplication::Run ()
#42 0x00000001012d9f1b in TRint::Run ()
#43 0x00000001000019a0 in main ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00000001030eaa51 in TGVScrollBar::SetPosition ()
#6 0x00000001030b6ee2 in TGListBox::Layout ()
#7 0x00000001030b6aff in TGListBox::Resize ()
#8 0x0000000103078ec5 in TGComboBox::Init ()
#9 0x0000000103079896 in TGComboBox::TGComboBox ()
#10 0x0000000103085623 in TGFSComboBox::TGFSComboBox ()
#11 0x00000001031376fb in TRootBrowserLite::CreateBrowser ()
#12 0x0000000103138bfe in TRootBrowserLite::TRootBrowserLite ()
#13 0x0000000103138cc8 in TRootBrowserLite::NewBrowser ()
===========================================================[/code]

The error doesn’t seem to be related to the Qt installation issues, but to the some of the recent updates. The older version of root (5.24/00) which worked before also crashes with calling anything X11-related (TBrowser, TCanvas).

Thank you very much in advance for any help!
Best regards,
Lesya.

Please, use the search.php facility of the forum to search for “MacOs QtRoot” keywords combination to find:


The bottom line of those discussions - one needs to follow root.bnl.gov/QtRoot/How2Install4Unix.html to get things working on MacOs.

Thank you very much for your reply!

But the problem at the end was not related to the Qt. Those were just suggestions to make configure more user-friendly.

Crash of the graphics appeared due to the wrong value of the Gui.IconPath variable in root/etc/system.rootrc : it was set to root/share/root/icons, whereas the actual directory which contained icons was root/icons.

The error messages at the launch of the root were also related to the faulty includes path.

At the end I just reinstalled root without specifying –prefix and –etcdir.

[quote=“Lesya”]…But the problem at the end was not related to the Qt. …[/quote] [-o<

Note that when using --prefix you have to do the “make install” step to copy the resources to the prefix location. However, on MacOS X, and in general, best not to use the --prefix option. On MacOS X we build location independent binaries, i.e. root.exe knows where to find dylibs, so there is no need to set DYLD_LIBRARY_PATH only PATH. So build without --prefix.

Cheers, Fons.

I agree that the topic name is confusing, but each time I reinstall root I need to go through the adjusting configure and sometimes Makefiles. So I hoped to get an advice and help on both issues.
Sorry for trouble.

Best regards,
Lesya.

[quote=“Lesya”]…each time I reinstall root I need to go through the adjusting configure and sometimes Makefiles. So I hoped to get an advice and help on both issues.[/quote]For Qt portion the advice is to install ROOT with no Qt “as is’. Then, install QtRoot plug-in follow root.bnl.gov/QtRoot/How2Install4 … complement . Even though it says “for X11”, I suspect this scenario works for MacOS as well. This way you do not need the ROOT “configure” to recognize your local Qt installation. You rely on Qt “qmake” utility and QtRoot Qmake project files. The former “knows” how Qt was installed. The later “knows” where your ROOT is located to compile the QtRoot plug-in against of the correct ROOT version. In addtion, you always can upgrade / update QtRoot to use the latest QtRoot version against of your stable ROOT installation.