Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gWaei, another Japanese-English Dictionary program for Gnome
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Sun Jan 04, 2009 7:48 am    Post subject: gWaei, another Japanese-English Dictionary program for Gnome Reply with quote

I am trying to gage interest in a Gentoo ebuild for my Japanese-English dictionary program, gWaei. It's made to be a more powerful and easier to use drop-in replacement for gjiten, which is currently in portage.

The project's webpage is here on sourceforge and the download link is here.

The program runs fine on x86 gentoo where I develop it. I would like to figure out if runs fine on other architectures too like AMD64 and PPC. So far the program has already made it into the repos of archlinux, fink and a few others. Once I solve a few issues, it looks like the NetBSD guys also have some interest in it. It looks like I must be doing something right with the code for them to want it, and the more testing I can get the better.

What makes gWaei different from the bazillion other dictionary programs out there? Well, I guess it's because it is a speciality dictionary program that is made to do what it is made for very well in a clean and consistent matter with a bunch of hidden power features for advanced users.

An ebuild has been posted by a more experienced person than I and it should make it's way through portage in a short period of time. For the brave, you can get it early here.


Last edited by pizzach on Sat Jan 10, 2009 6:35 am; edited 2 times in total
Back to top
View user's profile Send private message
rtiangha
n00b
n00b


Joined: 30 Apr 2005
Posts: 12

PostPosted: Sun Jan 04, 2009 8:02 am    Post subject: Reply with quote

I wouldn't mind trying it; I run AMD64 on my main machine at home and x86 on my laptop.

Quick question: I actually bought an Eijiro dictionary license a while back; is it possible to also install and use that dictionary with your software? It comes in PDIC form.
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Sun Jan 04, 2009 8:26 am    Post subject: Reply with quote

Quote:
Quick question: I actually bought an Eijiro dictionary license a while back; is it possible to also install and use that dictionary with your software? It comes in PDIC form.


It all depends. It MAY work from what I have seen on their site, but it may also just make the program segfault and crash.

Assumption 1 of the program: All results are restricted to a single line
CHECK
Assumption 2 of the program: The dictionary file is a UTF-8 text file in the ~/.waei folder
MAYBE ALREADY UTF8?
Assumption 3 of the program: the Japanese and English side of the results are separated by a [. If they are not, everything will just be bold as the syntax highlighting won't know what to do.
UGLIFIED RESULTS
Assumption 4 of the program: the dictionary file is not xml format
MAYBE?

Otherwise it should work if you just plunk the dictionary file in the ~/.waei directory. Just make sure not to name the file Kanji or Radicals as that triggers the program to do special interpretation of the dictionary syntax.

I can try to add support in a future if I can figure out the dictionary format.
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Sun Jan 04, 2009 9:57 pm    Post subject: Reply with quote

My wife uses gjiten and thought I would install your program for her to try.

However, I'm getting the following sandbox error:

make[1]: Entering directory `/var/tmp/portage/app-dicts/gwaei-0.11.0/work/gwaei-0.11.0/src/img'
make[2]: Entering directory `/var/tmp/portage/app-dicts/gwaei-0.11.0/work/gwaei-0.11.0/src/img'
make[2]: Nothing to be done for `install-exec-am'.
/bin/touch -c /usr/share/icons/hicolor
ACCESS DENIED utimensat: /usr/share/icons/hicolor
/bin/touch: setting times of `/usr/share/icons/hicolor': Permission denied
make[2]: *** [update-icon-cache] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-dicts/gwaei-0.11.0/work/gwaei-0.11.0/src/img'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-dicts/gwaei-0.11.0/work/gwaei-0.11.0/src/img'
make: *** [install-recursive] Error 1
*
* ERROR: app-dicts/gwaei-0.11.0 failed.
* Call stack:
* ebuild.sh, line 49: Called src_install
* environment, line 664: Called gnome2_src_install
* environment, line 614: Called die
* The specific snippet of code:
* emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${D}${sk_tmp_dir} " "$@" install || die "install failed";
* The die message:
* install failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/log/portage/app-dicts:gwaei-0.11.0:20090104-215502.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-dicts/gwaei-0.11.0/temp/environment'.
* This ebuild is from an overlay: '/usr/local/portage/'
*
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE "/var/log/sandbox/sandbox-18638.log"

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: utimensat
S: deny
P: /usr/share/icons/hicolor
A: /usr/share/icons/hicolor
R: /usr/share/icons/hicolor
C: /bin/touch -c /usr/share/icons/hicolor
--------------------------------------------------------------------------------

>>> Failed to emerge app-dicts/gwaei-0.11.0, Log file:

>>> '/var/log/portage/app-dicts:gwaei-0.11.0:20090104-215502.log'
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Sun Jan 04, 2009 11:26 pm    Post subject: Reply with quote

That's odd. What happens when you do
Code:
/bin/touch -c /usr/share/icons/hicolor
manually as root? The command is supposed to signal Gnome to update its loaded icons so the gWaei one appears in the applications menu.
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Sun Jan 04, 2009 11:54 pm    Post subject: Reply with quote

pizzach wrote:

Quote:
That's odd. What happens when you do
Code:
/bin/touch -c /usr/share/icons/hicolor
manually as root? The command is supposed to signal Gnome to update its loaded icons so the gWaei one appears in the applications menu.


Seems okay. I get no error message. Just a prompt....

Just to let you know, Gjiten runs fine here. Evidently I have all the dependencies though I am running KDE not a full Gnome desktop.
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Mon Jan 05, 2009 12:28 am    Post subject: Reply with quote

Quote:
Just to let you know, Gjiten runs fine here. Evidently I have all the dependencies though I am running KDE not a full Gnome desktop.


If it had got that far, the program already has gotten past any parts where dependencies would likely cause a problem. I'm not seeing the problem here and I don't know a lot about ebuilds. I'm not sure how to debug this. :x Anyone out there have any ideas?
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Mon Jan 05, 2009 1:38 am    Post subject: Reply with quote

Okay, got it to install by downgrading sandbox to sys-apps/sandbox-1.2.18.1-r3 from sys-apps/sandbox-1.3.2. I'm running two ~x86 systems.

But system locks when trying to start it. No gui. I see kswapd0 (I think) running at 20%. Ran it from a terminal but no useful output.

BTW. What package is gmodule-export part of? I don't see it in portage or using qfile.
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Mon Jan 05, 2009 2:33 am    Post subject: Reply with quote

I believe it is part of gtk, but I am not sure. If the program doesn't build against gmodule-export, gtk won't be able to make the gui from the xml. The program does not use glade.

I think the problem might also be you don't have a japanese utf8 locale installed check with "locale -a". The program tries to force itself into it hardcore if it isn't there. I mean like stupid hardcore. But if there is to Japanese utf8 locale, the program will segfault anyway on the first search because the regexp functions will be screwed up.

Quote:
Okay, got it to install by downgrading sandbox to sys-apps/sandbox-1.2.18.1-r3 from sys-apps/sandbox-1.3.2. I'm running two ~x86 systems.


I have been playing with the ebuild some more. I noticed that when emerged, portage seems to handle the work of updating the icons itself and installing the schemas itself. I currently do a lot of this manually in the makefiles, but I wonder if it is misplaced work...as in it's not the place to have it done. This isn't the first time I have had a schemas problem that doesn't really make sense and is inconsistent between system versions.

On a copy of NetBSD I have here, I noticed "mkdir -p /usr/pkg/etc/gconf" would fail, saying it isn't a folder...even though it actually was a folder.

I like gWaei a lot more than GJiten personally. I originally started making it because GJiten just wasn't powerful enough. But the problem is that with all of its features, gWaei still isn't 100% mature yet. 8O :twisted: :wink:
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Mon Jan 05, 2009 2:46 am    Post subject: Reply with quote

Looked up gmodule again. Apparently, this is how it's used:
Quote:
When we call gtk_builder_connect_signals() we pass the builder object as the first parameter as always. The second parameter allows us to pass user data (anything we want) to our callback function. This will be important later, but for now we'll just pass NULL. This function uses GModule, a part of GLib used to dynamically load modules, to look at our applications symbol table (function names, variable names, etc.) to find the function name that matches the handler name we specified in Glade.

So it's a part of GLib.
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Mon Jan 05, 2009 3:22 am    Post subject: Reply with quote

Here you go:

~ $ locale -a
C
en_US
en_US.iso88591
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
POSIX

Recompiled glib and tried again but no luck. You really need someone running a "stable" system to give you a better check on what you are doing. I'm kind of pushing things here -- more like ~x86+ then ~x86. Seems like it should run but I must have some package incompatibility. I'll keep following this and let you know when I get it working. Thanks for the program.
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Mon Jan 05, 2009 5:13 am    Post subject: Reply with quote

No, thank you, jarealist. This is the first gtk program I have ever sent out into the wild. Any kind of feedback I get is usually really educational and helpful.
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Sat Jan 10, 2009 6:33 am    Post subject: Reply with quote

Matsuu, the reader of cjk has posted an ebuild to portage. The ebuild might not be immediately available from the servers, but people can get it here early if they want.

I think I made a grave mistake with the syntax highlighting. :oops: It works well for about 10 seconds, then sudden, horrible eye strain sets in. If someone else is using 0.12.0 and agrees, please feel free to leave me a message!
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Sat Jan 17, 2009 9:21 pm    Post subject: Reply with quote

Tried version 0.13.1 and at least it won't lock my system anymore, but it still will not start. Get the following when running as normal user from terminal:

$ gwaei
Set CTYPE locale to ja_JP.UTF8
LC_CTYPE=ja_JP.UTF8 /usr/bin/gwaei

Set CTYPE locale to ja_JP.UTF8
LC_CTYPE=ja_JP.UTF8 /usr/bin/gwaei

Set CTYPE locale to ja_JP.UTF8
LC_CTYPE=ja_JP.UTF8 /usr/bin/gwaei

......keeps this up till the program exits with:

Xlib: connection to ":0.0" refused by server
Xlib: Maximum number of clients reached

(gwaei:4773): Gtk-WARNING **: cannot open display: :0.0
Back to top
View user's profile Send private message
pizzach
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 195

PostPosted: Sun Jan 18, 2009 6:01 am    Post subject: Reply with quote

I'm glade I put that testing code in there. :lol:

Set CTYPE locale to ja_JP.UTF8
LC_CTYPE=ja_JP.UTF8 /usr/bin/gwaei

I may have it this time. The output gave me enough clues. I'm also removing the LC_CTYPE=ja_JP.UTF8 /usr/bin/gwaei
as setting it straight in the program seems to work now anyway. I would like it if there was some way I could send you a tarball for testing before doing any more releases, jarealist.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum