[SCIM] Can't make scim-0.9.7/scim-lib-cvs on gcc-3.4.1

Ming Hua minghua at rice.edu
Wed Jun 9 13:09:42 PDT 2004


Hi Hirosi,

On Thu, Jun 10, 2004 at 03:00:19AM +0900, UTUMI Hirosi wrote:
> Hi,
> 
> I'm trying to make scim packages for Mandrake-Cooker, but I got
> these errors:
[snipped]
> So I got scim-lib-cvs from savannah, but it shows
> ---------------------------
> make[3]: *** No rule to make target `scim_table_imengine_setup.cpp', needed by
> `table_imengine_setup_la-scim_table_imengine_setup.lo'.  Stop.
> make[3]: Leaving directory `~/build/scim-0.9.7/modules/SetupUI'
> make[2]: *** [all-recursive] Error 1
> 
> 
> mmm...I made some mistakes?
> I'm using gcc-3.4.1. We don't have other gcc-3.x in Mandrake-Cooker.

SCIM 0.9.7 is known not compatible with gcc 3.4 series, James gave a
patch in the following forum thread (if you understand Chinese):
http://www.linuxsir.org/bbs/showthread.php?s=&threadid=112978
I am also attaching the same patch for your convenience.  It is a little
messy, also including some documentation change, but it's reported to
work for gcc 3.4.0.  Note that I didn't test it, since gcc-3.4 is still
in Debian experimental.

James also claimed that this is a gcc bug instead of an scim one, and I
don't know if he is planning to do any further scim 0.9 series release.
I hope he can clarify the situation better.

The CVS head is in a very unstable state now as far as I know.  I
haven't tried compiling the head for two weeks.  If you are trying to
use SCIM instead of do develepment work, I would advise you to stay in
the stable 0.9 branch.

Cheers,
Ming
2004.06.09

--------------------------------------------------------------------------
We used to think that if we know one, we know two, because one and one are
two.  We are finding that we must learn a great deal more about ``and''.
                                                  --- Sir Arthur Eddington
--------------------------------------------------------------------------
-------------- next part --------------
diff -u -r1.16 -r1.16.2.1
--- docs/manual/zh_CN/user-manual.xml	22 Apr 2004 09:37:13 -0000	1.16
+++ docs/manual/zh_CN/user-manual.xml	10 May 2004 00:49:48 -0000	1.16.2.1
@@ -2,12 +2,12 @@
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
 
-  <!ENTITY homepage             "http://www.turbolinux.com.cn/~suzhe/scim">
+  <!ENTITY homepage             "http://www.freedesktop.org/~suzhe">
   <!ENTITY scim-full            "???????????????????????????">
   <!ENTITY scim                 "<application>SCIM</application>">
-  <!ENTITY scim-version         "0.9.5">
+  <!ENTITY scim-version         "0.9.7">
   <!ENTITY scim-release         "1">
-  <!ENTITY manual-version       "0.2">
+  <!ENTITY manual-version       "0.3">
 ]>
 
 <article id="index" lang="zh_cn">
@@ -30,7 +30,7 @@
         <firstname>James</firstname>
         <surname>Su</surname>
         <affiliation>
-          <address><email>suzhe at turbolinux.com.cn</email></address>
+          <address><email>suzhe at tsinghua.org.cn</email></address>
         </affiliation>
       </author>
     </authorgroup>
@@ -76,12 +76,12 @@
   <sect1>
     <title>??????????????? &scim;</title>
     <para>
-      ???????????? <ulink url="http://www.turbolinux.com.cn/~suzhe/scim" type="html">??????</ulink>
+      ???????????? <ulink url="&homepage;" type="html">??????</ulink>
       ???????????????????????? &scim; ??????????????????. ????????????????????? GCC 3.3.x, GLIBC 2.3.x, GTK+ 2.2.x,
       XFree86 4.3.x ????????? Linux ??????????????? UnitedLinux 1.0 ?????????????????????.
       ???????????????????????????????????????, ????????????????????????????????????. ???????????????????????????Linux??????,
       ?????????????????? &scim;, ?????????????????????????????? scim-&scim-version;-&scim-release;.i586.rpm
-      ?????? scim-&scim-version;-&scim-release;ul1.i386.rpm (?????? UnitedLinux 1.0) ???. 
+      ?????? scim-&scim-version;-&scim-release;suse.i386.rpm (?????? SUSE Linux 9.1) ???. 
       ????????????????????????????????????, ??? GTK2 ?????????????????????, ?????????????????????????????????.
     </para>
     <para>
@@ -557,17 +557,17 @@
         <itemizedlist>
           <listitem>
             <para>
-              <ulink url="http://www.turbolinux.com.cn/~suzhe/scim/binaries/scim-frontend-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-frontend-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
+              <ulink url="&homepage;/binaries/scim-frontend-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-frontend-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
             </para>
           </listitem>
           <listitem>
             <para>
-              <ulink url="http://www.turbolinux.com.cn/~suzhe/scim/binaries/scim-server-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-server-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
+              <ulink url="&homepage;/binaries/scim-server-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-server-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
             </para>
           </listitem>
           <listitem>
             <para>
-              <ulink url="http://www.turbolinux.com.cn/~suzhe/scim/binaries/scim-config-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-config-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
+              <ulink url="&homepage;/binaries/scim-config-socket-&scim-version;-&scim-release;.i586.rpm" type="html">scim-config-socket-&scim-version;-&scim-release;.i586.rpm</ulink>
             </para>
           </listitem>
         </itemizedlist>
@@ -642,7 +642,7 @@
         <itemizedlist>
           <listitem>
             <para>
-              <ulink url="http://www.turbolinux.com.cn/~suzhe/scim/binaries/scim-gtk2-immodule-&scim-version;-&scim-release;.i586.rpm" type="html">scim-gtk2-immodule-&scim-version;-&scim-release;.i586.rpm</ulink>
+              <ulink url="&homepage;/binaries/scim-gtk2-immodule-&scim-version;-&scim-release;.i586.rpm" type="html">scim-gtk2-immodule-&scim-version;-&scim-release;.i586.rpm</ulink>
             </para>
           </listitem>
         </itemizedlist>
Index: extras/panel/scim_panel_gtk.cpp
===================================================================
RCS file: /cvsroot/scim/scim-lib/extras/panel/scim_panel_gtk.cpp,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -u -r1.47.2.1 -r1.47.2.2
--- extras/panel/scim_panel_gtk.cpp	1 May 2004 13:23:33 -0000	1.47.2.1
+++ extras/panel/scim_panel_gtk.cpp	10 May 2004 08:46:32 -0000	1.47.2.2
@@ -22,7 +22,7 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * $Id: scim_panel_gtk.cpp,v 1.47.2.1 2004/05/01 13:23:33 suzhe Exp $
+ * $Id: scim_panel_gtk.cpp,v 1.47.2.2 2004/05/10 08:46:32 suzhe Exp $
  */
 
 #include <sys/wait.h>
@@ -2128,12 +2128,13 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_MOVE_PREEDIT_CARET);
         _send_transaction.put_data ((uint32) position);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2152,11 +2153,12 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_TOGGLE_FULL_WIDTH_PUNCTUATION);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2175,11 +2177,12 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_TOGGLE_FULL_WIDTH_LETTER);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2208,11 +2211,12 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_PANEL_REQUEST_HELP);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2231,11 +2235,12 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_PANEL_REQUEST_SERVER_MENU);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2254,12 +2259,13 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_PANEL_CHANGE_SERVER_FACTORY);
         _send_transaction.put_data (uuid);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2278,12 +2284,13 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_SELECT_LOOKUP_TABLE);
         _send_transaction.put_data ((uint32)item);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2302,12 +2309,13 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_PROCESS_KEYEVENT);
         _send_transaction.put_data (_lookup_table_page_up_key);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2326,12 +2334,13 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_PROCESS_KEYEVENT);
         _send_transaction.put_data (_lookup_table_page_down_key);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
@@ -2366,11 +2375,12 @@
     }
 
     if (client >= 0) {
+        Socket client_socket (client);
         _send_transaction.clear ();
         _send_transaction.put_command (SCIM_TRANS_CMD_REPLY);
         _send_transaction.put_data ((uint32) context);
         _send_transaction.put_command (SCIM_TRANS_CMD_TOGGLE_INPUT_STATUS);
-        _send_transaction.write_to_socket (Socket (client));
+        _send_transaction.write_to_socket (client_socket);
     }
 }
 
Index: modules/Config/scim_socket_config.cpp
===================================================================
RCS file: /cvsroot/scim/scim-lib/modules/Config/scim_socket_config.cpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- modules/Config/scim_socket_config.cpp	12 Apr 2004 21:46:42 -0000	1.6
+++ modules/Config/scim_socket_config.cpp	10 May 2004 12:34:32 -0000	1.6.2.1
@@ -23,7 +23,7 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * $Id: scim_socket_config.cpp,v 1.6 2004/04/12 21:46:42 liuspider Exp $
+ * $Id: scim_socket_config.cpp,v 1.6.2.1 2004/05/10 12:34:32 suzhe Exp $
  */
 
 #define Uses_SCIM_CONFIG_BASE
@@ -316,6 +316,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -336,6 +337,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -359,6 +361,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -379,6 +382,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -399,6 +403,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -424,6 +429,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -444,6 +450,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
@@ -464,6 +471,7 @@
 
     if (trans.write_to_socket (m_socket_client) &&
         trans.read_from_socket (m_socket_client, m_socket_timeout) &&
+        trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
         trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK)
         return true;
     return false;
Index: modules/FrontEnd/scim_x11_frontend.cpp
===================================================================
RCS file: /cvsroot/scim/scim-lib/modules/FrontEnd/scim_x11_frontend.cpp,v
retrieving revision 1.100
retrieving revision 1.100.2.1
diff -u -r1.100 -r1.100.2.1
--- modules/FrontEnd/scim_x11_frontend.cpp	22 Apr 2004 00:21:08 -0000	1.100
+++ modules/FrontEnd/scim_x11_frontend.cpp	10 May 2004 08:46:33 -0000	1.100.2.1
@@ -23,7 +23,7 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * $Id: scim_x11_frontend.cpp,v 1.100 2004/04/22 00:21:08 suzhe Exp $
+ * $Id: scim_x11_frontend.cpp,v 1.100.2.1 2004/05/10 08:46:33 suzhe Exp $
  *
  */
 
@@ -542,7 +542,8 @@
         }
 
         if (FD_ISSET (panel_fd, &read_fds)) {
-            if (!check_socket_connection (Socket (panel_fd))) {
+            Socket panel_socket (panel_fd);
+            if (!check_socket_connection (panel_socket)) {
                 if (!socket_connect_panel (_argc, _argv)) {
                     SCIM_DEBUG_FRONTEND(1) << "X11 -- Lost connection with panel daemon!\n";
                     return;
Index: src/scim_socket.cpp
===================================================================
RCS file: /cvsroot/scim/scim-lib/src/scim_socket.cpp,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- src/scim_socket.cpp	14 Jan 2004 09:31:54 -0000	1.25
+++ src/scim_socket.cpp	10 May 2004 08:46:33 -0000	1.25.2.1
@@ -23,7 +23,7 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * $Id: scim_socket.cpp,v 1.25 2004/01/14 09:31:54 suzhe Exp $
+ * $Id: scim_socket.cpp,v 1.25.2.1 2004/05/10 08:46:33 suzhe Exp $
  *
  */
 
@@ -337,6 +337,7 @@
  
         int ret;
         int nbytes = 0;
+        char *cbuf = static_cast<char *> (buf);
  
         while (size > 0) {
             ret = wait_for_data (timeout);
@@ -344,12 +345,12 @@
             if (ret < 0) return ret;
             if (ret == 0) return nbytes;
  
-            ret = read (buf, size);
+            ret = read (cbuf, size);
  
             if (ret < 0) return ret;
             if (ret == 0) return nbytes;
  
-            ((char*)buf) += ret;
+            cbuf += ret;
             nbytes += ret;
             size -= ret;
         }
@@ -367,11 +368,13 @@
  
         m_err = 0;
 
+        const char *cbuf = static_cast<const char*> (buf);
+
         while (size > 0) {
-            ret = ::write (m_id, buf, size);
+            ret = ::write (m_id, cbuf, size);
             if (ret <= 0) break;
             size -= (size_t) ret;
-            ((char*)buf) += ret;
+            cbuf += ret;
         }
  
         if (ret == 0) m_err = EPIPE;
@@ -823,7 +826,8 @@
                                 m_impl->max_fd = client;
 
                             //emit the signal.
-                            m_impl->accept_signal.emit (this, Socket (client));
+                            Socket client_socket (client);
+                            m_impl->accept_signal.emit (this, client_socket);
                         }
 
                     //Client reading
@@ -831,7 +835,8 @@
 
                         SCIM_DEBUG_SOCKET (3) << "  SocketServer: Accept client reading...\n";
 
-                        m_impl->receive_signal.emit (this, Socket (i));
+                        Socket client_socket (i);
+                        m_impl->receive_signal.emit (this, client_socket);
                     }
                 }
 
@@ -851,7 +856,8 @@
                                               << i
                                               << "got an exception, callbacking...\n";
 
-                        m_impl->exception_signal.emit (this, Socket (i));
+                        Socket client_socket (i);
+                        m_impl->exception_signal.emit (this, client_socket);
                     }
                 }
 


More information about the scim mailing list