You are not logged in.

#1 2008-11-22 02:41:03

sokuban
Member
Registered: 2006-11-11
Posts: 412

[SOLVED]Compiling a program from source (Tomoe)

I'm trying to compile Tomoe: http://tomoe.sourceforge.jp/cgi-bin/en/blog/index.rb

It is a handwriting recognition tool for East Asian languages. For those of you familiar with them, you'd know that there are some characters that are just so obscure you can't type them with your IME and the only way to input them is with a handwriting recognition program. (Browsing a unicode character map is only something a madman can do) MS has one built in their IME, but I've had to live by copying things from wiktionary up until now on Linux, and I think this program might be my saving grace if I can get it working.

I would want to make a PKGBUILD, but I really have no experiance with that kind of stuff at all, so I'm going to try to compile it from source the old fashioned way at least. I figured if it installs things into /usr/local/ by default it won't mess up with pacman too much.

However I'd need 3 packages. One for tomoe, another for tomoe-gtk, and another for scim-tomoe. And the 3rd depends on the 2nd which depends on the 1st. I installed tomoe fine with ./configure && make && make install, but when I try to install tomoe-gtk I get an error at ./configure:

checking for TOMOE... configure: error: Package requirements (tomoe >= 0.4.0) were not met:

No package 'tomoe' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables TOMOE_CFLAGS
and TOMOE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.



Of course I know that I installed tomoe, slocate gives me:
(It gave me more stuff too, but they are all in the build directory in my home so I excluded them.)

/usr/local/etc/tomoe
/usr/local/etc/tomoe/config
/usr/local/include/tomoe
/usr/local/include/tomoe/pytomoe-utils.h
/usr/local/include/tomoe/tomoe-candidate.h
/usr/local/include/tomoe/tomoe-char.h
/usr/local/include/tomoe/tomoe-config.h
/usr/local/include/tomoe/tomoe-context.h
/usr/local/include/tomoe/tomoe-dict.h
/usr/local/include/tomoe/tomoe-enum-types.h
/usr/local/include/tomoe/tomoe-module-impl.h
/usr/local/include/tomoe/tomoe-module.h
/usr/local/include/tomoe/tomoe-query.h
/usr/local/include/tomoe/tomoe-reading.h
/usr/local/include/tomoe/tomoe-recognizer.h
/usr/local/include/tomoe/tomoe-shelf.h
/usr/local/include/tomoe/tomoe-writing.h
/usr/local/include/tomoe/tomoe.h
/usr/local/lib/libtomoe.a
/usr/local/lib/libtomoe.la
/usr/local/lib/libtomoe.so
/usr/local/lib/libtomoe.so.0
/usr/local/lib/libtomoe.so.0.1.0
/usr/local/lib/tomoe
/usr/local/lib/pkgconfig/pytomoe.pc
/usr/local/lib/pkgconfig/tomoe.pc
/usr/local/lib/python2.6/site-packages/tomoe.a
/usr/local/lib/python2.6/site-packages/tomoe.la
/usr/local/lib/python2.6/site-packages/tomoe.so
/usr/local/lib/tomoe/module
/usr/local/lib/tomoe/module/dict
/usr/local/lib/tomoe/module/recognizer
/usr/local/lib/tomoe/module/dict/mysql.a
/usr/local/lib/tomoe/module/dict/mysql.la
/usr/local/lib/tomoe/module/dict/mysql.so
/usr/local/lib/tomoe/module/dict/unihan.a
/usr/local/lib/tomoe/module/dict/unihan.la
/usr/local/lib/tomoe/module/dict/unihan.so
/usr/local/lib/tomoe/module/dict/xml.a
/usr/local/lib/tomoe/module/dict/xml.la
/usr/local/lib/tomoe/module/dict/xml.so
/usr/local/lib/tomoe/module/recognizer/simple.a
/usr/local/lib/tomoe/module/recognizer/simple.la
/usr/local/lib/tomoe/module/recognizer/simple.so
/usr/local/share/tomoe
/usr/local/share/gtk-doc/html/tomoe
/usr/local/share/gtk-doc/html/tomoe/TomoeCandidate.html
/usr/local/share/gtk-doc/html/tomoe/TomoeChar.html
/usr/local/share/gtk-doc/html/tomoe/TomoeConfig.html
/usr/local/share/gtk-doc/html/tomoe/TomoeContext.html
/usr/local/share/gtk-doc/html/tomoe/TomoeDict.html
/usr/local/share/gtk-doc/html/tomoe/TomoeQuery.html
/usr/local/share/gtk-doc/html/tomoe/TomoeReading.html
/usr/local/share/gtk-doc/html/tomoe/TomoeRecognizer.html
/usr/local/share/gtk-doc/html/tomoe/TomoeShelf.html
/usr/local/share/gtk-doc/html/tomoe/TomoeWriting.html
/usr/local/share/gtk-doc/html/tomoe/home.png
/usr/local/share/gtk-doc/html/tomoe/index.html
/usr/local/share/gtk-doc/html/tomoe/index.sgml
/usr/local/share/gtk-doc/html/tomoe/ix01.html
/usr/local/share/gtk-doc/html/tomoe/left.png
/usr/local/share/gtk-doc/html/tomoe/right.png
/usr/local/share/gtk-doc/html/tomoe/style.css
/usr/local/share/gtk-doc/html/tomoe/tomoe-tomoe.html
/usr/local/share/gtk-doc/html/tomoe/tomoe.devhelp
/usr/local/share/gtk-doc/html/tomoe/tomoe.devhelp2
/usr/local/share/gtk-doc/html/tomoe/tomoe.html
/usr/local/share/gtk-doc/html/tomoe/up.png
/usr/local/share/locale/ja/LC_MESSAGES/tomoe.mo
/usr/local/share/tomoe/dict
/usr/local/share/tomoe/dict.dtd
/usr/local/share/tomoe/python
/usr/local/share/tomoe/recognizer
/usr/local/share/tomoe/xml2est.rb
/usr/local/share/tomoe/python/tomoe.defs
/usr/local/share/tomoe/recognizer/handwriting-ja.xml
/usr/local/share/tomoe/recognizer/handwriting-zh_CN.xml

I've tried:

export PKG_CONFIG_PATH=/usr/local/lib/tomoe:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/usr/local/lib:$PKG_CONFIG_PATH

And neither of those seemed to work so I then set TOMOE_CFLAGS and TOMOE_LIBS and it indeed avoided the need to call pkg-config and the configure script went on, but I got the same problem for gucharmap, which I tried installing with pacman and then starting a new session, but it still didn't work so I had to set the environment variables to skip it and then the configure script finished, but make not so surprisingly failed.

So what should I do to get this to compile?

Last edited by sokuban (2008-11-24 02:48:46)

Offline

#2 2008-11-22 02:43:28

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Compiling a program from source (Tomoe)

Why don't you whip up a PKGBUILD (quick & dirty) so it all installs to /usr? Maybe that helps you a bit further. A lot of tarballs also have the option to remove installed files if you keep the source code around, so maybe you could test it without having to write a PKGBUILD even.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2008-11-22 09:23:17

zoulnix
Member
Registered: 2008-03-29
Posts: 1

Re: [SOLVED]Compiling a program from source (Tomoe)

Hello there, sokuban... just wanted to tell you that i have uploaded
scim-tomoe, tomoe, tomoe-gtk and uim-tomoe-gtk PKGBUILD's to the AUR.

@@
... would be good if someone could test  the pkgbuilds
out to see so everything works as it should.

tomoe-gtk had to be compiled without gucharmap. from what i could see the tomoe-gtk is not compatible with the latest version of gucharmap...

Last edited by Zoulnix (2008-11-22 09:26:16)

Offline

#4 2008-11-22 15:40:49

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [SOLVED]Compiling a program from source (Tomoe)

Zoulnix wrote:

Hello there, sokuban... just wanted to tell you that i have uploaded
scim-tomoe, tomoe, tomoe-gtk and uim-tomoe-gtk PKGBUILD's to the AUR.

@@
... would be good if someone could test  the pkgbuilds
out to see so everything works as it should.

tomoe-gtk had to be compiled without gucharmap. from what i could see the tomoe-gtk is not compatible with the latest version of gucharmap...

Thanks! The tomoe packages installs and works perfectly.

But now I've got another little problem. For some strange reason they decided that it would only load a dictionary when the locale is set to Chinese or Japanese. My computer currently runs on a ms_MY.utf-8 locale and while I wouldn't really mind putting it to ja_JP.utf-8 I'd prefer it if there is a way I can make it so that tomoe is always run with a Japanese locale no matter what locale the rest of my system is because I often randomly change it.

While I can directly run:

$ LANG=ja_JP.UTF-8 scim-tomoe

from a terminal and the dictionaries are loaded fine, I'd end up only being able to write in the terminal itself which is pretty useless. Right clicking on the scim icon and selecting handwriting recognition will give me the ms_MY version which doesn't have any dictionaries loaded.

Anyone know a way to do it?

EDIT: So I tried setting my whole locale to Japanese. Only problem is, Thunar has a bug with Japanese. Maybe its because the Japanese name for filesystem is too long, but the sidebar is stuck out too much and cannot be pushed in. Also since it is so long my filesystem icon on my desktop can't display its whole name, I wouldn't really call that a bug, but it isn't pretty to look at.

And I just noticed but xfce terminal fonts are messed up too. I'm too lazy to fix all this so I'm going back to English now. It would probbably be much easier to find a way to always run only this program with a Japanese locale than fix all the problems I'm getting with the whole system in a Japanese locale.

EDIT2: Solved by running scim itself in ja_JP.UTF-8 (why didn't I think of this earlier?).

Last edited by sokuban (2008-11-24 02:49:24)

Offline

#5 2010-06-06 08:10:30

nopants
Member
Registered: 2009-08-19
Posts: 3

Re: [SOLVED]Compiling a program from source (Tomoe)

has anyone else tried to use tomoe since these posts? I keep getting a segfault after installing the packages and attempting to run scim-tomoe. On the other hand, this seems to work perfectly well with my ubuntu laptop.

Offline

#6 2010-06-06 11:15:27

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: [SOLVED]Compiling a program from source (Tomoe)

You're dragging up a 2-year-old thread, I'm pretty sure things have changed since then. Please post a new thread or ask the maintainer.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB