MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015258 | CMake | CMake | public | 2014-11-21 02:32 | 2015-05-04 09:05 |
Reporter | Arkadiusz Miskiewicz | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | Linux | OS Version | PLD Th |
Product Version | |||||
Target Version | CMake 3.2 | Fixed in Version | CMake 3.2 | ||
Summary | 0015258: 3.0.2-3.1rc2: _IMPORT_PREFIX always used even if absolute paths are in use - thus breaking build | ||||
Description | cmake 3.0.2 and 3.1rc2 shows this behaviour. Anyway kde frameworks 5.4 in kcoreaddons generates via cmake KF5CoreAddonsTargets.cmake which contains: /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsTargets.cmake contains: 44 set_target_properties(KF5::CoreAddons PROPERTIES 45 INTERFACE_COMPILE_DEFINITIONS "KCOREADDONS_LIB" 46 INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/KF5/KCoreAddons;${_IMPORT_PREFIX}/include/KF5" 47 INTERFACE_LINK_LIBRARIES "Qt5::Core" 48 ) 49 Note _IMPORT_PREFIX is being used there. Now according to this code: http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmExportInstallFileGenerator.cxx;h=89071c052ce28a82f57e06d96b2b7d519259c2f0;hb=HEAD#l72 [^] _IMPORT_PREFIX is empty if using absolute paths. Thus I'm ending up with invalid "/include/KF5/KcoreAdons" paths. That's becomes visible when trying to build for example kauth which uses kcoreaddons: "CMake Error in src/CMakeLists.txt: Imported target "KF5::CoreAddons" includes non-existent path "/include/KF5/KCoreAddons" in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: * The path was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and references files it does not provide. | ||||
Steps To Reproduce | Build kcoreaddons using such options: + CC=x86_64-pld-linux-gcc CXX=x86_64-pld-linux-g++ CPPFLAGS= /usr/bin/cmake '-DCMAKE_VERBOSE_MAKEFILE=ON' '-DCMAKE_BUILD_TYPE=PLD' '-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64' '-DCMAKE_INSTALL_PREFIX:PATH=/usr' '-DSYSCONF_INSTALL_DIR:PATH=/etc' '-DCMAKE_CXX_FLAGS_PLD=-O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -DNDEBUG -DQT_NO_DEBUG' '-DCMAKE_C_FLAGS_PLD=-O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -DNDEBUG -DQT_NO_DEBUG' '-DCMAKE_Fortran_FLAGS_PLD=-O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -DNDEBUG -DQT_NO_DEBUG' '-DCMAKE_EXE_LINKER_FLAGS_PLD=-Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc ' '-DCMAKE_SHARED_LINKER_FLAGS_PLD=-Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc ' '-DCMAKE_MODULE_LINKER_FLAGS_PLD=-Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc ' '-DLIB_SUFFIX=64' '-DBUILD_SHARED_LIBS:BOOL=ON' '-DKDE_INSTALL_USE_QT_SYS_PATHS=ON' '-DBIN_INSTALL_DIR=/usr/bin' ../ then build kauth using the same options. I assume it's unrealistic to expect cmake developers to do such compilations to reproduce. Anyway looking into how cmake generated KF5CoreAddonsTargets.cmake always using _IMPORT_PREFIX and the fact that _IMPORT_PREFIX is empty if using absolute paths should be enough to figure the problem out. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | KF5CoreAddonsTargets.cmake (3,249) 2014-11-21 02:33 https://public.kitware.com/Bug/file/5303/KF5CoreAddonsTargets.cmake kcoreaddons.log (730,386) 2014-11-21 02:33 https://public.kitware.com/Bug/file/5304/kcoreaddons.log kauth.log (8,604) 2014-11-21 02:36 https://public.kitware.com/Bug/file/5305/kauth.log | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-11-21 02:32 | Arkadiusz Miskiewicz | New Issue | |||
2014-11-21 02:33 | Arkadiusz Miskiewicz | File Added: KF5CoreAddonsTargets.cmake | |||
2014-11-21 02:33 | Arkadiusz Miskiewicz | File Added: kcoreaddons.log | |||
2014-11-21 02:36 | Arkadiusz Miskiewicz | File Added: kauth.log | |||
2014-11-21 02:37 | Arkadiusz Miskiewicz | Note Added: 0037243 | |||
2014-11-21 10:19 | Brad King | Assigned To | => Stephen Kelly | ||
2014-11-21 10:19 | Brad King | Status | new => assigned | ||
2014-11-21 10:22 | Brad King | Note Added: 0037246 | |||
2014-11-21 12:11 | Arkadiusz Miskiewicz | Note Added: 0037248 | |||
2014-11-25 08:10 | Stephen Kelly | Note Added: 0037272 | |||
2014-11-29 09:07 | Stephen Kelly | Target Version | => CMake 3.2 | ||
2014-11-29 09:07 | Stephen Kelly | Description Updated | bug_revision_view_page.php?rev_id=1628#r1628 | ||
2014-12-08 13:46 | Stephen Kelly | Note Added: 0037414 | |||
2014-12-08 13:46 | Stephen Kelly | Status | assigned => resolved | ||
2014-12-08 13:46 | Stephen Kelly | Fixed in Version | => CMake 3.2 | ||
2014-12-08 13:46 | Stephen Kelly | Resolution | open => fixed | ||
2014-12-15 11:48 | Brad King | Status | resolved => assigned | ||
2014-12-15 11:48 | Brad King | Resolution | fixed => open | ||
2014-12-15 11:48 | Brad King | Fixed in Version | CMake 3.2 => | ||
2014-12-15 11:49 | Brad King | Note Added: 0037461 | |||
2014-12-15 11:50 | Brad King | Note Added: 0037462 | |||
2014-12-19 08:26 | Brad King | Assigned To | Stephen Kelly => Brad King | ||
2014-12-19 08:26 | Brad King | Status | assigned => resolved | ||
2014-12-19 08:26 | Brad King | Resolution | open => fixed | ||
2014-12-19 08:26 | Brad King | Fixed in Version | => CMake 3.2 | ||
2015-05-04 09:05 | Robert Maynard | Note Added: 0038702 | |||
2015-05-04 09:05 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|