Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qmake does not seem to recognize linux-g++ specification on openSuse 12.1
Forum Updated to NodeBB v4.3 + New Features

Qmake does not seem to recognize linux-g++ specification on openSuse 12.1

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 16.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    presencia
    wrote on last edited by
    #1

    Hi everyone,

    This is actually a copy of my question in the tools forum ("link":http://qt-project.org/forums/viewthread/18005/). I wasn't sure if that was the right one and nobody answered, so I'm reposting it here.
    I am new to qmake, so maybe I am missing something simple here, but searching the web didn't help me.

    I am working on a Qt project set up to be built using qmake. It has a .pro file which contains a block like
    @ linux-g++ { ... }
    @

    for settings specific to a linux/g++ environment.

    I tried running qmake on that file from two different systems which should both conform to the linux-g++ specification. One went fine, the other didn't:

    1. Everything looks good on a fresh install of Fedora 17 with Qt and g++ installed. I have to invoke "qmake-qt4" for that and it builds the Makefile as expected. "qmake-qt4 -v" prints
      "QMake version 2.01a
      Using Qt version 4.8.2 in /usr/lib64"
    2. The linux-g++ block is not entered by qmake on a machine with a fresh install of openSuse 12.1. Qt and g++ are installed here, too. "qmake -v prints"
      "QMake version 2.01a
      Using Qt version 4.7.4 in /usr/lib64"

    On the openSuse setup, when I just run "qmake" it just creates the Makefile ignoring the stuff inside the linux-g++ block. There is no warning on the command line. In order to see what the problem is, I ran "qmake -d 2>&1" which prints out many lines, including the line
    "DEBUG 1: Project Parser: <path_to_my_dot_pro_file>:84 : Test (linux-g++) failed."

    I tried to find out how qmake finds out about the current system. According to the "documentation":http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html, the QMAKESPEC environment variable should contain this information. However, on both of my systems "echo $QMAKESPEC" prints nothing and "qmake(-qt4) -query QMAKESPEC" prints "∗∗Unknown∗∗". The debugging output of qmake -d prints (among other lines)
    "DEBUG 1: QMAKESPEC conf: reading /usr/lib64/qt4/mkspecs/default/qmake.conf" on Fedora and
    "DEBUG 1: QMAKESPEC conf: reading /usr/share/qt4//mkspecs/default/qmake.conf" on openSuse.
    On Fedora, the "default" folder is a symbolic link to "linux-g++" and on openSuse it points to "linux-g++-64". Both lookes fine to me.

    So my question is: Why does qmake not recognize the linux-g++ specification on openSuse when it does on Fedora? What am I missing? What can I try to find out? Should I file a bug report? Does this look like a bug in qmake or in openSuse?

    Any help would be appreciated. I will be happy to provide additional information if needed.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mkuettler
      wrote on last edited by
      #2

      The documentation says "You can test for any other platform-compiler combination as long as a specification exists for it in the mkspecs directory." Is there a linux-g++ directory in the mkspecs folder in your SuSe installation?
      On my Kubuntu machine there is /usr/share/qt4/mkspecs/linux-g++, and it was installed by the package qt4-qmake. If you have no such file in SuSe you could try to reinstall the corresponding package. If that does not help the folder might either be missing on purpose (maybe someone thought that linux-g++-32 and linux-g++-64 should be used? I don't know), or there is a bug in the package. But I would not assume that until I know more, although it seems to me that the directory should be there.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        presencia
        wrote on last edited by
        #3

        I have the folder /usr/share/qt4/mkspecs/linux-g++, just as on your system. It contains the files qmake.conf and qplatformdefs.h. However, the default configuration seems to be read from the linux-g++-64 folder. Can this be a problem? The linux-g++/qmake.conf file reads
        @#

        qmake configuration for linux-g++

        MAKEFILE_GENERATOR = UNIX
        TARGET_PLATFORM = unix
        TEMPLATE = app
        CONFIG += qt warn_on release incremental link_prl
        QT += core gui
        QMAKE_INCREMENTAL_STYLE = sublib

        include(../common/g++.conf)
        include(../common/linux.conf)
        load(qt_config)
        @

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mkuettler
          wrote on last edited by
          #4

          I'm afraid I don't know what might cause the problem then. My /usr/share/qt4/mkspecs/default is a symlink to linux-g++-64 too, so that should not be a problem. Sorry.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dbzhang800
            wrote on last edited by
            #5

            [quote author="presencia" date="1340096980"]
            On Fedora, the "default" folder is a symbolic link to "linux-g++" and on openSuse it points to "linux-g++-64". Both lookes fine to me.

            [/quote]

            [quote author="presencia" date="1340100971"]I have the folder /usr/share/qt4/mkspecs/linux-g++, just as on your system. It contains the files qmake.conf and qplatformdefs.h. However, the default configuration seems to be read from the linux-g++-64 folder. Can this be a problem?
            [/quote]

            Yes, clear now, what you want is

            @
            linux-g++* { ... }
            @

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved