Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-560

QtWebEngine doesn't build cleanly with PIE

XMLWordPrintable

      Currently, QtWebEngine will fail to build when security flags (PIE in particular) are enabled. This is this error you will hit:

       

      error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
      _|  #  error "You must build your code with position independent code if Qt was built with -reduce-relocations. "_
      |     ^~~~~

       

      If you add -fPIC to the QMake flags (or set linux_fpic=1 in the gyp flags), this error will go away but the build will fail later on with linker errors due to some but not all components being built with -fPIC. I spent a bit of time on this but it will need more time for a real fix.

       

      QtWebEngine bundles in many third-party libraries using gyp, and my best guess is that some of the libraries don't see the -fPIC flags, so you get a mismatch between binaries with and without -fPIC.

       

      Finally, QtWebEngine currently skips the QA check for text relocations, probably do to this issue. Text relocations are going to cause performance degradation and memory more memory usage, so that's another reason to fix the issue besides security. Once the issue is fixed, we should try re-enabling the QA check, and my best guess is it will succeed.

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

            ltilve Lorenzo Tilve
            mkelly Martin Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: