delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/07/03:50:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <422C1696.7880EF22@dessent.net>
Date: Mon, 07 Mar 2005 00:53:42 -0800
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: cygwin-xfree AT cygwin DOT com
Subject: Re: compile in cygwin
References: <20050307064858 DOT 13630 DOT qmail AT web42104 DOT mail DOT yahoo DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

--------------93919BBC3757D69DB0A1A7D6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Duong Duong wrote:
> 
> I download an component buibded in linux and recopiled
> it in cygwin but gcc showed somne errors. One of them
> are the error in string.h file.
> I attach this source code with this email. It is open
> source VietNamese keyboard for linux.
> Could you help me? Thanks

This is a question about an X11 app, so it probably belongs on
cygwin-xfree AT cygwin DOT com and not on this list.

From the doc/manual in the tarball:

- The system must have either en_US.UTF-8 or vi_VN.UTF-8 locale
installed

I believe that Cygwin does not have any locale support for anything but
the default "C" locale, so it doesn't sound like it's going to work.

That said it seems to compile okay for me with a few minor changes.  I
cannot test it, but I'll tell you what I did.

First of all, I didn't get any errors about "string.h" so I suspect
you're missing some -devel packages.  At the very least you'll need
xorg-x11-devel.  Use the package search feature of the cygwin.com web
site to find out what you're missing if you have to.

Next, the program #defines a macro named _PTR which collides with the
one of the same name in the libc include files.  You will have to edit
src/IMdkit/FrameMgr.h and src/IMdkit/i18nIMProto.c to rename _PTR to
something else.  I just called it _PTR2.  You can do this with a command
such as:

perl -i.bak -pe 's/_PTR\(/_PTR2\(/'
src/IMdkit/{FrameMgr.h,i18nIMProto.c}

There's also a problem with the link order in src/xim/Makefile.am.  The
libIMdkit library links against some libX11 symbols and the linker will
complain unless -lX11 comes after libIMdkit.la in the link command
line.  See attached patch.

Finally you will need to edit src/gui/gui.c to replace WAIT_ANY in the
call to waitpid() with -1.  I think WAIT_ANY is a glibc-ism that's not
portable.

Now from the top level directory run "autoreconf --install --force
--verbose", "./configure", and then "make".  You should have everything
built at this point.  That is where I stopped, you're on your own from
there on.

Brian
--------------93919BBC3757D69DB0A1A7D6
Content-Type: text/plain; charset=us-ascii;
 name="unikey-xim-makefile.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="unikey-xim-makefile.patch"

--- src/xim/Makefile.am	2005-03-07 00:38:36.781250000 -0800
+++ src/xim/Makefile.am.orig	2005-03-07 00:38:08.578125000 -0800
@@ -11,8 +11,8 @@
 ukxim_CFLAGS =  \
     @X_CFLAGS@
 ##ukxim_LDADD = ../IMdkit/libXimd.a ../ukengine/libUnikey.la
-ukxim_LDADD = ../IMdkit/libIMdkit.la -lX11 ../ukengine/libUnikey.la ../vnconv/libvnconv.la
-ukxim_LDFLAGS = @X_LIBS@ @X_PRE_LIBS@
+ukxim_LDADD = ../IMdkit/libIMdkit.la ../ukengine/libUnikey.la ../vnconv/libvnconv.la
+ukxim_LDFLAGS = @X_LIBS@ @X_PRE_LIBS@ -lX11
 
 EXTRA_DIST = install.sed uninstall.sed
 


--------------93919BBC3757D69DB0A1A7D6
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------93919BBC3757D69DB0A1A7D6--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019