[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#297709: kdebase: FTBFS (amd64/gcc-4.0): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Command_url_action>::cfg_write(KConfig&) const'



Package: kdebase
Severity: normal
Tags: patch

When building 'kdebase' on amd64 with gcc-4.0,
I get the following error:

/bin/sh ../../libtool --silent --tag=CXX --mode=link x86_64-linux-g++  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -D_GNU_SOURCE    -o kcm_khotkeys.la -rpath /usr/lib/kde3 -L/usr/X11R6/lib -L/usr/share/qt3/lib -L/usr/lib  -module -avoid-version -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined kcm_khotkeys_la.all_cpp.lo  ui/libui.la -lkdeui 
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys32Command_url_shortcut_action_dataE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Command_url_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys18Simple_action_dataINS_16Shortcut_triggerENS_18Command_url_actionEEE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Command_url_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys30Menuentry_shortcut_action_dataE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Menuentry_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys18Simple_action_dataINS_16Shortcut_triggerENS_16Menuentry_actionEEE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Menuentry_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys18Simple_action_dataINS_16Shortcut_triggerENS_11Dcop_actionEEE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Dcop_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys18Simple_action_dataINS_16Shortcut_triggerENS_21Keyboard_input_actionEEE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Keyboard_input_action>::cfg_write(KConfig&) const'
.libs/kcm_khotkeys_la.all_cpp.o(.gnu.linkonce.d._ZTVN8KHotKeys18Simple_action_dataINS_16Shortcut_triggerENS_22Activate_window_actionEEE+0x20): undefined reference to `KHotKeys::Simple_action_data<KHotKeys::Shortcut_trigger, KHotKeys::Activate_window_action>::cfg_write(KConfig&) const'
collect2: ld returned 1 exit status
make[5]: *** [kcm_khotkeys.la] Error 1
make[5]: Leaving directory `/kdebase-3.3.2/obj-x86_64-linux/khotkeys/kcontrol'

With the attached patch (taken from CVS) the 'kdebase' package
can be compiled on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/kdebase-3.3.2/khotkeys/shared/action_data.cpp ./khotkeys/shared/action_data.cpp
--- ../tmp-orig/kdebase-3.3.2/khotkeys/shared/action_data.cpp	2004-05-22 22:26:49.000000000 +0200
+++ ./khotkeys/shared/action_data.cpp	2005-02-28 16:08:59.613349642 +0100
@@ -304,8 +304,6 @@
     
 // Command_url_shortcut_action_data
 
-template class Simple_action_data< Shortcut_trigger, Command_url_action >;
-
 Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_group* parent_P,
     const QString& name_P, const QString& comment_P,
     const KShortcut& shortcut_P, const QString& command_url_P, bool enabled_P )
@@ -324,9 +322,9 @@
     cfg_P.writeEntry( "Type", "COMMAND_URL_SHORTCUT_ACTION_DATA" );
     }
 
-// Menuentry_shortcut_action_data
+template class Simple_action_data< Shortcut_trigger, Command_url_action >;
 
-template class Simple_action_data< Shortcut_trigger, Menuentry_action >;
+// Menuentry_shortcut_action_data
 
 Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_group* parent_P,
     const QString& name_P, const QString& comment_P,
@@ -346,9 +344,9 @@
     cfg_P.writeEntry( "Type", "MENUENTRY_SHORTCUT_ACTION_DATA" );
     }
 
-// Dcop_shortcut_action_data
+template class Simple_action_data< Shortcut_trigger, Menuentry_action >;
 
-template class Simple_action_data< Shortcut_trigger, Dcop_action >;
+// Dcop_shortcut_action_data
 
 template<>
 void Simple_action_data< Shortcut_trigger, Dcop_action >
@@ -357,11 +355,9 @@
     base::cfg_write( cfg_P );
     cfg_P.writeEntry( "Type", "DCOP_SHORTCUT_ACTION_DATA" );
     }
-
+template class Simple_action_data< Shortcut_trigger, Dcop_action >;
 // Keyboard_input_shortcut_action_data
 
-template class Simple_action_data< Shortcut_trigger, Keyboard_input_action >;
-
 template<>
 void Simple_action_data< Shortcut_trigger, Keyboard_input_action >
     ::cfg_write( KConfig& cfg_P ) const
@@ -369,11 +365,10 @@
     base::cfg_write( cfg_P );
     cfg_P.writeEntry( "Type", "KEYBOARD_INPUT_SHORTCUT_ACTION_DATA" );
     }
+template class Simple_action_data< Shortcut_trigger, Keyboard_input_action >;
 
 // Activate_window_shortcut_action_data
 
-template class Simple_action_data< Shortcut_trigger, Activate_window_action >;
-
 template<>
 void Simple_action_data< Shortcut_trigger, Activate_window_action >
     ::cfg_write( KConfig& cfg_P ) const
@@ -381,7 +376,8 @@
     base::cfg_write( cfg_P );
     cfg_P.writeEntry( "Type", "ACTIVATE_WINDOW_SHORTCUT_ACTION_DATA" );
     }
-
+    
+template class Simple_action_data< Shortcut_trigger, Activate_window_action >;
 // Keyboard_input_gesture_action_data
 
 void Keyboard_input_gesture_action_data::set_action( Keyboard_input_action* action_P )
diff -urN ../tmp-orig/kdebase-3.3.2/konqueror/konq_mainwindow.cc ./konqueror/konq_mainwindow.cc
--- ../tmp-orig/kdebase-3.3.2/konqueror/konq_mainwindow.cc	2004-11-28 18:27:03.000000000 +0100
+++ ./konqueror/konq_mainwindow.cc	2005-02-28 17:24:26.893501044 +0100
@@ -1005,7 +1005,7 @@
       QObject *viewFrame = lastFrame( view );
 
       // Only views in the same tab of the sender will follow
-      if ( senderFrame && viewFrame && (uint)viewFrame != (uint)senderFrame )
+      if ( senderFrame && viewFrame && (ulong)viewFrame != (ulong)senderFrame )
         continue;
 
       kdDebug(1202) << "makeViewsFollow: Sending openURL to view " << view->part()->className() << " url=" << url.url() << endl;
diff -urN ../tmp-orig/kdebase-3.3.2/konsole/konsole/keytrans.cpp ./konsole/konsole/keytrans.cpp
--- ../tmp-orig/kdebase-3.3.2/konsole/konsole/keytrans.cpp	2004-10-03 09:11:17.000000000 +0200
+++ ./konsole/konsole/keytrans.cpp	2005-02-28 16:45:33.111963940 +0100
@@ -372,7 +372,7 @@
 //printf("line %3d: ",startofsym);
     getSymbol(); assertSyntax(sym == SYMName, "Name expected")
     assertSyntax(syms->keysyms[res], "Unknown key name")
-    int key = (int)syms->keysyms[res]-1;
+    long key = (long)syms->keysyms[res]-1;
 //printf(" key %s (%04x)",res.latin1(),(int)syms->keysyms[res]-1);
     getSymbol(); // + - :
     int mode = 0;
@@ -384,7 +384,7 @@
       // mode name
       assertSyntax(sym == SYMName, "Name expected")
       assertSyntax(syms->modsyms[res], "Unknown mode name")
-      int bits = (int)syms->modsyms[res]-1;
+      long bits = (long)syms->modsyms[res]-1;
       if (mask & (1 << bits))
       {
         fprintf(stderr,"%s(%d,%d): mode name used multible times.\n",path.ascii(),slinno,scolno);
@@ -401,11 +401,11 @@
     getSymbol();
     // string or command
     assertSyntax(sym == SYMName || sym == SYMString,"Command or string expected")
-    int cmd = 0;
+    long cmd = 0;
     if (sym == SYMName)
     {
       assertSyntax(syms->oprsyms[res], "Unknown operator name")
-      cmd = (int)syms->oprsyms[res]-1;
+      cmd = (long)syms->oprsyms[res]-1;
 //printf(": do %s(%d)",res.latin1(),(int)syms->oprsyms[res]-1);
     }
     if (sym == SYMString)



Reply to: