ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Oct 31, 2014 7:07 pm

All times are UTC




Post new topic Reply to topic  [ 231 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16  Next
Author Message
 Post subject: Re: ToME 2 maintenance
PostPosted: Wed Nov 28, 2012 4:09 pm 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
The message actually says what to do:
Code:
'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:
 SET(LIBS $(LIBS) m)
to the CMakeFile somewhere in the SDL section it should work.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Nov 29, 2012 10:36 am 
Offline
Higher

Joined: Mon Nov 10, 2008 2:11 pm
Posts: 51
AnonymousHero wrote:
The message actually says what to do:
Code:
'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:
 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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Nov 29, 2012 5:00 pm 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
darwin wrote:
AnonymousHero wrote:
The message actually says what to do:
Code:
'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:
 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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Thu Nov 29, 2012 10:14 pm 
Offline
Higher

Joined: Mon Nov 10, 2008 2:11 pm
Posts: 51
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.

Quote:
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:
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


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 3:32 am 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
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:
git clone -b v2.3.x git://gitorious.org/tome2/tome2.git


in an empty directory somewhere.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 4:27 am 
Offline
Higher

Joined: Mon Nov 10, 2008 2:11 pm
Posts: 51
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:
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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 4:49 am 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 4:55 am 
Offline
Higher

Joined: Mon Nov 10, 2008 2:11 pm
Posts: 51
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.

Quote:
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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 6:01 am 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
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.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Fri Nov 30, 2012 7:59 am 
Offline
Higher

Joined: Mon Nov 10, 2008 2:11 pm
Posts: 51
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.) :)


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Mon Dec 03, 2012 4:05 pm 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
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


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Mon Dec 03, 2012 11:30 pm 
Offline
Spiderkin

Joined: Tue Dec 13, 2005 12:35 am
Posts: 592
Compiles and runs without a hitch on Arch Linux current. :)

_________________
You analyze the Dickens Novel.
You analyze the Dickens Novel. (x97)
Nothing happens.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Jan 06, 2013 6:56 am 
Offline
Low Yeek

Joined: Sun Jan 06, 2013 6:45 am
Posts: 5
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?


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Jan 06, 2013 3:58 pm 
Offline
Archmage

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 395
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:
$ cd /path/to/tome2-tome2
$ ./src/Debug

(replace "/path/to" with the appropriate path)

in a terminal.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Wed Jun 12, 2013 6:19 pm 
Offline

Joined: Wed Jun 12, 2013 5:10 pm
Posts: 1
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:
#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:
#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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 231 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group