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

Configure script copies the default mkspec instead of making a symbolic link, which causes symbian-sbsv2 mkspec scope checks to fail

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.4
    • 4.7.2
    • Build System
    • symbian-sbsv2 in linux
    • c029fa9db9949f7620f5cd07341bbd076a9dfedb

    Description

      Apparently Symbian build system cannot handle symbolic links, so the configure script copies the default mkspec over instead of creating a symbolic link, when symbian-sbsv2 spec is used:

          if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then
      #Link is not supported for Symbian build system
              cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
          else
              ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
          fi
      

      The default spec not being a symbolic link causes a failure to correctly detect symbian-sbsv2 scopes when running qmake, because it expects a symbolic link in QMakeProject::isActiveConfig():

      #ifdef Q_OS_UNIX
          else if(spec == "default") {
              static char *buffer = NULL;
              if(!buffer) {
                  buffer = (char *)malloc(1024);
                  qmakeAddCacheClear(qmakeFreeCacheClear, (void**)&buffer);
              }
              int l = readlink(Option::mkfile::qmakespec.toLatin1(), buffer, 1024);
              if(l != -1) {
                  buffer[l] = '\0';
                  QString r = buffer;
                  if(r.lastIndexOf('/') != -1)
                      r = r.mid(r.lastIndexOf('/') + 1);
                  if((regex && re.exactMatch(r)) || (!regex && r == x))
                      return true;
              }
          }
      #elif defined(Q_OS_WIN)
      

      The current workaround for this problem is to manually add "CONFIG += symbian-sbsv2" to the beginning of mkspecs/default/qmake.conf after running configure, which is of course not an acceptable solution in the long run. If configure script could do this automatically, then no qmake changes would be required.

      Note that on Windows side where symbolic links are not allowed, this issue is handled by addition of QMAKESPEC_ORIGINAL value into the mkspecs/default/qmake.conf and including the original conf via relative include. The same relative inclusion of original is done for all ".conf", ".prf", and ".h" files under each mkspec. Doing these relative inclusions might be somewhat difficult to achieve with the configure script on linux side. Luckily they are not actually necessary for symbian-sbsv2 spec, which could happily work off copies of originals, as the default and symbian-sbsv2 mkspecs are on the same level in directory tree.

      Attachments

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

        Activity

          People

            axisnokia axisnokia (Inactive)
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes