Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Performing Test Qt5Gui_PRIVATE_HEADER_FOUND - Failed
Forum Updated to NodeBB v4.3 + New Features

Performing Test Qt5Gui_PRIVATE_HEADER_FOUND - Failed

Scheduled Pinned Locked Moved Solved Qt WebKit
26 Posts 2 Posters 8.1k Views 2 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.
  • K Offline
    K Offline
    Konstantin Tokarev
    wrote on last edited by
    #14

    By chance, are you using custom mkspec when building Qt? Assuming that Qt is built with the same compiler

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RaymondH
      wrote on last edited by
      #15

      I have resolved the issue with the undefined references to the three libraries as indicated above.

      However, though that was fixed, I now do indeed have an issue with the private headers not found, as shown below.

      I shouldn't need to explicitly add the private header directories to my INCLUDE environment variables, should I? There would potentially be many of them. I'd expect them to be found automatically in some way... How is this done?

      From the CMakeError.log file:

      /opt/anss/bin/g++   -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -DQt5Gui_PRIVATE_HEADER_FOUND -I/home/staff/rmhoffma/Qt/QtBuildBin/include -I/home/staff/rmhoffma/Qt/QtBuildBin/include/QtGui -I/home/staff/rmhoffma/Qt/QtBuildBin/include/QtCore -I/home/staff/rmhoffma/Qt/QtBuildBin/./mkspecs/linux-g++    -fPIC -o CMakeFiles/cmTryCompileExec1880278613.dir/src.cxx.o -c /home/staff/rmhoffma/Qt/QtBuilds/qtwebkitBuild/release/CMakeFiles/CMakeTmp/src.cxx
      /home/staff/rmhoffma/Qt/QtBuilds/qtwebkitBuild/release/CMakeFiles/CMakeTmp/src.cxx:2:42: fatal error: private/qhexstring_p.h: No such file or directory
               #include <private/qhexstring_p.h>
                                                ^
      compilation terminated.
      gmake[2]: *** [CMakeFiles/cmTryCompileExec1880278613.dir/src.cxx.o] Error 1
      gmake[2]: Leaving directory `/home/staff/rmhoffma/Qt/QtBuilds/qtwebkitBuild/release/CMakeFiles/CMakeTmp'
      gmake[1]: *** [cmTryCompileExec1880278613/fast] Error 2
      gmake[1]: Leaving directory `/home/staff/rmhoffma/Qt/QtBuilds/qtwebkitBuild/release/CMakeFiles/CMakeTmp'
      
      Source file was:
      
              #include <private/qhexstring_p.h>
              int main() { return 0; }
      

      Thanks for any assistance...

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Konstantin Tokarev
        wrote on last edited by
        #16

        CMake caches results of compilation tests in build directory (in CMakeCache.txt file), so I guess that you've fixed issue with unresolved libraries successfully but didn't clear cache after that

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RaymondH
          wrote on last edited by
          #17

          I delete everything from my build directory before running make, including any CMakeCache.txt file. Unless there is another location that files are stored on building, I believe I'm starting with a clean slate.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Konstantin Tokarev
            wrote on last edited by
            #18

            @RaymondH said in Performing Test Qt5Gui_PRIVATE_HEADER_FOUND - Failed:

            -DQt5Gui_PRIVATE_HEADER_FOUND

            What is in CMakeError.log if you don't add -DQt5Gui_PRIVATE_HEADER_FOUND?

            1 Reply Last reply
            0
            • R Offline
              R Offline
              RaymondH
              wrote on last edited by RaymondH
              #19

              This is an automated script - i.e. it's configuring things using the OptionsQt.cmake file. I am not adding any parameters manually. How do I remove parameters that I didn't add and are added atomatically?

              1 Reply Last reply
              0
              • R Offline
                R Offline
                RaymondH
                wrote on last edited by RaymondH
                #20
                This post is deleted!
                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  Konstantin Tokarev
                  wrote on last edited by
                  #21

                  Ok, seems like you are just missing Qt5Gui_PRIVATE_INCLUDE_DIRS cmake variable in Qt5GuiConfig.cmake now

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    RaymondH
                    wrote on last edited by
                    #22

                    So are you suggesting I make changes to the Qt installation to make my compilation work? I wouldn't think that should be necessary...

                    The file is located at: <QtInstall>/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake

                    There is logic in that file that is supposed to set the variable, but it is by-passed during this build because of the following conditional:

                    if (NOT TARGET Qt5::Gui)

                    Apparently, when this configuration step happens, the TARGET is Qt5::Gui, and hence this conditional branch is never entered.

                    However, removing this conditional causes the QtWebKit configuration to fail in many many other ways, so it's not as simple as removing it.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      Konstantin Tokarev
                      wrote on last edited by
                      #23

                      Apparently, when this configuration step happens, the TARGET is Qt5::Gui

                      No, this condition means "if target Qt5::Gui wasn't defined yet" (sort of guard against double inclusion)

                      Qt5Gui_PRIVATE_INCLUDE_DIRS may be empty if you are using shadow build when building Qt, see https://bugreports.qt.io/browse/QTBUG-37417

                      1 Reply Last reply
                      1
                      • R Offline
                        R Offline
                        RaymondH
                        wrote on last edited by
                        #24

                        Apparently a former build, or something, created the following files, which show up as new files when doing a git status command:

                                Source/JavaScriptCore/disassembler/udis86/ud_optable.pyc
                                Source/WebCore/inspector/CodeGeneratorInspectorStrings.pyc
                                Source/WebKit2/Scripts/webkit2/__init__.pyc
                                Source/WebKit2/Scripts/webkit2/messages.pyc
                                Source/WebKit2/Scripts/webkit2/model.pyc
                                Source/WebKit2/Scripts/webkit2/parser.pyc
                        

                        Once I delete these files, and reconfigure, the problem seems to have gone away.

                        Thanks Konstantin for your time.

                        K 1 Reply Last reply
                        0
                        • R RaymondH

                          Apparently a former build, or something, created the following files, which show up as new files when doing a git status command:

                                  Source/JavaScriptCore/disassembler/udis86/ud_optable.pyc
                                  Source/WebCore/inspector/CodeGeneratorInspectorStrings.pyc
                                  Source/WebKit2/Scripts/webkit2/__init__.pyc
                                  Source/WebKit2/Scripts/webkit2/messages.pyc
                                  Source/WebKit2/Scripts/webkit2/model.pyc
                                  Source/WebKit2/Scripts/webkit2/parser.pyc
                          

                          Once I delete these files, and reconfigure, the problem seems to have gone away.

                          Thanks Konstantin for your time.

                          K Offline
                          K Offline
                          Konstantin Tokarev
                          wrote on last edited by
                          #25

                          @RaymondH This *.pyc files could not have any impact on cmake stage

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            RaymondH
                            wrote on last edited by
                            #26

                            I don't know. Regardless, removing these files makes my problem go away.

                            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