Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 114

Thread: Problem compiling QtiPlot 0.9.8 with xls import

  1. #1
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Post Compiling QtiPlot 0.9.8 with xls and odf import

    Hi everybody,
    I am having problems compiling the latest release of QtiPlot with .xls import.
    Starting from v0.9.8 the library ExcelFormat (http://www.codeproject.com/KB/office/ExcelFormat.aspx) is used instead of libxls.

    Since I solved (more or less cleanly) I want to give a quick outline how to compile QtiPlot 0.9.8:

    You need the following packages (if I remember correctly):
    Code:
    sudo apt-get install build-essential g++ libboost-all-dev libpng12-dev libqt4-dev libgsl0-dev python2.6-dev python-qt4-dev python-sip4-dev
    Additionally QtiPlot depends on muParser. The version in the Lucid Repos is too old so you have to compile the library yourself. Get the v1.32 source from http://muparser.sourceforge.net/. If you want ODF and XLS import you need the QuaZIP library from http://quazip.sourceforge.net/ (v0.2.3) and the ExcelFormat library from http://www.codeproject.com/KB/office/ExcelFormat.aspx or better from SVN http://shell.franken.de/svn/sky/exce...k/ExcelFormat/ (only BasicExcel.hpp/.cpp and ExcelFormat.cpp/.h are needed)

    Open a console, navigate to your usual compile directory and do the following:
    Code:
    tar xvjf /home/yourhome/Downloads/qtiplot-0.9.8.tar.bz2
    cd qtiplot-0.9.8/3rdparty
    
    tar xvzf /home/yourhome/Downloads/muparser_v132.tar.gz
    cd muparser_v132
    ./configure
    make
    sudo make install
    sudo ldconfig
    cd ..
    If you want ODF import:
    Code:
    tar xvzf quazip-0.2.3.tar.gz
    cd quazip.0.2.3/quazip
    qmake PREFIX=/usr
    make
    sudo make install
    cd ..
    You have some more work getting xls import going.

    If you are running an amd64 system you should give my attached edited version of ExcelFormat library a try because I got segfaults using the original version. Just extract the contents:
    Code:
    tar xvzf ExcelFormat.tar.gz
    If you have x86 system, put the 4 files from SVN (BasicExcel.cpp/.hpp and ExcelFormat.cpp/.h) together with the attached (very basic) Makefile in a directory (i.e. 3rdparty/ExcelFormat).
    Add these 3 lines to BasicExcel.hpp after line 110 (#include <string> //MF)
    Code:
    #ifdef __GNUC__
    #include <string.h>
    #endif
    amd64 and x86:
    Code:
    cd ExcelFormat
    make
    sudo make install
    cd ..
    Okay now we have almost everything set up. You only need a build.conf in your qtiplot-0.9.8 directory:
    Code:
    isEmpty( QTI_ROOT ) {
      message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
    }
    
    SYS_INCLUDEPATH = /opt/local/include
    SYS_LIBS = -L/opt/local/lib
    
    # muParser lib
    MUPARSER_INCLUDEPATH = 
    MUPARSER_LIBS = -lmuparser
    
    # GSL lib
    GSL_INCLUDEPATH =
    GSL_LIBS = -lgsl -lgslcblas
    
    # Boost lib
    BOOST_INCLUDEPATH =
    BOOST_LIBS = -lboost_date_time-mt -lboost_thread-mt
    
    
    # QWT
    QWT_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwt/src
    QWT_LIBS = $$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
    
    # QwtPlot3D
    QWT3D_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwtplot3d/include
    QWT3D_LIBS = $$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
    
    # ExcelFormat - optional
    # comment the next 2 lines to disable xls import
    XLS_INCLUDEPATH =
    XLS_LIBS = -lExcelFormat
    
    # QuaZIP - optional
    # comment the next 2 lines to disable xls import
    QUAZIP_INCLUDEPATH =
    QUAZIP_LIBS = -lquazip
    
    # libpng
    LIBPNG_INCLUDEPATH =
    LIBPNG_LIBS = -lpng
    
    PYTHON = python
    
    # Qt tools - allows to use specific versions
    LUPDATE = lupdate
    LRELEASE = lrelease
    
    #  Target specific configuration: configure Qtiplot itself
    contains( TARGET, qtiplot ) {
      # building without muParser doesn't work yet
      SCRIPTING_LANGS += muParser
      SCRIPTING_LANGS += Python
    
      # a console displaying output of scripts; particularly useful on Windows
      # where running QtiPlot from a terminal is inconvenient
      DEFINES         += SCRIPTING_CONSOLE
    
      #DEFINES         += QTIPLOT_DEMO
    
      # Comment the following lines to disable donations start-up message.
      #DEFINES         += QTIPLOT_SUPPORT
    
      # Uncomment the following line if you want to perform a custom installation using the *.path variables defined in ./qtiplot.pro.
      #CONFIG          += CustomInstall
    
      # Uncomment the following line if you want to build QtiPlot as a browser plugin (not working on Internet Explorer).
      #CONFIG          += BrowserPlugin
      
      CONFIG          += release
      #CONFIG          += debug
    }
    and you need to edit qtiplot-0.9.8/src/core/ApplicationWindow.cpp to:
    Code:
    line  199: #include <quazip/quazip.h>
    line  200: #include <quazip/quazipfile.h>
    
    line 4221: if (!rows && !cols){
    Finally the last commands (in the qtiplot-0.9.8 directory):
    Code:
    qmake
    make
    sudo make install
    For me, the install command only installs the qtiplot plugins - I just started qtiplot directly from the qtiplot subdir - but I think you could also copy the executable to /usr/bin or somethin similiar.
    Attached Files Attached Files
    Last edited by bailli; July 14th, 2010 at 05:06 PM.

  2. #2
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Compiling QtiPlot 0.9.8 with xls and odf import

    Found a (ugly) solution myself.
    I updated the first post to quick guide to compile QtiPlot. Maybe a mod could change the thread title?

  3. #3
    Join Date
    Oct 2005
    Beans
    94

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Thank you for the post.
    I followed your instructions step by step, and still I have errors during the last compilation.
    Here is the output: :~/soft/qtiplot-0.9.8$ make
    cd fitPlugins/ && make -f Makefile
    make[1]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins'
    cd explin/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/explin'
    /usr/bin/qmake -unix -o Makefile explin.pro
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/explin'
    make[2]: Entering directory `/../soft/qtiplot-0.9.8/fitPlugins/explin'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/explin'
    cd exp_saturation/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/exp_saturation'
    /usr/bin/qmake -unix -o Makefile exp_saturation.pro
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/exp_saturation'
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/exp_saturation'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/exp_saturation'
    cd fitRational0/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational0'
    /usr/bin/qmake -unix -o Makefile fitRational0.pro
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational0'
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational0'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational0'
    cd fitRational1/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational1'
    /usr/bin/qmake -unix -o Makefile fitRational1.pro
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational1'
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational1'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/fitRational1'
    cd planck_wavelength/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/planck_wavelength'
    /usr/bin/qmake -unix -o Makefile planck_wavelength.pro
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/planck_wavelength'
    make[2]: Entering directory `../soft/qtiplot-0.9.8/fitPlugins/planck_wavelength'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins/planck_wavelength'
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/fitPlugins'
    cd manual/ && make -f Makefile
    make[1]: Entering directory `../soft/qtiplot-0.9.8/manual'
    docbook2html -d qtiplot.dsl docbook-en/index.docbook -e no-valid
    make[1]: docbook2html: Command not found
    make[1]: *** [web] Error 127
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/manual'
    make: *** [sub-manual-make_default] Error 2

    I don't understand the reason for these errors.
    Could you, please, help me in compiling qtiplot?
    Thanks a lot.

  4. #4
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Hi,

    your problem seems to be connected to the generation of the pdf manual. The docbook2html executable is not found.

    You could either try installing docbook2html:
    Code:
    sudo apt-get install docbook-utils
    but I am not sure if that installs all necessary files (you might need to install other docbook packages).

    or you could exclude the pdf building process of the manual from the make files by remove the "manual \" line from qtiplot.pro in the qtiplot-0.9.8 directory. (You might have to run "qmake" again.)

    Hope that helps.

  5. #5
    Join Date
    Oct 2005
    Beans
    94

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Thanks a lot. It worked, I don't understand how you figured it out, but this problem was solved. Thank you.
    The compilation ran for some time, but now I have another error. Here it is:

    /usr/bin/ld: cannot find -lboost_date_time-mt
    collect2: ld returned 1 exit status
    make[1]: *** [qtiplot] Error 1
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/qtiplot'
    make: *** [sub-qtiplot-make_default] Error 2

    I hope it is enough to define the source of the problem.
    I really appreciate your help.

  6. #6
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    This seems to be an error on my side:

    I should have installed the package libboost-all-dev instead of libboost.

    So just type
    Code:
    sudo apt-get install libboost-all-dev
    Then run make again.

  7. #7
    Join Date
    Oct 2005
    Beans
    94

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Thank you. It worked. make finished without errors.
    It seems I'm almost there. I ran sudo make install, but there was something wrong with manual/:

    make[1]: Entering directory `../soft/qtiplot-0.9.8/manual'
    make[1]: *** No rule to make target `install'. Stop.
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/manual'
    make: *** [sub-manual-install_subtargets] Error 2

    Any suggestions?

  8. #8
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Did you run qmake again in the qtiplot-0.9.8 directory?

  9. #9
    Join Date
    Oct 2005
    Beans
    94

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Yes, I run 'qmake' - silence.
    'make' produces this out put (it is only the end of it):

    Output written in /tmp/tmpqybUdP/index.docbook.ind.
    Transcript written in /tmp/tmpqybUdP/index.docbook.ilg.
    This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
    restricted \write18 enabled.
    entering extended mode
    'qtiplot-manual-en.pdf' successfully built
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/manual'
    cd 3rdparty/qwt/ && make -f Makefile
    make[1]: Entering directory `../soft/qtiplot-0.9.8/3rdparty/qwt'
    cd src/ && make -f Makefile
    make[2]: Entering directory `../soft/qtiplot-0.9.8/3rdparty/qwt/src'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `../soft/qtiplot-0.9.8/3rdparty/qwt/src'
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/3rdparty/qwt'
    cd 3rdparty/qwtplot3d/ && make -f Makefile
    make[1]: Entering directory `../soft/qtiplot-0.9.8/3rdparty/qwtplot3d'
    make[1]: Nothing to be done for `first'.
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/3rdparty/qwtplot3d'
    cd qtiplot/ && make -f Makefile
    make[1]: Entering directory `../soft/qtiplot-0.9.8/qtiplot'
    make[1]: Nothing to be done for `first'.
    make[1]: Leaving directory `../soft/qtiplot-0.9.8/qtiplot'

    I see no error, but may be you can find the problem.
    Then I run 'sudo make install' and it gives errors, that I posted above.

  10. #10
    Join Date
    Jun 2010
    Beans
    10
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problem compiling QtiPlot 0.9.8 with xls import

    Hm okay I just made a test myself. If you leave the "manual \" line in qtiplot.pro Make runs into an error in the manual directory because the Makefile there doens't have an install target. I would suggest you just remove the "manual \" line and rerun qmake and sudo make install.

    I didn't run into this problem because I have that line removed myself. Building the manual always takes so much time which annoyed me while trying to get qtiplot to compile...

Page 1 of 12 12311 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •