ToME 2 maintenance

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Message
Author
AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#241 Post by AnonymousHero »

Lord Estraven wrote:It wasn't swapping; my guess is a scheduling or driver issue. For all that FreeBSD does sound mixing in kernel space, it seems to have problems with sound skipping under load. This also happens during heavy disk I/O, e.g. when installing stuff in Virtualbox.

Happens on my workstation. Not on my laptop. No hints in dmesg or anything. I very much doubt it's curable, especially seeing as the workstation is a relatively recent custom machine; vs. my fleet of laptops, which were all built circa 2007.

(And FreeBSD is a great OS in a lot of respects, but still playing catch-up to Linux in some areas. The problem is compounded by the old licensing incompatibility with Linux kernel code.)
Good to hear that it's at least isolated to a single setup rather than being a general issue on FreeBSD. I think the sound issue is probably just that the buffers are actually underflowing because the userspace program which is actually supplying the sound isn't getting scheduled frequently enough. You could upping the scheduling priority of your music player to see if that helps -- though it might be a long shot since I/O throughput is often prioritized above all else.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#242 Post by Lord Estraven »

I think that last applies, unfortunately. I had already niced the gmake process. I'm going to say that, at the moment, FreeBSD may be less suited than Linux to interactive tasks on recent multicore desktops.

Harmless
Cornac
Posts: 34
Joined: Sun Aug 16, 2009 4:40 pm

Re: ToME 2 maintenance

#243 Post by Harmless »

Anyone able to help me compile the code on https://gitlab.com/tome2/tome2/tree/master? The last time I coded anything was pascal when I was in college around '97. Fooling around with the .h and .info files is fun enough, and I'll learn wtf I'm doing, but I can't get it to compile even without any changes for the life of me. I'm on Windows 7, installed mingw and cmake. I ran the cmake gui configuration tool and set it to use mingw, set the source code location to c:/tome2.git/src, then hit the generate button. After almost no time it says generation complete and a bunch of cmake files are dumped into the directory I set. I have no clue where to go after that, or if what I've done is correct. Any help would be greatly appreciated.
Thanks in advance!

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#244 Post by AnonymousHero »

Harmless wrote:Anyone able to help me compile the code on https://gitlab.com/tome2/tome2/tree/master? The last time I coded anything was pascal when I was in college around '97. Fooling around with the .h and .info files is fun enough, and I'll learn wtf I'm doing, but I can't get it to compile even without any changes for the life of me. I'm on Windows 7, installed mingw and cmake. I ran the cmake gui configuration tool and set it to use mingw, set the source code location to c:/tome2.git/src, then hit the generate button. After almost no time it says generation complete and a bunch of cmake files are dumped into the directory I set. I have no clue where to go after that, or if what I've done is correct. Any help would be greatly appreciated.
Thanks in advance!
According to the README.txt you should be able to run "mingw32-make" to get the build process going. (Since you've already done the cmake configuration.)

Harmless
Cornac
Posts: 34
Joined: Sun Aug 16, 2009 4:40 pm

Re: ToME 2 maintenance

#245 Post by Harmless »

OK, I'm much further along, but just as lost if not moreso than before. After running through the jansson walkthrough again, and talking to a developer friend who showed me where the the jansson include files go (the mingw/include directory), I can get to 68% before it errors out.

Sorry for incoming spam!
C:\tome2>mingw32-make
Linking C executable tome.exe
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x37): undefined r
eference to `json_delete'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17ba): undefined
reference to `json_null'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17c4): undefined
reference to `json_object'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17dc): undefined
reference to `json_string'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17f3): undefined
reference to `json_object_set_new'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x1816): undefined
reference to `json_array'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x184f): undefined
reference to `json_array_append_new'
followed by another 50 lines or so of roughly the same thing, undefined references to jason_foo.

Any suggestions? Thanks again!

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#246 Post by AnonymousHero »

Harmless wrote:OK, I'm much further along, but just as lost if not moreso than before. After running through the jansson walkthrough again, and talking to a developer friend who showed me where the the jansson include files go (the mingw/include directory), I can get to 68% before it errors out.

Sorry for incoming spam!
C:\tome2>mingw32-make
Linking C executable tome.exe
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x37): undefined r
eference to `json_delete'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17ba): undefined
reference to `json_null'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17c4): undefined
reference to `json_object'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17dc): undefined
reference to `json_string'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x17f3): undefined
reference to `json_object_set_new'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x1816): undefined
reference to `json_array'
CMakeFiles\tome.dir/objects.a(squeltch.obj):squeltch.c:(.text+0x184f): undefined
reference to `json_array_append_new'
followed by another 50 lines or so of roughly the same thing, undefined references to jason_foo.

Any suggestions? Thanks again!
The include files are being found properly. It's the library files that are not being found. I should think they would have a ".a" or ".so" suffix on mingw.

Which exact version of the code are you compiling? A git hash would be ideal, you can get it by running

Code: Select all

git rev-parse HEAD
(There was a recent fix for jansson linking and I'd like to confirm whether you have that or not.)

Btw, in this forum you can use "code" tags to wrap compiler/console output.

Harmless
Cornac
Posts: 34
Joined: Sun Aug 16, 2009 4:40 pm

Re: ToME 2 maintenance

#247 Post by Harmless »

Ok, I installed git from http://git-scm.com/download/win. git version lists 1.9.5.msysgit.1
I tried running git rev-parse HEAD as you suggested, but it gives me: fatal: not a git repository (or any of the parent directories): .git
It's possible I'm running it from the wrong directory, but I'll be honest I'm not even sure what git is actually doing. I still would really like to play around and learn from the game code, but the number of steps it's taking just to try and get it to compile is one hell of a road block.

I'll keep trying as long as you're willing to help though, thanks again AH

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#248 Post by AnonymousHero »

Harmless wrote:Ok, I installed git from http://git-scm.com/download/win. git version lists 1.9.5.msysgit.1
I tried running git rev-parse HEAD as you suggested, but it gives me: fatal: not a git repository (or any of the parent directories): .git
It's possible I'm running it from the wrong directory, but I'll be honest I'm not even sure what git is actually doing. I still would really like to play around and learn from the game code, but the number of steps it's taking just to try and get it to compile is one hell of a road block.
Alright, it seems you're not running from the directory you've cloned, i.e. you need to 'cd' into the tome2 directory before running the git command.

Harmless
Cornac
Posts: 34
Joined: Sun Aug 16, 2009 4:40 pm

Re: ToME 2 maintenance

#249 Post by Harmless »

OK, so after some support I ran the Git GUI, and downloaded the repository from https://gitorious.org/tome2/tome2.git into a new folder. Running the command line from there worked, and gives me an output of .. why can't I mark this window like a command prompt to copy/paste.
610a2e1502ea39e28f23daff7a39cc9c2c254944

Shany
Low Yeek
Posts: 8
Joined: Wed May 27, 2015 1:32 pm

Re: ToME 2 maintenance

#250 Post by Shany »

Found a bug in automatizer - results of "auto-destroy" and "auto-pickup" functions are ignored, so if you have "auto-pickup" item in your inventory (or, in theory, you meet some undestructable "auto-destroy" item), endless loop protection is activated, and some rules are not processed. Here is the patch.
Attachments
tome2-squeltch-bugfix.zip
(472 Bytes) Downloaded 625 times
Last edited by Shany on Sat May 30, 2015 10:17 am, edited 1 time in total.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#251 Post by AnonymousHero »

Thanks, I'll have a look-see tomorrow. If you like you could also submit merge requests on gitlab...?

That way you'd get proper credit aside from the somewhat understated "Thanks to XXX for the fix" in the commit message. I can certainly understand if you want to stay anonymous, so it's entirely up to you ;).

Shany
Low Yeek
Posts: 8
Joined: Wed May 27, 2015 1:32 pm

Re: ToME 2 maintenance

#252 Post by Shany »

AnonymousHero wrote:I can certainly understand if you want to stay anonymous
I do, thank you. )

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#253 Post by AnonymousHero »

Shany wrote:
AnonymousHero wrote:I can certainly understand if you want to stay anonymous
I do, thank you. )
Fair enough. (You can actually also do that with git, you'd just have to set your email/author settings explicitly.)

Just in case I need to relicense[1]: Would you consent to licensing your contribution as Public Domain?

[1] Probably not going to happen, but one does hope...

Shany
Low Yeek
Posts: 8
Joined: Wed May 27, 2015 1:32 pm

Re: ToME 2 maintenance

#254 Post by Shany »

AnonymousHero wrote:(You can actually also do that with git, you'd just have to set your email/author settings explicitly.)
Honestly, I also was too lazy to register on gitlab just for one patch. )
AnonymousHero wrote:Just in case I need to relicense[1]: Would you consent to licensing your contribution as Public Domain?
Of course. By the way, which license is used now? I didn't find it in the source code.
Last edited by Shany on Sun May 31, 2015 10:27 am, edited 1 time in total.

Shany
Low Yeek
Posts: 8
Joined: Wed May 27, 2015 1:32 pm

Re: ToME 2 maintenance

#255 Post by Shany »

I remembered about my old small improvement: "!a" inscription prevents accidental decomposition of the item by alchemy "extract" command. I'll be glad if you find it usable.
Attachments
tome2-not_alchem-inscription.patch.zip
(589 Bytes) Downloaded 669 times

Post Reply