Version: unspecified (using KDE 4.8.0) OS: Linux Hello, Po files can't be build due to a cmake error : cmake is 2.8.7 Reproducible: Always Steps to Reproduce: create a build folder go inside cmake ../ Actual Results: -- Found Gettext: built in libc CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/da/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/de/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/es/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/et/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/ga/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/hu/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/it/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/ja/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/lt/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/nds/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/nl/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/pl/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGett add_custom_target cannot create target "pofiles" be with the same name already exists. The existing ta created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/p documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/pt/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET): add_custom_target cannot create target "pofiles" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/po/cs". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/pt_BR/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET): add_custom_target cannot create target "pofiles" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/po/cs". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/sv/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET): add_custom_target cannot create target "pofiles" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/po/cs". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/uk/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET): add_custom_target cannot create target "pofiles" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/po/cs". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/zh_CN/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET): add_custom_target cannot create target "pofiles" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/mikala/rpm/BUILD/ktp-presence-applet-0.3.0/po/cs". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): po/zh_TW/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES) Expected Results: No error Removing all po folder except one allows to build one of the po files.
As a workaround you can put cmake_policy(SET CMP0002 OLD) in the top CMakeLists.txt.
Thanks, should i open a bug report for each package affected (there's others) or i can past them here once i finish local building ?
No need to open several bugreports, just post the list here and we'll try to fix it all at once. Thanks.
maybe we shall properly fix it... setting that regressive policy... just hides the problem
Thoses packages are also affected : ktp-accounts-kcm ktp-send-file ktp-contact-applet ktp-presence-applet
I tried putting cmake_policy(SET CMP0002 OLD) in the top CMakeLists.txt, but the error still occurred. I tried putting it in other CMakeLists.txt files but that didn't help, either. Is there a specific place where the line has to go?
Created attachment 68557 [details] example patch for ktp-presence-applet This patch works to fix the problem for me, using the presence-applet as an example.
That worked, thanks.
Git commit eaf09e1242408ac8652ba3ffd1d698326e4b2360 by Rohan Garg. Committed on 07/02/2012 at 19:49. Pushed by garg into branch 'master'. Do not use CMake 2.8 just yet CMake 2.8 has some scope issues which cause the pofile target to interfere while building translations in the tarball releases. Not requiring CMake 2.8 fixes the build issue. Related: bug 292593 M +0 -2 CMakeLists.txt http://commits.kde.org/telepathy-contact-applet/eaf09e1242408ac8652ba3ffd1d698326e4b2360
Git commit bea0030301dde993d2990571ec559bc9f1ca48bf by Rohan Garg. Committed on 07/02/2012 at 19:49. Pushed by garg into branch 'kde-telepathy-0.3'. Do not use CMake 2.8 just yet CMake 2.8 has some scope issues which cause the pofile target to interfere while building translations in the tarball releases. Not requiring CMake 2.8 fixes the build issue. Related: bug 292593 M +0 -2 CMakeLists.txt http://commits.kde.org/telepathy-contact-applet/bea0030301dde993d2990571ec559bc9f1ca48bf
@Balcaen I don't see a issue with any other sources, just the contact applet.
Okay the issue was present in the Presence applet as well, fixed
Fixed in master : http://quickgit.kde.org/?p=ktp-presence-applet.git&a=commit&h=a9cd350456f79a559641ff0d32b1c12c09f37f14 Fixed in 0.3 branch : http://quickgit.kde.org/?p=ktp-presence-applet.git&a=commit&h=bf59d0488708eb57ca91a9b6d0ce8951b99ba778