PDA

View Full Version : Problem compiling qt5-related software



jlindgren
3rd November 2017, 11:57
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:



...
-- Using system-installed ZLIB
-- Found LibRHash: /usr/lib64/librhash.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found CURL: /usr/lib64/libcurl.so (found version "7.55.1")
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.2.1")
-- Found LibArchive: /usr/lib64/libarchive.so (found suitable version "3.3.1", minimum required is "3.0.0")
-- Looking for cbreak in /usr/lib64/libncurses.so
-- Looking for cbreak in /usr/lib64/libncurses.so - found
-- Looking for elf.h
-- Looking for elf.h - found
CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
The imported target "Qt5::Core" references the file

"/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

"/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

but not all the files it references.

Call Stack (most recent call first):
/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
/usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
/usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
Source/QtDialog/CMakeLists.txt:9 (find_package)
...

d_stranz
3rd November 2017, 15:39
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?

jlindgren
5th November 2017, 19:17
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?

12656

d_stranz
6th November 2017, 01:48
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.

jlindgren
6th November 2017, 04:21
$ env|grep -i qt
QT_SELECT=qt5
QTDIR=/usr/lib64/qt5
QMAKESPEC=/usr/lib64/qt5/mkspecs/linux-g++
QT_GRAPHICSSYSTEM=raster

CMakelists.txt:


# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

project(QtDialog)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
endif()
CMake_OPTIONAL_COMPONENT(cmake-gui)
find_package(Qt5Widgets QUIET)
if (Qt5Widgets_FOUND)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
add_definitions(${Qt5Widgets_DEFINITONS})
macro(qt4_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
macro(qt4_wrap_cpp)
qt5_wrap_cpp(${ARGN})
endmacro()
macro(qt4_add_resources)
qt5_add_resources(${ARGN})
endmacro()
set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})

# Remove this when the minimum version of Qt is 4.6.
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")

if(CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES )
list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES} )
set_property(SOURCE CMakeSetup.cxx
PROPERTY COMPILE_DEFINITIONS USE_QXcbIntegrationPlugin)
endif()

# We need to install platform plugin and add qt.conf for Qt5 on Mac and Windows.
# FIXME: This should be part of Qt5 CMake scripts, but unfortunatelly
# Qt5 support is missing there.
if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var)
get_target_property(_qt_plugin_path "${_qt_plugin_name}" LOCATION)
if(EXISTS "${_qt_plugin_path}")
get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
if(APPLE)
set(_qt_plugin_dir "PlugIns")
elseif(WIN32)
set(_qt_plugin_dir "plugins")
endif()
set(_qt_plugin_dest "${_qt_plugin_dir}/${_qt_plugin_type}")
install(FILES "${_qt_plugin_path}"
DESTINATION "${_qt_plugin_dest}"
${COMPONENT})
set(${_qt_plugins_var}
"${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTA LL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
else()
message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
endif()
endmacro()
if(APPLE)
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = ${_qt_plugin_dir}\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
${COMPONENT})
elseif(WIN32)
install_qt5_plugin("Qt5::QWindowsIntegrationPlugin" QT_PLUGINS)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = ../${_qt_plugin_dir}\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION bin
${COMPONENT})
endif()
endif()

if(TARGET Qt5::Core)
get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
if(APPLE)
get_filename_component(Qt_BIN_DIR "${Qt_BIN_DIR}" PATH)
endif()
endif()
else()
set(QT_MIN_VERSION "4.4.0")
find_package(Qt4 REQUIRED)
if(NOT QT4_FOUND)
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
return()
endif()

include(${QT_USE_FILE})

set(CMake_QT_LIBRARIES ${QT_LIBRARIES})

endif()

set(SRCS
AddCacheEntry.cxx
AddCacheEntry.h
CMakeSetup.cxx
CMakeSetupDialog.cxx
CMakeSetupDialog.h
FirstConfigure.cxx
FirstConfigure.h
QCMake.cxx
QCMake.h
QCMakeCacheView.cxx
QCMakeCacheView.h
QCMakeWidgets.cxx
QCMakeWidgets.h
RegexExplorer.cxx
RegexExplorer.h
WarningMessagesDialog.cxx
WarningMessagesDialog.h
)
QT4_WRAP_UI(UI_SRCS
CMakeSetupDialog.ui
Compilers.ui
CrossCompiler.ui
AddCacheEntry.ui
RegexExplorer.ui
WarningMessagesDialog.ui
)
QT4_WRAP_CPP(MOC_SRCS
AddCacheEntry.h
Compilers.h
CMakeSetupDialog.h
FirstConfigure.h
QCMake.h
QCMakeCacheView.h
QCMakeWidgets.h
RegexExplorer.h
WarningMessagesDialog.h
)
QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc)

set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
if(WIN32)
set(SRCS ${SRCS} CMakeSetup.rc)
endif()
if(APPLE)
set(SRCS ${SRCS} CMakeSetup.icns)
set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
set_source_files_properties(CMakeSetup.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
endif()

if(USE_LGPL)
install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt
DESTINATION ${CMAKE_DATA_DIR}/Licenses
${COMPONENT})
set_property(SOURCE CMakeSetupDialog.cxx
PROPERTY COMPILE_DEFINITIONS USE_LGPL="${USE_LGPL}")
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)

add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS} ${MANIFEST_FILE})
target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})

if(APPLE)
file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")

set_target_properties(cmake-gui PROPERTIES
OUTPUT_NAME CMake
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}"
# TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}"
MACOSX_BUNDLE_COPYRIGHT "${copyright_line}"
MACOSX_BUNDLE_GUI_IDENTIFIER "org.cmake.cmake"
)

# Create a symlink in the build tree to provide a "cmake-gui" next
# to the "cmake" executable that refers to the application bundle.
add_custom_command(TARGET cmake-gui POST_BUILD
COMMAND ln -sf CMake.app/Contents/MacOS/CMake
$<TARGET_FILE_DIR:cmake>/cmake-gui
)
endif()
set(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" ${COMPONENT})

install(TARGETS cmake-gui
RUNTIME DESTINATION bin ${COMPONENT}
${CMAKE_INSTALL_DESTINATION_ARGS})

if(UNIX AND NOT APPLE)
foreach (size IN ITEMS 32 128)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png"
DESTINATION "${CMAKE_XDGDATA_DIR}/icons/hicolor/${size}x${size}/apps"
${COMPONENT}
RENAME "CMakeSetup.png")
endforeach ()

# install a desktop file so CMake appears in the application start menu
# with an icon
install(FILES CMake.desktop
DESTINATION "${CMAKE_XDGDATA_DIR}/applications"
${COMPONENT})
install(FILES cmakecache.xml
DESTINATION "${CMAKE_XDGDATA_DIR}/mime/packages"
${COMPONENT})
endif()

if(APPLE)
install(CODE "
execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)
" ${COMPONENT})
endif()

if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
# install rules for including 3rd party libs such as Qt
# if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
if(APPLE)
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
endif()
install(CODE "
include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${Qt_BIN_DIR};${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
" ${COMPONENT})
endif()

set(CMAKE_PACKAGE_QTGUI TRUE)
configure_file("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
"${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)


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.


Calculating dependencies .. ... done!
[ebuild U ] dev-util/cmake-3.8.2::gentoo [3.7.2::gentoo] USE="ncurses qt5 -doc -emacs -server% -system-jsoncpp {-test}" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

...shortened a bit...

>>> Configuring source in /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build"
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
loading initial cache file /var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works

...shortened a bit more...

-- Checking whether C compiler has ptrdiff_t in stddef.h
-- Checking whether C compiler has ptrdiff_t in stddef.h - yes
-- Checking whether C compiler has ssize_t in unistd.h
-- Checking whether C compiler has ssize_t in unistd.h - yes
-- Checking whether CXX compiler has setenv
-- Checking whether CXX compiler has setenv - yes
-- Checking whether CXX compiler has unsetenv
-- Checking whether CXX compiler has unsetenv - yes
-- Checking whether CXX compiler has environ in stdlib.h
-- Checking whether CXX compiler has environ in stdlib.h - no
-- Checking whether CXX compiler has utimes
-- Checking whether CXX compiler has utimes - yes
-- Checking whether CXX compiler has utimensat
-- Checking whether CXX compiler has utimensat - yes
-- Checking whether CXX compiler struct stat has st_mtim member
-- Checking whether CXX compiler struct stat has st_mtim member - yes
-- Checking whether CXX compiler struct stat has st_mtimespec member
-- Checking whether CXX compiler struct stat has st_mtimespec member - no
-- Looking for include files sys/types.h, ifaddrs.h
-- Looking for include files sys/types.h, ifaddrs.h - found
-- Checking whether CXX compiler has rlimit64
-- Checking whether CXX compiler has rlimit64 - yes
-- Checking whether CXX compiler has atol
-- Checking whether CXX compiler has atol - yes
-- Checking whether CXX compiler has atoll
-- Checking whether CXX compiler has atoll - yes
-- Checking whether CXX compiler has _atoi64
-- Checking whether CXX compiler has _atoi64 - no
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - found
-- Checking whether backtrace works with this C++ compiler
-- Checking whether backtrace works with this C++ compiler - yes
-- Looking for C++ include dlfcn.h
-- Looking for C++ include dlfcn.h - found
-- Checking whether dladdr works with this C++ compiler
-- Checking whether dladdr works with this C++ compiler - yes
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Checking whether cxxabi works with this C++ compiler
-- Checking whether cxxabi works with this C++ compiler - yes
-- Checking whether CXX compiler has getloadavg
-- Checking whether CXX compiler has getloadavg - yes
-- Checking whether <ext/stdio_filebuf.h> is available
-- Checking whether <ext/stdio_filebuf.h> is available - yes
-- Using system-installed BZIP2
-- Using system-installed CURL
-- Using system-installed EXPAT
-- Using system-installed FORM
-- Using system-installed LIBARCHIVE
-- Using system-installed LIBLZMA
-- Using system-installed LIBRHASH
-- Using system-installed LIBUV
-- Using system-installed ZLIB
-- Found LibRHash: /usr/lib64/librhash.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found CURL: /usr/lib64/libcurl.so (found version "7.55.1")
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.2.1")
-- Found LibArchive: /usr/lib64/libarchive.so (found suitable version "3.3.1", minimum required is "3.0.0")
-- Looking for cbreak in /usr/lib64/libncurses.so
-- Looking for cbreak in /usr/lib64/libncurses.so - found
-- Looking for elf.h
-- Looking for elf.h - found
CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
The imported target "Qt5::Core" references the file

"/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

"/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

but not all the files it references.

Call Stack (most recent call first):
/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
/usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
/usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
Source/QtDialog/CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build/CMakeFiles/CMakeError.log".
* ERROR: dev-util/cmake-3.8.2::gentoo failed (configure phase):
* cmake failed
*
* Call stack:
* ebuild.sh, line 115: Called src_configure
* environment, line 3383: Called cmake-utils_src_configure
* environment, line 1010: Called die
* The specific snippet of code:
* "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
*
* If you need support, post the output of `emerge --info '=dev-util/cmake-3.8.2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.8.2::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/environment'.
* Working directory: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build'
* S: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2'

>>> Failed to emerge dev-util/cmake-3.8.2, Log file:

>>> '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'

* Messages for package dev-util/cmake-3.8.2:

* ERROR: dev-util/cmake-3.8.2::gentoo failed (configure phase):
* cmake failed
*
* Call stack:
* ebuild.sh, line 115: Called src_configure
* environment, line 3383: Called cmake-utils_src_configure
* environment, line 1010: Called die
* The specific snippet of code:
* "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
*
* If you need support, post the output of `emerge --info '=dev-util/cmake-3.8.2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.8.2::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-util/cmake-3.8.2/temp/environment'.
* Working directory: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2_build'
* S: '/var/tmp/portage/dev-util/cmake-3.8.2/work/cmake-3.8.2'

d_stranz
6th November 2017, 18:20
Change the environment variable "QMAKESPEC" to simply "linux-g++" (without the " marks, of course).

jlindgren
9th November 2017, 04:25
I have tried changing that variable before but it didn't really get set, as the variable error is still exactly the same...



#env|grep -i qmake
QMAKESPEC=linux-g++
#rm -r /var/tmp/portage
#emerge -v cmake


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

Am I missing something?

d_stranz
9th November 2017, 16:40
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.

jlindgren
12th November 2017, 02:33
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++ )



* IMPORTANT: 6 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies ..... done!
[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
[ebuild N ] media-libs/phonon-vlc-0.9.1-r1::gentoo USE="qt5 -debug -qt4" 0 KiB

Total: 2 packages (2 new), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 2) media-libs/phonon-4.9.1-r1::gentoo
* phonon-4.9.1.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking phonon-4.9.1.tar.xz to /var/tmp/portage/media-libs/phonon-4.9.1-r1/work
>>> Source unpacked in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work
>>> Preparing source in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1 ...
* Applying phonon-4.7.0-plugin-install.patch ...
[ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1 ...
* qt5: running myconfigure
>>> Working in BUILD_DIR: "/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5"
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
loading initial cache file /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/gentoo_common_config.cmake
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Enabling backend state machine validation.
CMake Error at /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
The imported target "Qt5::Core" references the file

"/usr/lib64/qt5//mkspecs//usr/lib64/qt5/mkspecs/linux-g++"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

"/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

but not all the files it references.

Call Stack (most recent call first):
/usr/lib64/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
/usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake:158 (include)
cmake/PhononQt5.cmake:28 (find_package)
cmake/FindPhononInternal.cmake:107 (include)
CMakeLists.txt:47 (include)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/CMakeFiles/CMakeOutput.log".
* ERROR: media-libs/phonon-4.9.1-r1::gentoo failed (configure phase):
* cmake failed
*
* Call stack:
* ebuild.sh, line 115: Called src_configure
* environment, line 3787: Called multibuild_foreach_variant 'myconfigure'
* environment, line 2694: Called _multibuild_run 'myconfigure'
* environment, line 2692: Called myconfigure
* environment, line 3783: Called multilib_src_configure
* environment, line 3270: Called cmake-utils_src_configure
* environment, line 985: Called die
* The specific snippet of code:
* "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
*
* If you need support, post the output of `emerge --info '=media-libs/phonon-4.9.1-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=media-libs/phonon-4.9.1-r1::gentoo'`.
* The complete build log is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/environment'.
* Working directory: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5'
* S: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1'

>>> Failed to emerge media-libs/phonon-4.9.1-r1, Log file:

>>> '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'

* Messages for package media-libs/phonon-4.9.1-r1:

* ERROR: media-libs/phonon-4.9.1-r1::gentoo failed (configure phase):
* cmake failed
*
* Call stack:
* ebuild.sh, line 115: Called src_configure
* environment, line 3787: Called multibuild_foreach_variant 'myconfigure'
* environment, line 2694: Called _multibuild_run 'myconfigure'
* environment, line 2692: Called myconfigure
* environment, line 3783: Called multilib_src_configure
* environment, line 3270: Called cmake-utils_src_configure
* environment, line 985: Called die
* The specific snippet of code:
* "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
*
* If you need support, post the output of `emerge --info '=media-libs/phonon-4.9.1-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=media-libs/phonon-4.9.1-r1::gentoo'`.
* The complete build log is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-libs/phonon-4.9.1-r1/temp/environment'.
* Working directory: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5'
* S: '/var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1'

d_stranz
12th November 2017, 17:09
Maybe this will help (https://bugreports.qt.io/browse/QTBUG-61768); 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.

jlindgren
12th November 2017, 21:50
Maybe this will help (https://bugreports.qt.io/browse/QTBUG-61768); 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!! :D
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.

d_stranz
13th November 2017, 17:51
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. :p