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

qmake goes into a recursive loop if /usr/lib/.libs is present

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0 Beta
    • 5.5.0 RC
    • Build tools: qmake
    • None
    • Linux, 64bit , gcc 4.9.2
    • ba9f4942b0813f135d2c7208ea27a03cd5c1cae5

    Description

      On my system I've noticed that qt5 qmake goes into a recursive loop all the time.
      I've tracked this problem to code in
      void UnixMakefileGenerator::processPrlFiles().

      The following code causes the problem:

                          QString lib = opt.right(opt.length() - 2);
                          QString prl_ext = project->first(ProKey("QMAKE_" + lib.toUpper() + "_SUFFIX")).toQString();
                          for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
                              const QMakeLocalFileName &lfn = libdirs[dep_i];
                              if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
                                  QString la = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
                                  if (exists(la) && QFile::exists(lfn.local() + "/.libs")) {
                                      QString dot_libs = lfn.real() + Option::dir_sep + ".libs";
                                      l.append("-L" + dot_libs);
                                      libdirs.insert(libidx++, QMakeLocalFileName(dot_libs));
                                  }
                              }
      

      On my system I get the following:
      lib is GL so la becomes /usr/lib/libGL.la and when lfn which seems to be /url/lib for me + .libs exists it will add /usr/lib/.libs to libdirs. On the next loop the same will happen and /usr/lib/.libs will just be added recursively forever.

      I think the easiest fix for this would be for look if what's going to be added to libdirs wasn't already added before.

      Attachments

        For Gerrit Dashboard: QTBUG-46910
        # Subject Branch Project Status CR V

        Activity

          People

            buddenha Oswald Buddenhagen
            mcirsta Marius Cirsta
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes