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

automoc generates wrong #includes for projects in a symlinked path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.5.1
    • Build tools: moc
    • None
    • Linux, fedora 23, i686.

    Description

      project "kig" uses cmake and automoc. My local copy of the git
      sources are located in a folder that I reach following a symlink
      (it resides in a local partition whereas my home is on an NFS-mounted filesystem).

      after a cmake and then a "make", the generated "moc*" files contain
      an "#include" like this:

      #include "../../../../../misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h"

      There is a wrong number of ".." and the path does not work.
      using "make VERBOSE=1 kigpart_automoc" I noticed the following command is issued:

      /usr/lib/qt5/bin/moc -I/home/matem/paolini/Git/kdeedu/kig/modes [...] -o /home/matem/paolini/Git/kdeedu/kig/moc_popup.cpp /home/misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h

      where the [...] part contains many more -I and various options. Notice that "/home/matem/paolini/Git/" and "/home/misc/euclide/paolini/Git/" point to the same place, the first through the symlink "Git", the second is the physical path.
      I guess that then "moc" tries hard to walk (with a relative path) from
      one path to the other, but there is no way to successfully climb up
      a path with a symlink in it using the ".." directory.

      I am new to automoc, so no idea where the problem is.

      I previously opened a kde bug for this issue:
      https://bugs.kde.org/show_bug.cgi?id=360611

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            paolini Maurizio Paolini
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes