Qt-Root Windows

Hi,

a while back I was successful in following all of the steps here at root.bnl.gov/ and got Qt to work with root under Ubuntu. At this point I would like to make sure that some of the code that I have written will work under Windows 7 too. After installing cygwin (with all of the available packages) and VS2008 Express edition I ran the Install script that is available. The only changes I made to it is the root version to be downloaded and also using Jedit I changed the way the line ends were represented (used to get alot of ‘\r’ unknown command errors). The cygwin bat file looks like this

@echo off
C:
chdir C:\cygwin2\bin
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
bash --login -i

The script starts running ok and it downloads all of the necessary files but when it tries to install Qt the following happens (please view the attached log).

Setting environment for using Microsoft Visual Studio 2008 x86 tools.

Shashi@Shashi-PC ~
$ cd C:

Shashi@Shashi-PC /cygdrive/c
$ cd qtRoot/

Shashi@Shashi-PC /cygdrive/c/qtRoot
$ ./INSTALL_QTROOT.sh
CYGWIN_NT-6.1
----- QT_CONF_OPT=------
----- QT_CONF_OPT= -opensource -no-exceptions -confirm-license ------
=========================================
(L.B.)
This will compile and install QT+ROOT(+COIN3D) in the current directory!!

Current config: Qt v.4.6.2 opensource, ROOT v.5.30.00
                dir=/cygdrive/c/qtRoot
                PLATFORM=Win, make will use 2 cpu(s)

It will require ~1-2 hours and ~3 Gb on disk. Current dir disk space is:
Filesystem            Size  Used Avail Use% Mounted on
C:                    103G   43G   60G  42% /cygdrive/c
=========================================

Do you want to proceed? (yes/no) yes
Do you want to install COIN3D also? (yes/no) yes
Make sure your ROOT version is known bug free ;)
-----------------------------------------------
Bug:     https://savannah.cern.ch/bugs/\?59014
Patch: https://savannah.cern.ch/bugs/download.php\?file_id=12905

Bug:     https://savannah.cern.ch/bugs/\?65402
Patch:   https://savannah.cern.ch/bugs/download.php\?file_id=13273
-----------------------------------------------

>>>>> COMPILATION STARTS. Be patient...
/usr/bin/wget
Answer "no" to the question: "replace $QTPKG/configure?"
replace qt-everywhere-opensource-src-4.6.2/configure? [y]es, [n]o, [A]ll, [N]one
, [r]ename: no
total 1.3M
-rw-r--r--+ 1 Shashi None  675 Feb 11  2010 INSTALL
-rw-r--r--+ 1 Shashi None 1.2K Feb 11  2010 LGPL_EXCEPTION.txt
-rw-r--r--+ 1 Shashi None  37K Feb 11  2010 LICENSE.GPL3
-rw-r--r--+ 1 Shashi None  27K Feb 11  2010 LICENSE.LGPL
-rw-r--r--+ 1 Shashi None 3.6K Feb 11  2010 README
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:17 bin
-rw-r--r--+ 1 Shashi None 8.5K Feb 11  2010 changes-4.6.2
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:17 config.tests
-rw-r--r--+ 1 Shashi None 1.1M Feb 11  2010 configure.exe
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 demos
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 doc
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:17 examples
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 include
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 lib
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 mkspecs
-rw-r--r--+ 1 Shashi None 6.2K Feb 11  2010 projects.pro
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 qmake
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:17 src
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 tools
drwxr-xr-x+ 1 Shashi None    0 Jun 29 10:16 translations

This is the Qt for Windows Open Source Edition.

You have already accepted the terms of the license.

Environment:
    INCLUDE=
      C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE
      C:\Program Files\Microsoft SDKs\Windows\v6.0A\include

    LIB=
      C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB
      C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib

    PATH=
      C:\qtRoot\root\bin
      C:\qtRoot\Qt-4.6.2\bin
      C:\cygwin2\usr\local\bin
      C:\cygwin2\bin
      C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
      C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
      C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools
      C:\Windows\Microsoft.NET\Framework\v3.5
      C:\Windows\Microsoft.NET\Framework\v2.0.50727
      C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages
      C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
      C:\Windows\system32
      C:\Windows
      C:\Windows\System32\Wbem
      C:\Windows\System32\WindowsPowerShell\v1.0
      C:\Program Files\QuickTime\QTSystem
      C:\Program Files\Microsoft SQL Server\100\Tools\Binn
      C:\Program Files\Microsoft SQL Server\100\DTS\Binn
      C:\Program Files\jEdit
      C:\BNL\ROOT\lib
      C:\BNL\ROOT\bin
      C:\BNL\ROOT\include
      C:\cygwin2
      C:\cygwin2\lib\lapack
You are licensed to use this software under the terms of the GNU GPL version 3.Y
ou are licensed to use this software under the terms of the Lesser GNU LGPL vers
ion 2.1.
See C:/qtRoot/Qt-4.6.23

 or C:/qtRoot/Qt-4.6.2L

Configuration:
    minimal-config
    small-config
    medium-config
    large-config
    full-config
    build_all
    debug
Qt Configuration:
    release
    debug
    zlib
    png
    accessibility
    qt3support
    opengl
    s60
    ipv6
    script
    scripttools
    phonon
    phonon-backend
    multimedia
    audio-backend
    native-gestures
    svg
    minimal-config
    small-config
    medium-config
    large-config
    full-config

QMAKESPEC...................cygwin-g++ (env)
Architecture................windows
Maketool....................make
Debug symbols...............yes
Link Time Code Generation...no
Accessibility support.......yes
STL support.................yes
Exception support...........no
RTTI support................yes
MMX support.................yes
3DNOW support...............yes
SSE support.................yes
SSE2 support................yes
IWMMXT support..............no
OpenGL support..............yes
OpenVG support..............no
OpenSSL support.............no
QtDBus support..............no
QtXmlPatterns support.......no
Phonon support..............yes
QtMultimedia support........yes
WebKit support..............no
Declarative support.........no
QtScript support............yes
QtScriptTools support.......yes
Graphics System.............raster
Qt3 compatibility...........yes

Third Party Libraries:
    ZLIB support............qt
    GIF support.............plugin
    TIFF support............plugin
    JPEG support............plugin
    PNG support.............qt
    MNG support.............plugin
    FreeType support........no

Styles:
    Windows.................yes
    Windows XP..............yes
    Windows Vista...........yes
    Plastique...............yes
    Cleanlooks..............yes
    Motif...................yes
    CDE.....................yes
    Windows CE..............no
    Windows Mobile..........no
    S60.....................no

Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................plugin (qt)
    SQLite2.................no
    InterBase...............no

Sources are in..............C:\qtRoot\Qt-4.6.2
Build is done in............C:\qtRoot\Qt-4.6.2
Install prefix..............C:\qtRoot\Qt-4.6.2
Headers installed to........C:\qtRoot\Qt-4.6.2\include
Libraries installed to......C:\qtRoot\Qt-4.6.2\lib
Plugins installed to........C:\qtRoot\Qt-4.6.2\plugins
Binaries installed to.......C:\qtRoot\Qt-4.6.2\bin
Docs installed to...........C:\qtRoot\Qt-4.6.2\doc
Data installed to...........C:\qtRoot\Qt-4.6.2
Translations installed to...C:\qtRoot\Qt-4.6.2\translations
Examples installed to.......C:\qtRoot\Qt-4.6.2\examples
Demos installed to..........C:\qtRoot\Qt-4.6.2\demos

Symbian DEF files enabled...yes
Running syncqt...
cygwin warning:
  MS-DOS style path detected: \bin\uname
  Preferred POSIX equivalent is: /cygdrive/c/bin/uname
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
header created for C:/qtRoot/Qt-4.6.2/src/corelib/global/qconfig.h (1)
header (master) created for QtCore
headers.pri file created for QtCore
header (master) created for QtXml
headers.pri file created for QtXml
headers.pri file created for QtXmlPatterns
headers.pri file created for ActiveQt
header (master) created for QtTest
headers.pri file created for QtSql
header (master) created for QtGui
headers.pri file created for QtGui
headers.pri file created for QtDesigner
header (master) created for Qt3Support
headers.pri file created for Qt3Support
Creating qmake...
Makefile:12: *** missing separator.  Stop.
Makefile:12: *** missing separator.  Stop.
Cleaning qmake failed, return code 2


SOME FATAL ERROR DURING EXECUTION, SORRY...

Please advise on what to do next or if I need to provide additional data.

Thank you in advance!
Radu
log.txt (8.08 KB)

The simplest way to install QtRoot on Windows is to follow microsoft.com/visualstudio/e … ns/express Visual Studio 2008 Express Edition and Qt libraries 4.7.3 for Windows (VS 2008, 228 MB)
qt.nokia.com/downloads/windows-cpp-vs2008 . Make Sure you install very 2008 Visual Studio to match the Qt pre-compiled version. Make sure you download very Qt libraries 4.7.3 for Windows (VS 2008) (do not [-X download Qt SDK !!!).
Since to install the plain ROOT you need Cygwin env you have to make sure you DO [-X NOT install Qt from Cygwin distribution.
Please try [-o< that.
Let me know as soon as you have any trouble.
I’ll try to find the large space to upload the entire QtRoot env compiled on Win7 with VS2008. This way you will not need to do anything just download this staff.
There are couple of the summer students here at BNL.They had built QtRoot on Win7. I’ll ask them to monitor the Forum to assist you as well.

Pay your attention to set the correct Qt and Visual Studio env within Cygwin the cygwin.bat should look as follows:

@echo off C: chdir C:\cygwin\bin call c:\Qt\4.7.3\bin\qtvars.bat vsvars bash --login -i

Thank you for the information. Will report back as soon as possible.

Radu

Hi,

I’m one of the summer students at BNL. I recently installed QT-Root on Win7 and I’ll try and help, too.

Here are a couple of steps I found were important when I installed QT-Root:

  1. Here are the contents of my C:\cygwin\etc\setup\installed.db file. It shows the Cygwin components I installed which I believe are needed to install QT-Root. If you’re not sure which Cygwin components to install, you can check against this list:

[ul]
_update-info-dir _update-info-dir-00963-1.tar.bz2 0
alternatives alternatives-1.3.30c-10.tar.bz2 0
autoconf autoconf-10-1.tar.bz2 0
autoconf2.1 autoconf2.1-2.13-10.tar.bz2 0
autoconf2.5 autoconf2.5-2.68-1.tar.bz2 0
automake1.9 automake1.9-1.9.6-10.tar.bz2 0
base-cygwin base-cygwin-3.0-1.tar.bz2 0
base-files base-files-4.0-6.tar.bz2 0
bash bash-4.1.10-4.tar.bz2 0
bzip2 bzip2-1.0.6-2.tar.bz2 0
coreutils coreutils-8.10-1.tar.bz2 0
cpio cpio-2.11-1.tar.bz2 0
crypt crypt-1.1-1.tar.bz2 0
curl curl-7.20.1-1.tar.bz2 0
cvs cvs-1.12.13-10.tar.bz2 0
cvs2svn cvs2svn-2.3.0-1.tar.bz2 0
cvsps cvsps-2.2b1-1.tar.bz2 0
cygutils cygutils-1.4.6-1.tar.bz2 0
cygwin cygwin-1.7.9-1.tar.bz2 0
cygwin-doc cygwin-doc-1.7-1.tar.bz2 0
dash dash-0.5.6.1-2.tar.bz2 0
diffutils diffutils-2.9-1.tar.bz2 0
dos2unix dos2unix-5.3-1.tar.bz2 0
doxygen doxygen-1.6.1-2.tar.bz2 0
editrights editrights-1.01-2.tar.bz2 0
findutils findutils-4.5.9-2.tar.bz2 0
gawk gawk-3.1.8-1.tar.bz2 0
gettext gettext-0.17-11.tar.bz2 0
git git-1.7.5.1-1.tar.bz2 0
git-svn git-svn-1.7.5.1-1.tar.bz2 0
glib glib-1.2.10-10.tar.bz2 0
grep grep-2.6.3-1.tar.bz2 0
groff groff-1.20.1-2.tar.bz2 0
gzip gzip-1.4-1.tar.bz2 0
ipc-utils ipc-utils-1.0-1.tar.bz2 0
less less-436-1.tar.bz2 0
libapr1 libapr1-1.4.4-1.tar.bz2 0
libaprutil1 libaprutil1-1.3.10-1.tar.bz2 0
libattr1 libattr1-2.4.43-1.tar.bz2 0
libblkid1 libblkid1-2.17.2-1.tar.bz2 0
libbz2_1 libbz2_1-1.0.6-2.tar.bz2 0
libcurl4 libcurl4-7.20.1-1.tar.bz2 0
libdb4.5 libdb4.5-4.5.20.2-2.tar.bz2 0
libexpat1 libexpat1-2.0.1-1.tar.bz2 0
libffi4 libffi4-4.3.4-4.tar.bz2 0
libgcc1 libgcc1-4.3.4-4.tar.bz2 0
libgdbm4 libgdbm4-1.8.3-20.tar.bz2 0
libglib1.2_0 libglib1.2_0-1.2.10-10.tar.bz2 0
libgmp3 libgmp3-4.3.1-3.tar.bz2 0
libiconv2 libiconv2-1.13.1-2.tar.bz2 0
libidn11 libidn11-1.18-1.tar.bz2 0
libintl8 libintl8-0.17-11.tar.bz2 0
liblzma5 liblzma5-5.0.2_20110517-1.tar.bz2 0
libncurses10 libncurses10-5.7-18.tar.bz2 0
libncurses8 libncurses8-5.5-10.tar.bz2 0
libncurses9 libncurses9-5.7-16.tar.bz2 0
libncursesw10 libncursesw10-5.7-18.tar.bz2 0
libneon27 libneon27-0.29.3-1.tar.bz2 0
libopenldap2_3_0 libopenldap2_3_0-2.3.43-1.tar.bz2 0
libopenssl098 libopenssl098-0.9.8r-2.tar.bz2 0
libpcre0 libpcre0-8.02-1.tar.bz2 0
libpopt0 libpopt0-1.6.4-4.tar.bz2 0
libpq5 libpq5-8.2.11-1.tar.bz2 0
libproxy0 libproxy0-0.2.3-2.tar.bz2 0
libreadline6 libreadline6-5.2.14-12.tar.bz2 0
libreadline7 libreadline7-6.1.2-2.tar.bz2 0
libsasl2 libsasl2-2.1.23-1.tar.bz2 0
libserf0_1 libserf0_1-0.7.1-1.tar.bz2 0
libsigsegv2 libsigsegv2-2.10-1.tar.bz2 0
libsqlite3_0 libsqlite3_0-3.7.3-1.tar.bz2 0
libssh2_1 libssh2_1-1.2.5-1.tar.bz2 0
libssp0 libssp0-4.3.4-4.tar.bz2 0
libstdc++6 libstdc++6-4.3.4-4.tar.bz2 0
libuuid1 libuuid1-2.17.2-1.tar.bz2 0
login login-1.10-10.tar.bz2 0
lv lv-4.51-1.tar.bz2 0
m4 m4-1.4.16-1.tar.bz2 0
make make-3.81-2.tar.bz2 0
makedepend makedepend-1.0.2-1.tar.bz2 0
man man-1.6f-1.tar.bz2 0
mc mc-4.6.1-2.tar.bz2 0
minires minires-1.02-1.tar.bz2 0
perl perl-5.10.1-5.tar.bz2 0
perl-Error perl-Error-0.17016-1.tar.bz2 0
python python-2.6.5-2.tar.bz2 0
rebase rebase-3.0.1-1.tar.bz2 0
rsync rsync-3.0.8-1.tar.bz2 0
ruby ruby-1.8.7-p72-2.tar.bz2 0
run run-1.1.13-1.tar.bz2 0
sed sed-4.2.1-1.tar.bz2 0
subversion subversion-1.6.16-1.tar.bz2 0
subversion-perl subversion-perl-1.6.16-1.tar.bz2 0
subversion-python subversion-python-1.6.16-1.tar.bz2 0
subversion-ruby subversion-ruby-1.6.16-1.tar.bz2 0
subversion-tools subversion-tools-1.6.16-1.tar.bz2 0
tar tar-1.25-1.tar.bz2 0
tcltk tcltk-20080420-1.tar.bz2 0
terminfo terminfo-5.7_20091114-14.tar.bz2 0
terminfo0 terminfo0-5.5_20061104-12.tar.bz2 0
texinfo texinfo-4.13-3.tar.bz2 0
tzcode tzcode-2010j-1.tar.bz2 0
unzip unzip-6.0-10.tar.bz2 0
util-linux util-linux-2.17.2-1.tar.bz2 0
wdiff wdiff-0.6.3-1.tar.bz2 0
wget wget-1.12-1.tar.bz2 0
which which-2.20-2.tar.bz2 0
xz xz-5.0.2_20110517-1.tar.bz2 0
zip zip-3.0-11.tar.bz2 0
zlib zlib-1.2.5-1.tar.bz2 0
zlib-devel zlib-devel-1.2.5-1.tar.bz2 0
zlib0 zlib0-1.2.5-1.tar.bz2 0
[/ul]

  1. My Cygwin.bat contains the following commands:
@echo off
C:
chdir C:\cygwin\bin
call "%VS90COMNTOOLS%\vsvars32.bat"
call C:\Qt\4.7.3\bin\qtvars.bat
bash --login -i

Now I’m not 100% sure you need to call vsvars32.bat as well, but it’s what worked for me.

  1. Rename or delete the following file: cygwin/bin/link.exe. The reason fot this is that there are two files named link.exe, one used by cygwin and one used by windows. Cygwin doesn’t know which one to use so you force it to use the windows file by renaming or deleting this file. I just renamed mine to link-cygwin.exe in case it is needed later for any reason.

Andrew

Hi Andrew . Thank you for your assistance.

[quote=“adan”]

@echo off
C:
chdir C:\cygwin\bin
call "%VS90COMNTOOLS%\vsvars32.bat"
call C:\Qt\4.7.3\bin\qtvars.bat
bash --login -i

Now I’m not 100% sure you need to call vsvars32.bat as well, but it’s what worked for me.
…[/quote]
With the Qt binaries one can use qtvars alone, like this:

@echo off C: chdir C:\cygwin\bin call C:\Qt\4.7.3\bin\qtvars.bat vsvars bash --login -i To set both Qt as well as the Visual Studio environment.
The line 'call C:\Qt\4.7.3\bin\qtvars.bat vsvars' should be added to any script / batch to launch the root and/or root-based Qt-applications.