Results 1 to 12 of 12

Thread: Problem compiling qt5-related software

  1. #1
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Problem compiling qt5-related software

    Hello!!

    I am sure this have came up earlier but I have yet to find a resolution for it.

    I have come across a problem to upgrade my gentoo system because of this; I dont think this is gentoo-specific, since very similar errors occur on many systems aparrently, however the difference is the paths in quotation-marks after:"The imported target "Qt5::Core" references the file" differ only for which I can see.

    I have heard that double-slashes is not the issue, however there is something missing and I don't know what.
    For sure I can submit the whole log, however I thought that perhaps someone recognises this very problem
    I just don't understand what it's looking fore here:

    Qt Code:
    1. ...
    2. -- Using system-installed ZLIB
    3. -- Found LibRHash: /usr/lib64/librhash.so
    4. -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
    5. -- Found CURL: /usr/lib64/libcurl.so (found version "7.55.1")
    6. -- Found EXPAT: /usr/lib64/libexpat.so (found version "2.2.1")
    7. -- Found LibArchive: /usr/lib64/libarchive.so (found suitable version "3.3.1", minimum required is "3.0.0")
    8. -- Looking for cbreak in /usr/lib64/libncurses.so
    9. -- Looking for cbreak in /usr/lib64/libncurses.so - found
    10. -- Looking for elf.h
    11. -- Looking for elf.h - found
    12. CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
    13. The imported target "Qt5::Core" references the file
    14.  
    15. "/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"
    16.  
    17. but this file does not exist. Possible reasons include:
    18.  
    19. * The file was deleted, renamed, or moved to another location.
    20.  
    21. * An install or uninstall procedure did not complete successfully.
    22.  
    23. * The installation package was faulty and contained
    24.  
    25. "/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
    26.  
    27. but not all the files it references.
    28.  
    29. Call Stack (most recent call first):
    30. /usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
    31. /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
    32. /usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
    33. /usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
    34. Source/QtDialog/CMakeLists.txt:9 (find_package)
    35. ...
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    Seems like line 15 is garbled - it contains the first part of the path twice. Look at line 27 of your file Qt5CoreConfig.cmake to see if there is an indication of what might cause the error.

    Is this error occurring in a CMake generate step, or later?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problem compiling qt5-related software

    Yes, the line 27 only indicates the case of a FATAL ERROR in case the ${file} does not fulfil, and I don't understand what file that is, in case that is the actual problem?

    fatal_error.jpg

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    I think you need to post the CMakelists.txt for the top level project, as well as the command line you are running when this error occurs. It looks to me like an environment or CMake variable that tells it where to look for Qt components is set incorrectly.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. #5
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problem compiling qt5-related software

    Qt Code:
    1. $ env|grep -i qt
    2. QT_SELECT=qt5
    3. QTDIR=/usr/lib64/qt5
    4. QMAKESPEC=/usr/lib64/qt5/mkspecs/linux-g++
    5. QT_GRAPHICSSYSTEM=raster
    To copy to clipboard, switch view to plain text mode 

    CMakelists.txt:
    Qt Code:
    1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
    2. # file Copyright.txt or https://cmake.org/licensing for details.
    3.  
    4. project(QtDialog)
    5. if(POLICY CMP0020)
    6. cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
    7. endif()
    8. CMake_OPTIONAL_COMPONENT(cmake-gui)
    9. find_package(Qt5Widgets QUIET)
    10. if (Qt5Widgets_FOUND)
    11. include_directories(${Qt5Widgets_INCLUDE_DIRS})
    12. add_definitions(${Qt5Widgets_DEFINITONS})
    13. macro(qt4_wrap_ui)
    14. qt5_wrap_ui(${ARGN})
    15. endmacro()
    16. macro(qt4_wrap_cpp)
    17. qt5_wrap_cpp(${ARGN})
    18. endmacro()
    19. macro(qt4_add_resources)
    20. qt5_add_resources(${ARGN})
    21. endmacro()
    22. set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
    23. set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
    24.  
    25. # Remove this when the minimum version of Qt is 4.6.
    26. add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
    27.  
    28. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
    29.  
    30. if(CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES)
    31. list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES})
    32. set_property(SOURCE CMakeSetup.cxx
    33. PROPERTY COMPILE_DEFINITIONS USE_QXcbIntegrationPlugin)
    34. endif()
    35.  
    36. # We need to install platform plugin and add qt.conf for Qt5 on Mac and Windows.
    37. # FIXME: This should be part of Qt5 CMake scripts, but unfortunatelly
    38. # Qt5 support is missing there.
    39. if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
    40. macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var)
    41. get_target_property(_qt_plugin_path "${_qt_plugin_name}" LOCATION)
    42. if(EXISTS "${_qt_plugin_path}")
    43. get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
    44. get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
    45. get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
    46. if(APPLE)
    47. set(_qt_plugin_dir "PlugIns")
    48. elseif(WIN32)
    49. set(_qt_plugin_dir "plugins")
    50. endif()
    51. set(_qt_plugin_dest "${_qt_plugin_dir}/${_qt_plugin_type}")
    52. install(FILES "${_qt_plugin_path}"
    53. DESTINATION "${_qt_plugin_dest}"
    54. ${COMPONENT})
    55. set(${_qt_plugins_var}
    56. "${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
    57. else()
    58. message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
    59. endif()
    60. endmacro()
    61. if(APPLE)
    62. install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
    63. file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
    64. "[Paths]\nPlugins = ${_qt_plugin_dir}\n")
    65. install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
    66. DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
    67. ${COMPONENT})
    68. elseif(WIN32)
    69. install_qt5_plugin("Qt5::QWindowsIntegrationPlugin" QT_PLUGINS)
    70. file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
    71. "[Paths]\nPlugins = ../${_qt_plugin_dir}\n")
    72. install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
    73. DESTINATION bin
    74. ${COMPONENT})
    75. endif()
    76. endif()
    77.  
    78. if(TARGET Qt5::Core)
    79. get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
    80. get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
    81. if(APPLE)
    82. get_filename_component(Qt_BIN_DIR "${Qt_BIN_DIR}" PATH)
    83. endif()
    84. endif()
    85. else()
    86. set(QT_MIN_VERSION "4.4.0")
    87. find_package(Qt4 REQUIRED)
    88. if(NOT QT4_FOUND)
    89. message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
    90. return()
    91. endif()
    92.  
    93. include(${QT_USE_FILE})
    94.  
    95. set(CMake_QT_LIBRARIES ${QT_LIBRARIES})
    96.  
    97. endif()
    98.  
    99. set(SRCS
    100. AddCacheEntry.cxx
    101. AddCacheEntry.h
    102. CMakeSetup.cxx
    103. CMakeSetupDialog.cxx
    104. CMakeSetupDialog.h
    105. FirstConfigure.cxx
    106. FirstConfigure.h
    107. QCMake.cxx
    108. QCMake.h
    109. QCMakeCacheView.cxx
    110. QCMakeCacheView.h
    111. QCMakeWidgets.cxx
    112. QCMakeWidgets.h
    113. RegexExplorer.cxx
    114. RegexExplorer.h
    115. WarningMessagesDialog.cxx
    116. WarningMessagesDialog.h
    117. )
    118. QT4_WRAP_UI(UI_SRCS
    119. CMakeSetupDialog.ui
    120. Compilers.ui
    121. CrossCompiler.ui
    122. AddCacheEntry.ui
    123. RegexExplorer.ui
    124. WarningMessagesDialog.ui
    125. )
    126. QT4_WRAP_CPP(MOC_SRCS
    127. AddCacheEntry.h
    128. Compilers.h
    129. CMakeSetupDialog.h
    130. FirstConfigure.h
    131. QCMake.h
    132. QCMakeCacheView.h
    133. QCMakeWidgets.h
    134. RegexExplorer.h
    135. WarningMessagesDialog.h
    136. )
    137. QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc)
    138.  
    139. set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
    140. if(WIN32)
    141. set(SRCS ${SRCS} CMakeSetup.rc)
    142. endif()
    143. if(APPLE)
    144. set(SRCS ${SRCS} CMakeSetup.icns)
    145. set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
    146. set_source_files_properties(CMakeSetup.icns PROPERTIES
    147. MACOSX_PACKAGE_LOCATION Resources)
    148. endif()
    149.  
    150. if(USE_LGPL)
    151. install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt
    152. DESTINATION ${CMAKE_DATA_DIR}/Licenses
    153. ${COMPONENT})
    154. set_property(SOURCE CMakeSetupDialog.cxx
    155. PROPERTY COMPILE_DEFINITIONS USE_LGPL="${USE_LGPL}")
    156. endif()
    157.  
    158. set(CMAKE_INCLUDE_CURRENT_DIR ON)
    159.  
    160. add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS} ${MANIFEST_FILE})
    161. target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})
    162.  
    163. if(APPLE)
    164. file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
    165. LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
    166.  
    167. set_target_properties(cmake-gui PROPERTIES
    168. OUTPUT_NAME CMake
    169. MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
    170. MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}"
    171. # TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}"
    172. MACOSX_BUNDLE_COPYRIGHT "${copyright_line}"
    173. MACOSX_BUNDLE_GUI_IDENTIFIER "org.cmake.cmake"
    174. )
    175.  
    176. # Create a symlink in the build tree to provide a "cmake-gui" next
    177. # to the "cmake" executable that refers to the application bundle.
    178. add_custom_command(TARGET cmake-gui POST_BUILD
    179. COMMAND ln -sf CMake.app/Contents/MacOS/CMake
    180. $<TARGET_FILE_DIR:cmake>/cmake-gui
    181. )
    182. endif()
    183. set(CMAKE_INSTALL_DESTINATION_ARGS
    184. BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" ${COMPONENT})
    185.  
    186. install(TARGETS cmake-gui
    187. RUNTIME DESTINATION bin ${COMPONENT}
    188. ${CMAKE_INSTALL_DESTINATION_ARGS})
    189.  
    190. if(UNIX AND NOT APPLE)
    191. foreach (size IN ITEMS 32 128)
    192. install(
    193. FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png"
    194. DESTINATION "${CMAKE_XDGDATA_DIR}/icons/hicolor/${size}x${size}/apps"
    195. ${COMPONENT}
    196. RENAME "CMakeSetup.png")
    197. endforeach ()
    198.  
    199. # install a desktop file so CMake appears in the application start menu
    200. # with an icon
    201. install(FILES CMake.desktop
    202. DESTINATION "${CMAKE_XDGDATA_DIR}/applications"
    203. ${COMPONENT})
    204. install(FILES cmakecache.xml
    205. DESTINATION "${CMAKE_XDGDATA_DIR}/mime/packages"
    206. ${COMPONENT})
    207. endif()
    208.  
    209. if(APPLE)
    210. install(CODE "
    211. execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
    212. WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)
    213. " ${COMPONENT})
    214. endif()
    215.  
    216. if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
    217. # install rules for including 3rd party libs such as Qt
    218. # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
    219. set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
    220. if(APPLE)
    221. set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
    222. endif()
    223. install(CODE "
    224. include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
    225. set(BU_CHMOD_BUNDLE_ITEMS ON)
    226. fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${Qt_BIN_DIR};${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
    227. " ${COMPONENT})
    228. endif()
    229.  
    230. set(CMAKE_PACKAGE_QTGUI TRUE)
    231. configure_file("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
    232. "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
    To copy to clipboard, switch view to plain text mode 


    Added after 4 minutes:


    And the rest which made the last post to long :-)

    Compillation; one of several packages to be compiled for qt5 support which ends up in the same way.
    Qt Code:
    1. Calculating dependencies .. ... done!
    2. [ebuild U ] dev-util/cmake-3.8.2::gentoo [3.7.2::gentoo] USE="ncurses qt5 -doc -emacs -server% -system-jsoncpp {-test}" 0 KiB
    3.  
    4. Total: 1 package (1 upgrade), Size of downloads: 0 KiB
    5.  
    6. ...shortened a bit...
    7.  
    8. >>> Configuring source in /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2 ...
    9. >>> Working in BUILD_DIR: "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build"
    10. cmake -C /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=no -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_DOC_DIR=/share/doc/cmake-3.8.2 -DCMAKE_MAN_DIR=/share/man -DCMAKE_DATA_DIR=/share/cmake -DSPHINX_MAN=no -DSPHINX_HTML=no -DBUILD_CursesDialog=yes -DCMake_ENABLE_SERVER_MODE=no -DCMAKE_USE_LIBUV=no -DBUILD_QtDialog=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=OFF -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/gentoo_toolchain.cmake /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2
    11. loading initial cache file /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/gentoo_common_config.cmake
    12. -- The C compiler identification is GNU 5.4.0
    13. -- The CXX compiler identification is GNU 5.4.0
    14. -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
    15. -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
    16.  
    17. ...shortened a bit more...
    18.  
    19. -- Checking whether C compiler has ptrdiff_t in stddef.h
    20. -- Checking whether C compiler has ptrdiff_t in stddef.h - yes
    21. -- Checking whether C compiler has ssize_t in unistd.h
    22. -- Checking whether C compiler has ssize_t in unistd.h - yes
    23. -- Checking whether CXX compiler has setenv
    24. -- Checking whether CXX compiler has setenv - yes
    25. -- Checking whether CXX compiler has unsetenv
    26. -- Checking whether CXX compiler has unsetenv - yes
    27. -- Checking whether CXX compiler has environ in stdlib.h
    28. -- Checking whether CXX compiler has environ in stdlib.h - no
    29. -- Checking whether CXX compiler has utimes
    30. -- Checking whether CXX compiler has utimes - yes
    31. -- Checking whether CXX compiler has utimensat
    32. -- Checking whether CXX compiler has utimensat - yes
    33. -- Checking whether CXX compiler struct stat has st_mtim member
    34. -- Checking whether CXX compiler struct stat has st_mtim member - yes
    35. -- Checking whether CXX compiler struct stat has st_mtimespec member
    36. -- Checking whether CXX compiler struct stat has st_mtimespec member - no
    37. -- Looking for include files sys/types.h, ifaddrs.h
    38. -- Looking for include files sys/types.h, ifaddrs.h - found
    39. -- Checking whether CXX compiler has rlimit64
    40. -- Checking whether CXX compiler has rlimit64 - yes
    41. -- Checking whether CXX compiler has atol
    42. -- Checking whether CXX compiler has atol - yes
    43. -- Checking whether CXX compiler has atoll
    44. -- Checking whether CXX compiler has atoll - yes
    45. -- Checking whether CXX compiler has _atoi64
    46. -- Checking whether CXX compiler has _atoi64 - no
    47. -- Looking for C++ include execinfo.h
    48. -- Looking for C++ include execinfo.h - found
    49. -- Checking whether backtrace works with this C++ compiler
    50. -- Checking whether backtrace works with this C++ compiler - yes
    51. -- Looking for C++ include dlfcn.h
    52. -- Looking for C++ include dlfcn.h - found
    53. -- Checking whether dladdr works with this C++ compiler
    54. -- Checking whether dladdr works with this C++ compiler - yes
    55. -- Looking for C++ include cxxabi.h
    56. -- Looking for C++ include cxxabi.h - found
    57. -- Checking whether cxxabi works with this C++ compiler
    58. -- Checking whether cxxabi works with this C++ compiler - yes
    59. -- Checking whether CXX compiler has getloadavg
    60. -- Checking whether CXX compiler has getloadavg - yes
    61. -- Checking whether <ext/stdio_filebuf.h> is available
    62. -- Checking whether <ext/stdio_filebuf.h> is available - yes
    63. -- Using system-installed BZIP2
    64. -- Using system-installed CURL
    65. -- Using system-installed EXPAT
    66. -- Using system-installed FORM
    67. -- Using system-installed LIBARCHIVE
    68. -- Using system-installed LIBLZMA
    69. -- Using system-installed LIBRHASH
    70. -- Using system-installed LIBUV
    71. -- Using system-installed ZLIB
    72. -- Found LibRHash: /usr/lib64/librhash.so
    73. -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
    74. -- Found CURL: /usr/lib64/libcurl.so (found version "7.55.1")
    75. -- Found EXPAT: /usr/lib64/libexpat.so (found version "2.2.1")
    76. -- Found LibArchive: /usr/lib64/libarchive.so (found suitable version "3.3.1", minimum required is "3.0.0")
    77. -- Looking for cbreak in /usr/lib64/libncurses.so
    78. -- Looking for cbreak in /usr/lib64/libncurses.so - found
    79. -- Looking for elf.h
    80. -- Looking for elf.h - found
    81. CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
    82. The imported target "Qt5::Core" references the file
    83.  
    84. "/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"
    85.  
    86. but this file does not exist. Possible reasons include:
    87.  
    88. * The file was deleted, renamed, or moved to another location.
    89.  
    90. * An install or uninstall procedure did not complete successfully.
    91.  
    92. * The installation package was faulty and contained
    93.  
    94. "/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
    95.  
    96. but not all the files it references.
    97.  
    98. Call Stack (most recent call first):
    99. /usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
    100. /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
    101. /usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
    102. /usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
    103. Source/QtDialog/CMakeLists.txt:9 (find_package)
    104.  
    105.  
    106. -- Configuring incomplete, errors occurred!
    107. See also "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/CMakeFiles/CMakeOutput.log".
    108. See also "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/CMakeFiles/CMakeError.log".
    109. * ERROR: dev-util/cmake-3.8.2::gentoo failed (configure phase):
    110. * cmake failed
    111. *
    112. * Call stack:
    113. * ebuild.sh, line 115: Called src_configure
    114. * environment, line 3383: Called cmake-utils_src_configure
    115. * environment, line 1010: Called die
    116. * The specific snippet of code:
    117. * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
    118. *
    119. * If you need support, post the output of `emerge --info '=dev-util/cmake-3.8.2::gentoo'`,
    120. * the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.8.2::gentoo'`.
    121. * The complete build log is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'.
    122. * The ebuild environment file is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/environment'.
    123. * Working directory: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build'
    124. * S: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2'
    125.  
    126. >>> Failed to emerge dev-util/cmake-3.8.2, Log file:
    127.  
    128. >>> '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'
    129.  
    130. * Messages for package dev-util/cmake-3.8.2:
    131.  
    132. * ERROR: dev-util/cmake-3.8.2::gentoo failed (configure phase):
    133. * cmake failed
    134. *
    135. * Call stack:
    136. * ebuild.sh, line 115: Called src_configure
    137. * environment, line 3383: Called cmake-utils_src_configure
    138. * environment, line 1010: Called die
    139. * The specific snippet of code:
    140. * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
    141. *
    142. * If you need support, post the output of `emerge --info '=dev-util/cmake-3.8.2::gentoo'`,
    143. * the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.8.2::gentoo'`.
    144. * The complete build log is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'.
    145. * The ebuild environment file is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/environment'.
    146. * Working directory: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build'
    147. * S: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2'
    To copy to clipboard, switch view to plain text mode 
    Last edited by jlindgren; 6th November 2017 at 05:21.

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    Change the environment variable "QMAKESPEC" to simply "linux-g++" (without the " marks, of course).
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  7. #7
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problem compiling qt5-related software

    I have tried changing that variable before but it didn't really get set, as the variable error is still exactly the same...

    Qt Code:
    1. #env|grep -i qmake
    2. QMAKESPEC=linux-g++
    3. #rm -r /var/tmp/portage
    4. #emerge -v cmake
    To copy to clipboard, switch view to plain text mode 

    The change was nothing
    Error still points to "/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"

    Am I missing something?

  8. #8
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    I understand now - you are trying to build CMake itself (or at least the GUI driver for it). I think you look on Kitware's forum for an answer, and if you don't find one, ask there. It is likely someone there will know the answer.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  9. #9
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problem compiling qt5-related software

    No, this error occurs on several packages, but cmake was only one of those I tried to upgrade. Another I tried was phonon, with that same message!

    This is when trying to compile phonon. (Qmakespec is still only linux-g++ )

    Qt Code:
    1. * IMPORTANT: 6 news items need reading for repository 'gentoo'.
    2. * Use eselect news read to view new items.
    3.  
    4.  
    5. These are the packages that would be merged, in order:
    6.  
    7. Calculating dependencies ..... done!
    8. [ebuild N ] media-libs/phonon-4.9.1-r1::gentoo USE="pulseaudio qt5 vlc -debug -designer -gstreamer -qt4" ABI_X86="32 (64) (-x32)" 0 KiB
    9. [ebuild N ] media-libs/phonon-vlc-0.9.1-r1::gentoo USE="qt5 -debug -qt4" 0 KiB
    10.  
    11. Total: 2 packages (2 new), Size of downloads: 0 KiB
    12.  
    13.  
    14. >>> Verifying ebuild manifests
    15.  
    16. >>> Emerging (1 of 2) media-libs/phonon-4.9.1-r1::gentoo
    17. * phonon-4.9.1.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
    18. >>> Unpacking source...
    19. >>> Unpacking phonon-4.9.1.tar.xz to /var/tmp/portage/media-libs/phonon-4.9.1-r1/work
    20. >>> Source unpacked in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work
    21. >>> Preparing source in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1 ...
    22. * Applying phonon-4.7.0-plugin-install.patch ...
    23. [ ok ]
    24. >>> Source prepared.
    25. >>> Configuring source in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1 ...
    26. * qt5: running myconfigure
    27. >>> Working in BUILD_DIR: "/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5"
    28. cmake -C /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DPHONON_BUILD_DESIGNER_PLUGIN=no -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE -DWITH_GLIB2=yes -DWITH_PulseAudio=yes -DWITH_QZeitgeist=OFF -DQT_QMAKE_EXECUTABLE=/usr/lib64/qt5/bin/qmake -DPHONON_BUILD_PHONON4QT5=ON -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/gentoo_toolchain.cmake /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1
    29. loading initial cache file /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/gentoo_common_config.cmake
    30. -- The C compiler identification is GNU 5.4.0
    31. -- The CXX compiler identification is GNU 5.4.0
    32. -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
    33. -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
    34. -- Detecting C compiler ABI info
    35. -- Detecting C compiler ABI info - done
    36. -- Detecting C compile features
    37. -- Detecting C compile features - done
    38. -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
    39. -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
    40. -- Detecting CXX compiler ABI info
    41. -- Detecting CXX compiler ABI info - done
    42. -- Detecting CXX compile features
    43. -- Detecting CXX compile features - done
    44. -- Enabling backend state machine validation.
    45. CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
    46. The imported target "Qt5::Core" references the file
    47.  
    48. "/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"
    49.  
    50. but this file does not exist. Possible reasons include:
    51.  
    52. * The file was deleted, renamed, or moved to another location.
    53.  
    54. * An install or uninstall procedure did not complete successfully.
    55.  
    56. * The installation package was faulty and contained
    57.  
    58. "/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
    59.  
    60. but not all the files it references.
    61.  
    62. Call Stack (most recent call first):
    63. /usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
    64. /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
    65. cmake/PhononQt5.cmake:28 (find_package)
    66. cmake/FindPhononInternal.cmake:107 (include)
    67. CMakeLists.txt:47 (include)
    68.  
    69.  
    70. -- Configuring incomplete, errors occurred!
    71. See also "/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/CMakeFiles/CMakeOutput.log".
    72. * ERROR: media-libs/phonon-4.9.1-r1::gentoo failed (configure phase):
    73. * cmake failed
    74. *
    75. * Call stack:
    76. * ebuild.sh, line 115: Called src_configure
    77. * environment, line 3787: Called multibuild_foreach_variant 'myconfigure'
    78. * environment, line 2694: Called _multibuild_run 'myconfigure'
    79. * environment, line 2692: Called myconfigure
    80. * environment, line 3783: Called multilib_src_configure
    81. * environment, line 3270: Called cmake-utils_src_configure
    82. * environment, line 985: Called die
    83. * The specific snippet of code:
    84. * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
    85. *
    86. * If you need support, post the output of `emerge --info '=media-libs/phonon-4.9.1-r1::gentoo'`,
    87. * the complete build log and the output of `emerge -pqv '=media-libs/phonon-4.9.1-r1::gentoo'`.
    88. * The complete build log is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'.
    89. * The ebuild environment file is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/environment'.
    90. * Working directory: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5'
    91. * S: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1'
    92.  
    93. >>> Failed to emerge media-libs/phonon-4.9.1-r1, Log file:
    94.  
    95. >>> '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'
    96.  
    97. * Messages for package media-libs/phonon-4.9.1-r1:
    98.  
    99. * ERROR: media-libs/phonon-4.9.1-r1::gentoo failed (configure phase):
    100. * cmake failed
    101. *
    102. * Call stack:
    103. * ebuild.sh, line 115: Called src_configure
    104. * environment, line 3787: Called multibuild_foreach_variant 'myconfigure'
    105. * environment, line 2694: Called _multibuild_run 'myconfigure'
    106. * environment, line 2692: Called myconfigure
    107. * environment, line 3783: Called multilib_src_configure
    108. * environment, line 3270: Called cmake-utils_src_configure
    109. * environment, line 985: Called die
    110. * The specific snippet of code:
    111. * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
    112. *
    113. * If you need support, post the output of `emerge --info '=media-libs/phonon-4.9.1-r1::gentoo'`,
    114. * the complete build log and the output of `emerge -pqv '=media-libs/phonon-4.9.1-r1::gentoo'`.
    115. * The complete build log is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'.
    116. * The ebuild environment file is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/environment'.
    117. * Working directory: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5'
    118. * S: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1'
    To copy to clipboard, switch view to plain text mode 

  10. #10
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    Maybe this will help; see the "simple fix" near the end of the post. Even though the original post concerns a Window Qt installation, the error is exactly the same as you are having, so the fix should work for you also.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  11. #11
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problem compiling qt5-related software

    Quote Originally Posted by d_stranz View Post
    Maybe this will help; see the "simple fix" near the end of the post. Even though the original post concerns a Window Qt installation, the error is exactly the same as you are having, so the fix should work for you also.
    Fantastic thank you very much!!
    It was just as simple fix as I thought it would be, only of course I didn't know how to find it... My only way out would pretty much be to remove /usr and rebuild the system WITHOUT knowing what was causing the error.

  12. #12
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem compiling qt5-related software

    According to the bug report, this has been fixed in Qt 5.9.2, so upgrading Qt and rebuilding might be worth it if you want to avoid messing with your Qt files.

    I tend to fix a problem, update, then see the same problem again. Meanwhile, I have forgotten what I did to fix it.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Singal and Slot related simple problem!!!
    By eklavay_tonoy in forum Newbie
    Replies: 3
    Last Post: 29th September 2015, 18:49
  2. CSS Related Problem
    By GabrielGray in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2011, 06:19
  3. Multi-thread related problem,help me
    By mendynew in forum Qt Programming
    Replies: 2
    Last Post: 3rd November 2008, 04:02
  4. Problem related exiting the thread
    By raghvendramisra in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2008, 11:10
  5. Problem related to porting from QT3 to QT4 in list items
    By rohitjun in forum Qt Programming
    Replies: 5
    Last Post: 1st June 2007, 10:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.