Menu

Home

Valeri  Fine

Qt-based implementation of the ROOT package


Project Members:


Discussion

  • Valeri  Fine

    Valeri Fine - 2014-02-15

    Complement the existent ROOT installation with QtRoot plugin(x11 and MacOS only)

    On X11 an MacOS platforms one can complement any existent "--disable-qt" ROOT installation with the QtRoot package.

    First time installation

    First make sure you provide the correct ROOT and Qt environment. This means

    The env variables ROOTSYS and QTDIR are defined.
    $ROOTSYS/lib and $QTDIR/lib directory are present on your LD_LIBRARY_PATH
    $ROOTSYS/bin and $QTDIR/bin directory are present on your PATH
    

    Create some directory you want QtRoot to be installed in. For example "QtRoot".

    mkdir -p QtRoot/qtrootsys
    cd QtRoot
    setenv QTROOTSYSDIR `pwd`/qtrootsys # Use the dedicated directory 
                                         # to keep ROOT and QtRoot separately
    
     # setenv QTROOTSYSDIR $ROOTSYS      # This will merge ROOT and QtRoot 
                                         # libraries and header files
    
     svn co svn://svn.code.sf.net/p/qtroot/code/trunk qtRoot
     cd qtRoot
     qmake  # use "qmake -spec macx-g++" for MacOS 
     make
     make install
    

    If you opt for the dedicated directory for Qt Root then do not forget to include the new package into your environment

       setenv LD_LIBRARY_PATH $QTROOTSYSDIR/lib:$LD_LIBRARY_PATH
    

    For MacOS one needs:

       export DYLD_LIBRARY_PATH=${QTROOTSYSDIR}/lib:$DYLD_LIBRARY_PATH
    

    and customize either .roootrc or $ROOTSYS/etc/system.rootrc file to turn the Qt-layer "on"

    Upgrade the existent installation

    To upgrade the "complement" installation with the latest QtRoot version one has to

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    #!/bin/bash
    cd QtRoot
    setenv QTROOTSYSDIR `pwd`/qtrootsys # Use the dedicated directory 
                                         # to keep ROOT and QtRoot separately
    
    # setenv QTROOTSYSDIR $ROOTSYS      # This will merge ROOT and QtRoot 
                                         # libraries and header files
    svn checkout svn://svn.code.sf.net/p/qtroot/code/trunk  qtRoot
    cd qtRoot
    qmake # use "qmake -spec macx-g++" for MacOS 
    make
    make install
    

    Test

    To test your installation
    Set the package environment. To do that you need to find and select one of the 3 shell scripts created by the "Full Installation"

    source set_environment.csh
    source set_environment.sh  # this script is Ok for Cygwin environment as well)
    source set_environment.tcsh
    

    If you skipped the "Full Installation" you may want to set the environment "by hand" too. For example, set_environment.sh does

    1
    2
    3
    4
    5
    6
    7
    8
    #!/bin/bash
    export QTDIR=my/Qt-4.5.2
    export QMAKESPEC=
    export QT_CONF_OPTS= -fast -opensource -opengl
    export ROOTSYS=cernroot
    export QTROOTSYSDIR=cernroot
    export LD_LIBRARY_PATH=$ROOTSYS/lib:$QTDIR/lib:$LD_LIBRARY_PATH
    export PATH=$ROOTSYS/bin:$QTDIR/bin:$PATH
    

    For MacOS one needs

    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH
    

    as well.
    Select the qtExamples directory and build the test suite:

          cd qtExamples
          qmake
          make (or "nmake" for the Visual Studio environment)
    
     

    Last edit: Valeri Fine 2014-03-30
  • quantatanu

    quantatanu - 2017-01-15

    Hi Valeri,

    I replaced [b]step-1 and 2[/b]:
    [code]
    export QTROOTSYSDIR=pwd/qtrootsys
    export QTROOTSYSDIR=$ROOTSYS

    then I proceed to the step, qmake WHICH produces the following output:

    me@me/QtRoot/qtRoot$ qmake
    Project MESSAGE: excluding
    Project MESSAGE:  Installing <qt qtgui qtgl qtthread qtimage qtroot qt4ged> of QtRoot system
    Project MESSAGE:  To remove some packages from the build, start the qmake utility as follows:
    Project MESSAGE:  
    Project MESSAGE:  > qmake QTPACKAGES -= <list of unwanted packages>
    Project MESSAGE:  
    Project MESSAGE: type <make install> - to install qt qtgui qtgl qtthread qtimage qtroot qt4ged of QtRoot into </home/me/root> directory
    Project MESSAGE: 
    

    and then I ran make that failed badly ! The output is huge so I am attaching a txt file, but I am posting below the last few lines that states the exact error:

    src/TQtContextMenuImp.cxx:17:22: fatal error: QWebView: No such file or directory
    compilation terminated.
    Makefile:1437: recipe for target '.obj/TQtContextMenuImp.o' failed
    make[1]: *** [.obj/TQtContextMenuImp.o] Error 1
    make[1]: Leaving directory '/home/me/QtRoot/qtRoot/qtgui'
    Makefile:81: recipe for target 'sub-qtgui-make_default-ordered' failed
    make: *** [sub-qtgui-make_default-ordered] Error 2
    

    How can I make this work ?

    Additional info:
    1. I already had a Qt 5.7.1 (not root QT) installed on my Ubuntu 16.04 (64 bit) system.
    2. My ROOT version is 5.34/36.

    Thanks a lot

     

    Related

    Code: code


    Last edit: quantatanu 2017-01-15

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.