DeLi Linux

DeLi Linux Forum

DeLi Linux » Development » Need help, I can't get a chinese console under DeLi Linux 0.7.90

Need help, I can't get a chinese console under DeLi Linux 0.7.90

Moderators: norman.

Page: 1

Author Post
Moderator
Registered: Nov 2007
Posts: 125
I have made some effort to get a chinese console under DeLi Linux 0.7.90, but failed.

First, according to the topic "First Preview of DeLi 0.8 available: http://www.delilinux.org/forum/topic.php?id=583 ", I try to get a unicode chinese console like below:
Enable Unicode console:
Append /usr/bin/unicode_start at the end of /etc/profile
Set locale:
At the end of /etc/profile write
export LANG=zh_CN.UTF-8

But, the console can't display chinese.

I did some searching, some articles say that it is no possible to display chinese on console, like: " Configuring the Linux Console: http://www.linuxfromscratch.org/lfs/view/6.2/chapter07/console.html "
Quote
For Chinese, Japanese, Korean and some other languages, the Linux console
cannot be configured to display the needed characters. Users who need such
languages should install the X Window System, fonts that cover the
necessary character ranges, and the proper input method (e.g., SCIM, it
supports a wide variety of languages).


But, I have ever heard it is possible to get a chinese console according to article: " http://gentoo-wiki.com/HOWTO_Make_your_system_use_unicode/utf-8 ". After enable unicode according to the topic mentioned above: First Preview of DeLi 0.8 available , I tried to change the console font to Lat2-Terminus16, because Lat2-Terminus16 seems close to the font mentioned in that article: a good font for UTF-8 consoles called terminus. But, I faild.

In fact, there is a solution to display and input chinese under linux console: to install a software called Zhcon -- a fast CJK console environment for Linux. But, I can't install it from source under DeLi 0.7.2 and DeLi 0.7.90. Below is my steps:
1, Download the newest zhcon-0.2.6 source from : http://sourceforge.net/projects/zhcon/ , there are two compressed files: zhcon-0.2.5.tar.gz and 0.2.5 to 0.2.6 patch file called zhcon-0.2.5-to-0.2.6.diff.gz.

2, the steps of patching and compiling source:

first, install libncurses5-dev, then,

tar zxf zhcon-0.2.5.tar.gz

cd zhcon-0.2.5

zcat ../zhcon-0.2.5-to-0.2.6.diff.gz | patch -p1

./configure

make

make install

3, here is my steps on DeLi 0.7.90
I don't know if libncurses5-dev existed in the DeLi 0.7.90, so do nothing in this step;
After patching, I excute ./configure successfully;
Then, I do a "make", some errors ended the making progress, I catched the last part of error message below:
Quote
encfilter.c:(.text+0x81): undefined reference to `libiconv_open'
encfilter.c:(.text+0x9a): undefined reference to `libiconv_open'
encfilter.c:(.text+0xe5): undefined reference to `libiconv_close'
encfilter.o: In function `DoEncodingFilter':
encfilter.c:(.text+0x15a): undefined reference to `libiconv'
iconv_string.o: In function `iconv_string':
iconv_string.c:(.text+0x15): undefined reference to `libiconv_open'
iconv_string.c:(.text+0xa7): undefined reference to `libiconv'
iconv_string.c:(.text+0x103): undefined reference to `libiconv'
iconv_string.c:(.text+0x17b): undefined reference to `libiconv'
iconv_string.c:(.text+0x1d5): undefined reference to `libiconv'
iconv_string.c:(.text+0x204): undefined reference to `libiconv'
iconv_string.c:(.text+0x22b): undefined reference to `libiconv_close'
iconv_string.c:(.text+0x328): undefined reference to `libiconv_close'
iconv_string.c:(.text+0x434): undefined reference to `libiconv_close'
iconv_string.c:(.text+0x46a): undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make[3]: *** [zhcon] ^@^@ 1
make[3]: Leaving directory `/root/zhcon-0.2.5/src'
make[2]: *** [all-recursive] ^@^@ 1
make[2]: Leaving directory `/root/zhcon-0.2.5/src'
make[1]: *** [all-recursive] ^@^@ 1
make[1]: Leaving directory `/root/zhcon-0.2.5'
make: *** [all] ^@^@ 2


Anyone can give some advice? Thanks.
_______________
Welcome to my personal blog about Linux and Open Source in China: Learning Diary(english).
Administrator
Registered: Mar 2007
Posts: 551
littlebat wrote
encfilter.c:(.text+0x81): undefined reference to `libiconv_open'

Anyone can give some advice? Thanks.


You must append "-liconv" as flag in the Makefile.
Administrator
Registered: Mar 2007
Posts: 551
Well, I have build a binary package.- You may download it from http://www.delilinux.org/pkg/current/zhcon-0.2.6-4.pkg.tar.gz and install it with "pacman -U zhcon-0.2.6-4.pkg.tar.gz".

Here is the PKGBUILD script I used:

pkgname=zhcon
pkgver=0.2.6
pkgrel=4
pkgdesc="A fast console CJK environment"
url="http://sourceforge.net/projects/zhcon"
license=('GPL')
depends=('gcc')
backup=('etc/zhcon.conf')
install=zhcon.install
source=(zhcon-0.2.5.tar.gz
http://downloads.sourceforge.net/sourceforge/zhcon/zhcon-0.2.5-to-0.2.6.diff.gz)


build() {
patch -Np0 -i zhcon-0.2.5-to-0.2.6.diff || return 1

cd ${startdir}/src/${pkgname}-0.2.5
sed -i -e 's|PREFIX "/etc/zhcon\.conf"|"/etc/zhcon.conf"|' src/zhcon.cpp || return 1
export CXXFLAGS="$CXXFLAGS -liconv -lintl"
./configure --prefix=/usr || return 1

sed -i -e 's|-march=i686||' Makefile || return 1
sed -i -e 's|-march=i686||' src/Makefile || return 1
sed -i -e 's|-march=i686||' src/display/Makefile || return 1
sed -i -e 's|-march=i686||' font/Makefile || return 1
sed -i -e 's|-march=i686||' input/Makefile || return 1
sed -i -e 's|-march=i686||' doc/Makefile || return 1

make || return 1
make prefix=${startdir}/pkg/usr install || return 1

mkdir ${startdir}/pkg/etc/
cp src/zhcon.conf ${startdir}/pkg/etc/zhcon.conf
rm -rf ${startdir}/pkg/usr/etc
}

Page: 1

DeLi Linux » Development » Need help, I can't get a chinese console under DeLi Linux 0.7.90

DeLi Linux is powered by UseBB 1 Forum Software