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

#196 Post by AnonymousHero »

The message actually says what to do:

Code: Select all

'truncf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
If you add

Code: Select all

 SET(LIBS $(LIBS) m) 
to the CMakeFile somewhere in the SDL section it should work.

darwin
Higher
Posts: 63
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#197 Post by darwin »

AnonymousHero wrote:The message actually says what to do:

Code: Select all

'truncf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
If you add

Code: Select all

 SET(LIBS $(LIBS) m) 
to the CMakeFile somewhere in the SDL section it should work.
I would have to make a patch and diff, which is beyond what I want to do for SlackBuilds and is frowned upon by their team, especially for bugs--if it was something system-specific, that might be different.

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

Re: ToME 2 maintenance

#198 Post by AnonymousHero »

darwin wrote:
AnonymousHero wrote:The message actually says what to do:

Code: Select all

'truncf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
If you add

Code: Select all

 SET(LIBS $(LIBS) m) 
to the CMakeFile somewhere in the SDL section it should work.
I would have to make a patch and diff, which is beyond what I want to do for SlackBuilds and is frowned upon by their team, especially for bugs--if it was something system-specific, that might be different.
It is system dependent. Some distros (or maybe it's just newer versions of the build toolchain) have changed the way the linking works so that transitive link dependencies are not pulled in automatically.

However, adding "m" in any case shouldn't hurt anything, so I've pushed a "fix" to the 2.3.x branch here. If you could please test that this fixes it for you, I'll cut a new release and tag that as 2.3.11-ah.

darwin
Higher
Posts: 63
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#199 Post by darwin »

AnonymousHero wrote: It is system dependent. Some distros (or maybe it's just newer versions of the build toolchain) have changed the way the linking works so that transitive link dependencies are not pulled in automatically.
It is probably the toolchain--I do not think the Slackware team would ever alter anything a developer would want to work the standard way... they configure applications their own way, or not, but that is about it.
However, adding "m" in any case shouldn't hurt anything, so I've pushed a "fix" to the 2.3.x branch here. If you could please test that this fixes it for you, I'll cut a new release and tag that as 2.3.11-ah.
I downloaded it twice and the following happened each time.

Code: Select all

d@cosmos:~$ tar xvf tome2-tome2-v2.3.x.tar.gz 
tome2-tome2/
tome2-tome2/.gitignore
tome2-tome2/BUGS.txt
tome2-tome2/CMakeLists.txt
tome2-tome2/DEBUG.txt
tome2-tome2/README.txt
tome2-tome2/angdos.cfg
tome2-tome2/changes.old

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

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

Re: ToME 2 maintenance

#200 Post by AnonymousHero »

darwin wrote:I downloaded it twice and the following happened each time.

(error message omitted)
Hm. It seems there's something wrong with their download service at the moment. You can also get the code by doing

Code: Select all

git clone -b v2.3.x git://gitorious.org/tome2/tome2.git
in an empty directory somewhere.

darwin
Higher
Posts: 63
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#201 Post by darwin »

AnonymousHero wrote: Hm. It seems there's something wrong with their download service at the moment. You can also get the code by doing

Code: Select all

git clone -b v2.3.x git://gitorious.org/tome2/tome2.git
in an empty directory somewhere.
Ok; it compiled, but there is something wrong with my build unless you changed other things. I may have used parts of an old version, or a SlackBuilds person modified mine, which I then had to download and re-edit. My build is looking for a 'var/games/tome/apex/scores.raw' (and scores.raw.new.) Do you know anything about it? Also, apparently I had made a wrapper called tome.sh that ran the game from a more usual path, but now it is not installed in the build version I have. Hopefully I can figure it all out.

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

Re: ToME 2 maintenance

#202 Post by AnonymousHero »

darwin wrote: Ok; it compiled, but there is something wrong with my build unless you changed other things.
Relative to 2.3.10-ah there's only a single other change related to the Theme module, but that's not the culprit here.
Relative to 2.3.9-ah there's quite a few changes...
darwin wrote: I may have used parts of an old version, or a SlackBuilds person modified mine, which I then had to download and re-edit. My build is looking for a 'var/games/tome/apex/scores.raw' (and scores.raw.new.) Do you know anything about it?
Scores.raw is the "top N characters" score file. (All other *.raw file "support" was removed.)

Is it trying (and failing) to create the file? I'm a bit surprised that it's actually looking for score file in a global location -- I thought I'd changed it to always look in the user's ~. (But perhaps that's just in 'master'.)
darwin wrote: Also, apparently I had made a wrapper called tome.sh that ran the game from a more usual path, but now it is not installed in the build version I have. Hopefully I can figure it all out.
No wrappers should be necessary.

darwin
Higher
Posts: 63
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#203 Post by darwin »

AnonymousHero wrote:
Scores.raw is the "top N characters" score file. (All other *.raw file "support" was removed.)

Is it trying (and failing) to create the file? I'm a bit surprised that it's actually looking for score file in a global location -- I thought I'd changed it to always look in the user's ~. (But perhaps that's just in 'master'.)
No. I guess I had downloaded my build from 235 from SlackBuilds, which rejected my one for 2.3.10-ah, though it was working, so I lost that. The old one, which apparently had some changes they made, was doing all this, and also copying changes.txt, credits.txt from somewhere, which I guess are also gone now.
No wrappers should be necessary.
They may be. As I have said, /usr/share/games/tome/bin is not in the path the system searches for binaries & scripts on any system I know, so it will not run for most users, so I made a link to a wrapper in that path from /usr/games, so a user can run tome from their home and tome executes in its own path and can find its libraries--I do not think it did when I just did a link.

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

Re: ToME 2 maintenance

#204 Post by AnonymousHero »

darwin wrote: No. I guess I had downloaded my build from 235 from SlackBuilds, which rejected my one for 2.3.10-ah, though it was working, so I lost that. The old one, which apparently had some changes they made, was doing all this, and also copying changes.txt, credits.txt from somewhere, which I guess are also gone now.
changes.txt, credits.txt still exist in exactly the same location in the source tree as they always have.

darwin
Higher
Posts: 63
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#205 Post by darwin »

AnonymousHero wrote: changes.txt, credits.txt still exist in exactly the same location in the source tree as they always have.
Ok; I got rid of looking for the .raw file and fixed the part that copies those text files into the package. I am ready to make a SlackBuild anytime you want to release 2.3.11 (I have it installed on my own machine as 2.3.10... of course I will test again if you made any more changes.) :)

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

Re: ToME 2 maintenance

#206 Post by AnonymousHero »

darwin wrote:
AnonymousHero wrote: changes.txt, credits.txt still exist in exactly the same location in the source tree as they always have.
I've tagged 2.3.11-ah. Here's the tree: https://gitorious.org/tome2/tome2/trees/v2.3.11-ah

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

Re: ToME 2 maintenance

#207 Post by Lord Estraven »

Compiles and runs without a hitch on Arch Linux current. :)

mertonhobbit
Low Yeek
Posts: 5
Joined: Sun Jan 06, 2013 6:45 am

Re: ToME 2 maintenance

#208 Post by mertonhobbit »

MAC OSX -- compiling with Xcode.

I don't know much about these things, but here was my attempt. Maybe someone could explain what went wrong.

Downloaded the tar.gz from https://gitorious.org/tome2/tome2/trees/v2.3.11-ah

Downloaded cmake and installed. Went to the tome2-tome2 directory, and ran
cmake -G Xcode

Then fired up Xcode and told it to build (without changing anything). Everything went fine (just four small warnings). The executable came out in tome2-tome2/src/Debug ; seems a bit strange it was buried in src, but okay.

When I ran it, it started a tome window, but it said this:
tome_dofile_anywhere(): file ./lib/mods(mods_aux.lua) doesn't exist in ./lib/mods/mods_aux.luo.
and the same thing for modules.lua. Then
LUA: error: attempt to call a nil value LUA: ERROR in lua_call while calling 'max_modules' from call_lua.
and the same thing for get_module_name. Finally:
Things should start breaking up from now on!

Any thoughts?

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

Re: ToME 2 maintenance

#209 Post by AnonymousHero »

mertonhobbit wrote:MAC OSX -- compiling with Xcode.
(snip)
Then fired up Xcode and told it to build (without changing anything). Everything went fine (just four small warnings). The executable came out in tome2-tome2/src/Debug ; seems a bit strange it was buried in src, but okay.

When I ran it, it started a tome window, but it said this:
tome_dofile_anywhere(): file ./lib/mods(mods_aux.lua) doesn't exist in ./lib/mods/mods_aux.luo.
and the same thing for modules.lua. Then
LUA: error: attempt to call a nil value LUA: ERROR in lua_call while calling 'max_modules' from call_lua.
and the same thing for get_module_name. Finally:
Things should start breaking up from now on!

Any thoughts?
You have to run it with cwd = the directory where the "lib" directory is located. Basically you should do something like

Code: Select all

$ cd /path/to/tome2-tome2
$ ./src/Debug
(replace "/path/to" with the appropriate path)

in a terminal.

pbalint
Posts: 1
Joined: Wed Jun 12, 2013 5:10 pm

Re: ToME 2 maintenance

#210 Post by pbalint »

I've felt nostalgic, so here's a quick and dirty how-to to compile tome 2.3.16 under windows:

From now on, I'll assume MinGW has been installed to the C drive root (meaning there is a c:\MinGW directory with bin, home, lib, etc.. directories)

Install MinGW (C compiler, C++ compiler, basic system, dev kit)
http://sourceforge.net/projects/mingw/f ... e/download

Grab SmartGit: (install/extract somewhere and run)
http://www.syntevo.com/smartgithg/

Clone tome 2.x.x repo
In smartgit: clone repository: git://gitorious.org/tome2/tome2.git
to -say- C:\MinGW\home\tome2

Get CMake (extract to C:\MinGW\home)
http://www.cmake.org/files/v2.8/cmake-2 ... 32-x86.zip

Get Jansson (extract to C:\MinGW\home)
http://www.digip.org/jansson/releases/j ... 2.4.tar.gz

Get pkg-config-lite sources (extract to C:\MinGW\home)
http://sourceforge.net/projects/pkgconfiglite/
http://sourceforge.net/projects/pkgconf ... z/download

From now on I'll omit the version numbers, so instead of jansson-2.4, I'll just write jansson.
Commands to be entered are in bold

Start the mingw shell (commands to be entered are bold)
cd /mingw/home

cd jansson
configure
make
make install
copy C:\mingw\home\jansson\.libs\libjansson.a to C:\mingw\lib (use total commander or windows explorer or whatever)
cd..

cd pkg-config-lite
configure
make
make install
cd..

cd tome2
../cmake/bin/cmake.exe -G "MinGW Makefiles"

Open src/config.h
scroll down till you see the "where to put the user's files"-section
And edit it to this: (basically you'll tell tome to store your files in the current directory for windows builds, this could be changed to the user home directory, but hey, this is a quick&dirty fix :-))

Code: Select all

#if defined(MACH_O_CARBON)
#define PRIVATE_USER_PATH "~/Library/Application Support/ToME"
#define PRIVATE_USER_PATH_DATA
#define PRIVATE_USER_PATH_MODULES
#elif defined(WIN32)
#define PRIVATE_USER_PATH "."
#else
#define PRIVATE_USER_PATH "~/.tome"
#endif
Open src/modules.c
add the following snippet right after the line saying: #include "angband.h"
(quick&dirty again, as this should come from main-win.c, but hey...)

Code: Select all

#include <sys/stat.h>
bool_ private_check_user_directory(cptr dirpath)
{
	struct stat stat_buf;
	int ret;
	ret = stat(dirpath, &stat_buf);
	if (ret == 0)
	{
		if ((stat_buf.st_mode & S_IFMT) == S_IFDIR) return (TRUE);
		return (FALSE);
	}
	else
	{
		ret = mkdir(dirpath);
		if (ret == -1) return (FALSE);
		return (TRUE);
	}
}
mingw32-make
cp src/tome.exe .
mkdir 2.3
mkdir 2.3/save
tome.exe :-)

To run tome, you'll need what's in the tome2 folder,
except:
the .git folder
the CMakeFiles folder
the src folder
you can delete everything else (mingw, jansson, cmake, etc...)

Enjoy!

Post Reply