[vtkusers] CMAKE + VTK + QT

Francois Bertel francois.bertel at kitware.com
Mon Sep 14 14:05:43 EDT 2009


Hello,

On Ubuntu 9.04, the only packages I installed are libqt4-dev and
libqt4-dev-dbg. Everything else have been installed by automatic
dependency solving.

Notably,

/usr/bin/qmake is a symlink to  /etc/alternatives/qmake
/etc/alternatives/qmake is a symlink to /usr/bin/qmake-qt4

/usr/bin/qmake-qt4 is provided by package "qt4-qmake" (automatically
installed with the dependency resolution above)

This command line checks which package provides /usr/bin/qmake-qt4:
$ dpkg -S /usr/bin/qmake-qt4
qt4-qmake: /usr/bin/qmake-qt4

Make sure that you /usr/bin/qmake is not a symlink pointing to an
non-existing file.


On Mon, Sep 14, 2009 at 1:46 PM, Nicolas RANNOU <nrannou at bwh.harvard.edu> wrote:
> So I uninstalled the QT version I downloaded from qt.nokia and I only kept
> the packages downloaded with apt-get.
>
> "which qmake" returns
> /usr/bin/qmake
>
>  after configuration in the cmake,
>
> output:
> /-----------------------------------------------/
>  Multiple versions of QT found please set DESIRED_QT_VERSION
> /-----------------------------------------------/
>
> but the qmake is still not found...
> if I highlight  QT_QMAKE_EXECUTABLE:
>
> QT_QMAKE_EXECUTABLE              /usr/bin/qmake-NOTFOUND
> QT_QMAKE_EXECUTABLE: Invalid qmake found
>
>
>
>
> Nicolas
>
>
>
> On Mon, 14 Sep 2009 18:10:52 +0100, "Adriano Gagliardi"
> <agagliardi at ara.co.uk> wrote:
>>  Well, if you installed a version from the repository, I'd stick with
> that
>> for the moment. Recompiling Qt from scratch can take a long time even on
> a
>> quad-core with multiple processes (using make -j30 it still takes
>> ~30mins).
>> I'd delete the version you downloaded from qt.nokia.com and try using the
>> repository alone.
>>
>> On a side note:
>>
>> QT_QMAKE_EXECUTABLE
>> /home/nico/Work/Libs/QT/qt/bin/qmake-NOTFOUND
>>  QT_QMAKE_EXECUTABLE: Invalid qmake found
>>
>> Can you verify that qmake exists in that directory? qmake-NOTFOUND
>> suggests
>> it isn't there. If not, try a `which qmake` to see where it is located.
>> These are my vars in my CMakeLists.txt:
>>
>>
> QT_INCLUDE_DIR=/raid2/gagliard/Paraview/qt-x11-opensource-src-4.5.0-64-bin/i
>> nclude
>>
> QT_QMAKE_EXECUTABLE=/raid2/gagliard/Paraview/qt-x11-opensource-src-4.5.0-64-
>> bin/bin/qmake
>>
>>
>>
>> ===================================
>>
>> Adriano Gagliardi MEng PhD
>> Project Scientist
>> Computational Aerodynamics
>> Aircraft Research Association Ltd.
>> Manton Lane
>> Bedford
>>
>> Tel: 01234 32 4644
>> E-mail: agagliardi at ara.co.uk
>> Url: www.ara.co.uk
>> -----Original Message-----
>> From: Nicolas RANNOU [mailto:nrannou at bwh.harvard.edu]
>> Sent: 14 September 2009 17:39
>> To: agagliardi at ara.co.uk
>> Subject: RE: [vtkusers] CMAKE + VTK + QT
>>
>> Yes I tried it but it returns other errors:
>>
>> /-------------------------------------------------/
>>  Multiple versions of QT found please set DESIRED_QT_VERSION
>>
>>  CMake Error: The following variables are used in this project, but they
>> are
>> set to NOTFOUND.
>>  Please set them or make sure they are set and tested correctly in the
>> CMake
>> files:
>>  QT_INCLUDE_DIR (ADVANCED)
>>     used as include directory in directory /home/nico/Work/SimpleView
>> QT_QT_LIBRARY (ADVANCED)
>>      linked by target "qtsimpleview" in directory
>> /home/nico/Work/SimpleView
>> /-------------------------------------------------/
>>
>> and
>>
>>  QT_QMAKE_EXECUTABLE
>> /home/nico/Work/Libs/QT/qt/bin/qmake-NOTFOUND
>>  QT_QMAKE_EXECUTABLE: Invalid qmake found
>>
>> So that is probably my QT installation which fails or some paths which
> are
>> not properly defined. I installed  QT downloading sources from
>> http://qt.nokia.com/downloads and executing the downloaded file (last
>> version). Moreover, I did
>>
>> sudo apt-get install libqt4-dev qt4-dev-tools qt4-doc
>>
>> to add some missing packages. How do you proceed to do a clean
>> installation
>> of QT? Just downloading and executing the file from
>> http://qt.nokia.com/downloads? (I am not very familiar with linux)
>>
>> Thanks,
>>
>>
>> Nicolas
>>
>> On Mon, 14 Sep 2009 17:18:53 +0100, "Adriano Gagliardi"
>> <agagliardi at ara.co.uk> wrote:
>>> Try setting QT_QMAKE_EXECUTABLE to the explicit location of qmake in
>>> advanced options ie QT_QMAKE_EXECUTABLE=/home/john/qt/bin/qmake. Then
>>> reconfigure and it should pick up the version of Qt, including all the
>>> libs it requires, based on qmake. This works for me when I'm switching
>>> between Qt versions.
>>>
>>>
>>> ===================================
>>>
>>> Adriano Gagliardi MEng PhD
>>> Project Scientist
>>> Computational Aerodynamics
>>> Aircraft Research Association Ltd.
>>> Manton Lane
>>> Bedford
>>>
>>> Tel: 01234 32 4644
>>> E-mail: agagliardi at ara.co.uk
>>> Url: www.ara.co.uk
>>> -----Original Message-----
>>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
>> Behalf
>>> Of Nicolas RANNOU
>>> Sent: 14 September 2009 17:14
>>> To: vtkusers at vtk.org
>>> Subject: [vtkusers] CMAKE + VTK + QT
>>>
>>> Hi all,
>>>
>>> I'm currently trying to build the QT examples in VTK/Examples/GUI.
>>>
>>> I'm working on ubuntu 9.
>>>
>>> I built cmake doing: sudo apt-get install cmake I built qt doing:
>>> downloading sources from http://qt.nokia.com/downloads and executing
>>> the downloaded file (last version).
>>> I downoaded vtk on kitware website (last version) then built it with
>>> cmake.
>>>
>>> QT and VTK work separately.
>>>
>>> But I can't get the vtk QT examples working. I can't even build the
>>> CMakeLists.txt .
>>>
>>>
>>> I get the following errors when I configure the cmake.
>>>
>>> /--------------------------------------------------------/
>>>  Multiple versions of QT found please set DESIRED_QT_VERSION
>>>
>>>  CMake Error: The following variables are used in this project, but
>>> they are set to NOTFOUND.
>>>  Please set them or make sure they are set and tested correctly in the
>>> CMake
>>> files:
>>>  QT_INCLUDE_DIR (ADVANCED)
>>>     used as include directory in directory /home/nico/Work/SimpleView
>>> QT_QT_LIBRARY (ADVANCED)
>>>      linked by target "qtsimpleview" in directory
>>> /home/nico/Work/SimpleView
>>> /--------------------------------------------------------/
>>>
>>> I changed the QT desired version number to 4 but there are still errors:
>>>
>>>
>>> /--------------------------------------------------------/
>>>
>>>  CMake was unable to find desired QT version: 4. Set advanced values
>>> QT_QMAKE_EXECUTABLE and QT4_QGLOBAL_FILE.
>>>
>>>  CMake Error: The following variables are used in this project, but
>>> they are set to NOTFOUND.
>>>  Please set them or make sure they are set and tested correctly in the
>>> CMake
>>> files:
>>>  QT_INCLUDE_DIR (ADVANCED)
>>>     used as include directory in directory /home/nico/Work/SimpleView
>>> /--------------------------------------------------------/
>>>
>>> I've been searching a lot on the internet but I couldn't find the
>>> solution.
>>> Maybe do I do something wrong during the installation... Another
>>> strange thing is that when I configure the CMakelists.txt to build
>>> VTK, via the GUI, I can't turn USE_QT on or off (the option is not
>>> available)
>>>
>>> Thanks a lot for your help,
>>>
>>>
>>> Nicolas
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>> ---------------------------
>>> This email contains information that is private and confidential and
>>> is intended only for the addressee.  If you are not the intended
>>> recipient please delete it and notify us immediately by e-mailing the
>> sender.
>>> Note: All email sent to or from this address may be accessed by
>>> someone other than the recipient, for system management and security
>> reasons.
>>> Aircraft Research Association Ltd.  Registered in England,
>>> Registration
>> No
>>> 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No
>>> GB
>>> 196351245
>>
>>
>> ---------------------------
>> This email contains information that is private and confidential and is
>> intended only for the addressee.  If you are not the intended recipient
>> please delete it and notify us immediately by e-mailing the sender.
>> Note: All email sent to or from this address may be accessed by someone
>> other than the recipient, for system management and security reasons.
>> Aircraft Research Association Ltd.  Registered in England, Registration
> No
>> 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
>> 196351245
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list