Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11651

Qt 4.7.0 TP cannot be compiled when qt 4.6.x is installed since qmake is trying to use assistant.prf from Qt 4.6

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.7.0
    • Tools: Assistant
    • None
    • b483c61023f8a71aa51bca8cfcffb5264dc71ad6

    Description

      I'm using Qt 4.6.2 and trying to build Qt 4.7.0 Tech Preview, but getting a linking error like:

      x86_64-pc-linux-gnu-g++ Wl,-O1 -Wl,-z,relro -Wl,hash-style=gnu -Wl,as-needed -Wl,sort-common -Wl,as-needed -Wl,-O1 -Wl,-z,relro -Wl,hash-style=gnu -Wl,as-needed -Wl,-sort-common -o ../../bin/qtdemo .obj-release-shared/main.o .obj-release-shared/demoscene.o .obj-release-shared/mainwindow.o .obj-release-shared/demoitem.o .obj-release-shared/score.o .obj-release-shared/demoitemanimation.o .obj-release-shared/itemcircleanimation.o .obj-release-shared/demotextitem.o .obj-release-shared/headingitem.o .obj-release-shared/dockitem.o .obj-release-shared/scanitem.o .obj-release-shared/letteritem.o .obj-release-shared/examplecontent.o .obj-release-shared/menucontent.o .obj-release-shared/guide.o .obj-release-shared/guideline.o .obj-release-shared/guidecircle.o .obj-release-shared/menumanager.o .obj-release-shared/colors.o .obj-release-shared/textbutton.o .obj-release-shared/imageitem.o .obj-release-shared/moc_mainwindow.o .obj-release-shared/moc_demoitemanimation.o .obj-release-shared/moc_menumanager.o .obj-release-shared/qrc_qtdemo.o -L/var/pisi/qt-4.7.0_pre1-78/work/qt-everywhere-opensource-src-4.7.0-tp/lib -L/usr/X11R6/lib -lQtHelp -L/var/pisi/qt-4.7.0_pre1-78/work/qt-everywhere-opensource-src-4.7.0-tp/lib -L/usr/X11R6/lib -lQtAssistantClient -lQtSql -lQtXml -lQtOpenGL -lQtGui -lQtNetwork -lQtCore -lGLU -lGL -lpthread

      /usr/bin/ld: cannot find -lQtAssistantClient
      collect2: ld returned 1 exit status

      After some search I've realized that in qt-everywhere-opensource-src-4.7.0-tp/demos/qtdemo/qtdemo.pro file, first line[1] is:

      CONFIG += assistant help x11inc

      but there is no assistant.prf file in features directory of 4.7TP[2].

      Interesting thing is qmake also looks for .prf files in PREFIX/mkspecs and in DATADIR/mkspecs[3] in addition to mkspecs directory included in the 4.7 tarball. Since my old Qt4.6 installation includes the assistant.prf file and qmake (from Qt4.7tp) tries to use this assistant.prf file from my old Qt4.6 installation, this compilation error occurs. The reason behind this error is line 7 in assistant.prf[4]:

      qtAddLibrary(QtAssistantClient)

      As far as I understand there is no such library in Qt 4.7 anymore and this is the reason behind the compilation error. As a result, I have removed assistant word from qtdemo.pro file (see the patch attached) and I was able to build 4.7 now.

      [1] http://qt.gitorious.org/qt/qt/blobs/4.7/demos/qtdemo/qtdemo.pro#line1
      [2] http://qt.gitorious.org/qt/qt/trees/4.7/mkspecs/features
      [3] http://qt.gitorious.org/qt/qt/blobs/4.7/qmake/project.cpp#line596
      [4] http://qt.gitorious.org/qt/qt/blobs/4.6/mkspecs/features/assistant.prf#line7

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            heimrich Karsten Heimrich
            gokcen.eraslan Gökcen Eraslan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes