PDA

View Full Version : Problems compiling xkanon


Freakker
2005-11-11, 00:27
Is anybody else able to compile xkanon-0.48?
I tried compiling it on Unbuntu linux 5.10 and I got a whole mess of error messages.(link) (http://nothingness.alsplastics.com/xkanonerrors.txt)

STaNLI
2005-11-11, 02:03
I suspect it's a GCC4 thing -- they started getting closer to the C++ standards, and lots of people's code is broken. Try running configure as

CXX="g++-3.3" CC="gcc-3.3" ./configure

to set the compiler versions explicitly

Freakker
2005-11-11, 11:19
Thanks, that fixed those specific errors, it didn't give me those errors, but I got tons of undefined reference errors, most of them in files in /usr/include/sigc++-1.0/sigc++/.
I'll try posting the errors later.

Haeleth
2005-11-11, 12:26
Don't waste too much time bashing your head on this - I'm actually working on fixing xkanon to compile with g++ 4.0 myself at the moment, so the problem should go away pretty soon. ^_^

Turns out the latest official xkanon (2005-5-15) actually includes all of Arkazam's changes that Jagarl could see the point of, so it almost works with the English version as it is. All I really have to do is put back in the changes Jagarl couldn't see the point of, because they were duplicating some obscure AVG32 implementation details that AFAIK my hacks are the only programs ever to use. And fix the one file in the latest version that doesn't compile OOTB with g++ 4.0 (some template specialisation issues).

Haeleth
2005-11-12, 16:27
Okay, try this:
Download xkanon 2005.5.15 from the official site (http://creator.club.ne.jp/~jagarl/xkanon-050515.tar.gz).
Apply this patch (http://dev.haeleth.net/xkanon/xk-haeleth.patch).That should let it build with GCC 4, and it will also give you the most up-to-date features of both Jagarl's and Arkazam's branches, plus a couple of Haeleth-exclusive functions.

Freakker
2005-11-14, 02:49
It compiles with a few warnings, but it works fine with the un-patched version.
When I use xkanon-install from Arkazam's branch to install the patch, once I run xkanon I can't see any words at all, and the title screen in untranslated.
Am I missing some font package or something?

Haeleth
2005-11-14, 05:33
The warnings are annoying, but I can't figure out what kind of definition it's asking for... actually I can't even figure out why that particular code is using templates at all, since AFAICT it defines a template that's only ever used through one of two explicit specialisations, which when I learned programming was what we called a "class hierarchy". But I haven't looked too deeply, so maybe I'm missing something. :/

ANYWAY. You shouldn't need any special fonts. What happens if you specify one on the command line, with either xayusys &#91;...&#93; --font -*-*-*-r-*-*-24-*-*-*-m-*-iso8859-1, or the equivalent with <tt>--ttfont</tt> if you compiled in Freetype support?

If by the title screen being untranslated you mean that even the menu options are coming up in Japanese, however, then it sounds like something went wrong with the patch process. Did Arkazam's installer leave any handy output or log files or anything? :/

Freakker
2005-11-14, 09:50
I tried installed Kanon in /usr/local/share/xayusys/xkanon, but when I installed the patch I forgot to do it as root, so I got a permission error, and that was the only error I got.
I'll try installing it again and then post the results.

Freakker
2005-11-15, 18:25
I reinstalled Kanon and then I used KSetup to install the patch, and for the most part it looks like it worked(no errors, but the title screen's options turn back into japanese when you hover over them).

If I start xayusys with the --font option, I get the following billhead@Ayu&#58;~$ xayusys --font -*-*-*-r-*-*-24-*-*-*-m-*-iso8859-1
opening socket, format = 0x00001010 at 11025 Hz
opening socket, format = 0x00001021 at 44100 Hz

Gdk-CRITICAL **&#58; file gdkgc.c&#58; line 483 &#40;gdk_gc_set_font&#41;&#58; assertion `gc != NULL' failed.

Gdk-CRITICAL **&#58; file gdkgc.c&#58; line 483 &#40;gdk_gc_set_font&#41;&#58; assertion `gc != NULL' failed.

Gdk-CRITICAL **&#58; file gdkgc.c&#58; line 483 &#40;gdk_gc_set_font&#41;&#58; assertion `gc != NULL' failed.
Cannot find config name '#EXFONT_N_NAME'
global jump to senario 2
not supported command! &#58; ??? &#40;Stop wav file and clear music buffer?
not supported command! &#58; cmd 0x31 - 2 &#58; clear text rank buffer.
not supported command! &#58; set Retkey wait.
global jump to senario 50
Now Music shutdown ... Done!

But there is no text except for one or two characters every couple of paragraphs, such as a copyright symbol or the number three.

If I start it with --ttfont, I get the following:billhead@Ayu&#58;~$ xayusys --ttfont -*-*-*-r-*-*-24-*-*-*-m-*-iso8859-1
opening socket, format = 0x00001010 at 11025 Hz
opening socket, format = 0x00001021 at 44100 Hz
ttfont_init&#40;&#41;&#58; FreeType initialized.
ttfont_load&#40;&#41;&#58; Could not open file.
ttfont_deinit&#40;&#41;&#58; FreeType done.
ttfont_init&#40;&#41;&#58; FreeType initialized.
ttfont_load&#40;&#41;&#58; Could not open file.
ttfont_deinit&#40;&#41;&#58; FreeType done.
Cannot find config name '#EXFONT_N_NAME'
global jump to senario 2
not supported command! &#58; ??? &#40;Stop wav file and clear music buffer?
not supported command! &#58; cmd 0x31 - 2 &#58; clear text rank buffer.
not supported command! &#58; set Retkey wait.
global jump to senario 50
Segmentation Fault.Now Music shutdown ... Done!
It shuts down right before it would normally start displaying text.

Haeleth
2005-11-16, 05:28
If the title screen's options are turning back into Japanese, then the patch still isn't properly installed. The fact that it's not finding the #EXFONT_N_NAME option in gameexe.ini also shows this (it's not there in the original Kanon, but it's added by the patch). So I'm guessing your SEEN.TXT has not been patched, and you're seeing Japanese text being interpreted as Latin-1; you can confirm this by checking the MD5 of dat/seen.txt against the version on your Kanon CD.

I'm confused that you didn't see any error messages, if the patch failed. I've just run it, to test whether the binaries I'm distributing still work on modern Linices, and it's fine in mine (Debian Experimental with kernel 2.6.14-1-k7). Could you post the complete ksetup output (or email it to me if it's too big to go in a post)?

BTW, for --ttfont you have to supply the path to a TrueType font file, not an X font identifier. For some reason it segfaults on most fonts, at least for me; it works with MS Gothic (but you're unlikely to have that on a Linux box), and it mostly works with the default.ttf supplied in my Kira translation, though I'm seeing occasional crashes there too which I really ought to get round to tracking down. ^_^

Freakker
2005-11-17, 00:23
My linux n00b-ness rears its head.
I didn't notice that when I was compiling that it said the command msgfmt could not be found(its not installed by default on Ubuntu), I though nothing of all the files KSetup said didn't need to be patched...

Using MSGothic, I finaly got it to work.
Most of this could have been avoided if I actualy paid attention...
Thanks for the help, now I just have to get around to putting the voice patch.

AireTamStorm
2005-12-06, 20:05
I get errors as well, but they seem to be different than the ones posted.

http://ultimatum.redirectme.net:8000/errors.txt


Running SuSE 9.3 Professional btw.

zalas
2005-12-06, 20:21
While I know xkanon probably came out way before SDL became well-known/stable/well-tested, it really would've been nice if it had been written in SDL ^_^;

Freakker
2005-12-06, 22:22
I forgot to mention, full screen doesn't work for me.

Haeleth
2005-12-07, 05:27
I get errors as well, but they seem to be different than the ones posted.
Running SuSE 9.3 Professional btw.
Looks like a bug in the configuration code. Try adding -DUSE_OSS to the CFLAGS definition in contrib/Makefile and rebuilding.

I forgot to mention, full screen doesn't work for me.
Can't help you there, I'm afraid - it doesn't work for me either, but I haven't worked out why yet. :/

Incidentally, anyone using xkanon who isn't using the latest version (2005.12.1) from http://dev.haeleth.net/xkanon.html should consider switching; nothing else will work quite properly with the final patch, when eventually that appears.

AireTamStorm
2005-12-09, 08:41
Ok adding -DUSE_OSS worked for the compile... then I ran the xkanon-install script. I ran into an error somewhere along the line and now xkanon-install is broken.

Now xkanon-install returns an error without even getting to the menu:

Cannot find file /cdrom/gameexe.init ; may be invalid directory.

Haeleth
2005-12-09, 12:31
Almost certainly either your Kanon CD isn't mounted at /cdrom, or you don't have read permissions for it. You also need write permissions to /usr/local/share, unless you modify xkanon-install to put the game data somewhere else.

Basically, you need to use a command line likesudo xkanon-install /path/to/cd/drive(or su to root first, if for some reason you don't have sudo available.)

I'll update the package to improve the error messages from the installation script, and clarify the README to mention the permissions you need. Thanks for the valuable testing reports - at least nobody is going to have to go through all this again!