Bug 292593 - po files of presence-applet 0.3 does not build due to a cmake error
Summary: po files of presence-applet 0.3 does not build due to a cmake error
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: presence-applet (show other bugs)
Version: unspecified
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 14:27 UTC by Balcaen John
Modified: 2012-07-06 12:47 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
example patch for ktp-presence-applet (624 bytes, patch)
2012-02-06 14:20 UTC, Rex Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Balcaen John 2012-01-27 14:27:25 UTC
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.
Comment 1 Dominik Cermak 2012-01-27 14:31:30 UTC
As a workaround you can put cmake_policy(SET CMP0002 OLD) in the top CMakeLists.txt.
Comment 2 Balcaen John 2012-01-27 14:50:36 UTC
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 ?
Comment 3 Martin Klapetek 2012-01-27 15:51:33 UTC
No need to open several bugreports, just post the list here and we'll try to fix it all at once.

Thanks.
Comment 4 Alin M Elena 2012-01-27 16:27:07 UTC
maybe we shall properly fix it... setting that regressive policy... just hides the problem
Comment 5 Balcaen John 2012-01-28 00:06:18 UTC
Thoses packages are also affected :

ktp-accounts-kcm
ktp-send-file
ktp-contact-applet
ktp-presence-applet
Comment 6 Todd 2012-02-06 14:13:25 UTC
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?
Comment 7 Rex Dieter 2012-02-06 14:20:27 UTC
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.
Comment 8 Todd 2012-02-06 14:51:54 UTC
That worked, thanks.
Comment 9 Rohan Garg 2012-02-07 19:28:24 UTC
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
Comment 10 Rohan Garg 2012-02-07 19:28:37 UTC
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
Comment 11 Rohan Garg 2012-02-07 19:30:07 UTC
@Balcaen I don't see a issue with any other sources, just the contact applet.
Comment 12 Rohan Garg 2012-02-07 19:54:18 UTC
Okay the issue was present in the Presence applet as well, fixed