Oangband 0.7 compilation problems

G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

I am using SuSE linux 9.3 - x86_64(Athlon64) version and I am having
problems getting oangand to work.
I appears to compile ok, but when I try to run it, it freezes on the
more prompt after telling me that the save file doesn't exist. I tried
using an old save file, and it froze on the more prompt after restoring
dungeons.
I have compiled it ok on my old 32-bit laptop which also runs Suse 9.3,
but the 32-bit version.
Has anyone else had this problem? Do you know a way round it. I just
used configure followed by make with no options. I have gcc 3.3.5 and
automake 1.9.5 if it matters.
I have not had this problem with any other angband versions.

any help would be appreciated - my knowledge of how to compile things
is limited at best!
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

Trin Tragula <simon.doubleday@btinternet.com> wrote:
> I am using SuSE linux 9.3 - x86_64(Athlon64) version and I am having
> problems getting oangand to work.
> I appears to compile ok, but when I try to run it, it freezes on the
> more prompt after telling me that the save file doesn't exist. I tried
> using an old save file, and it froze on the more prompt after restoring
> dungeons.

Add a line:

#define L64

in src/h-config.h. That will re-do the typedefs so that Angband's
"u32b" and "s32b" types use ints instead of longs. This define is
automatically used on some Alpha machines, and should probably be
updated now that 64-bit machines are more prevalent.

Keldon
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

On 2005-07-06, Keldon Jones <keldon@keldon.net> wrote:
> Trin Tragula <simon.doubleday@btinternet.com> wrote:
>> I am using SuSE linux 9.3 - x86_64(Athlon64) version and I am having
>> problems getting oangand to work.
>> I appears to compile ok, but when I try to run it, it freezes on the
>> more prompt after telling me that the save file doesn't exist. I tried
>> using an old save file, and it froze on the more prompt after restoring
>> dungeons.
>
> Add a line:
>
> #define L64
>
> in src/h-config.h. That will re-do the typedefs so that Angband's
> "u32b" and "s32b" types use ints instead of longs. This define is
> automatically used on some Alpha machines, and should probably be
> updated now that 64-bit machines are more prevalent.
>
> Keldon

I have no 64-bit system to check on, but after a little poking around in
limits and checking on the net it seems to me that the following code
change should at least work on systems with GCC. If it doesn't, tell me!

Index: src/h-config.h
===================================================================
--- src/h-config.h (revision 35)
+++ src/h-config.h (working copy)
@@ -192,8 +192,18 @@
* OPTION: Define "L64" if a "long" is 64-bits. See "h-types.h"
* The only such platform that angband is ported to is currently
* DEC Alpha AXP running OSF/1 (OpenVMS uses 32-bit longs).
+ *
+ * Try to use __WORDSIZE to test for 64-bit platforms.
+ * I don't know how portable this is.
+ * -CJN-
*/
-#if defined(__alpha) && defined(__osf__)
+#ifdef __WORDSIZE
+# if __WORDSIZE == 64
+# define L64
+# endif
+#endif
+
+#if defined(__alpha) && defined(__osf__) && !defined(L64)
# define L64
#endif

--
Christer Nyfalt
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

On 2005-07-07, Christer Nyfalt <christer.nyfalt@welho.null.com> wrote:
>
> I have no 64-bit system to check on, but after a little poking around in
> limits and checking on the net it seems to me that the following code
> change should at least work on systems with GCC. If it doesn't, tell me!
>
> Index: src/h-config.h
>===================================================================
> --- src/h-config.h (revision 35)
> +++ src/h-config.h (working copy)
> @@ -192,8 +192,18 @@
> * OPTION: Define "L64" if a "long" is 64-bits. See "h-types.h"
> * The only such platform that angband is ported to is currently
> * DEC Alpha AXP running OSF/1 (OpenVMS uses 32-bit longs).
> + *
> + * Try to use __WORDSIZE to test for 64-bit platforms.
> + * I don't know how portable this is.
> + * -CJN-
> */
> -#if defined(__alpha) && defined(__osf__)
> +#ifdef __WORDSIZE
> +# if __WORDSIZE == 64
> +# define L64
> +# endif
> +#endif
> +
> +#if defined(__alpha) && defined(__osf__) && !defined(L64)
> # define L64
> #endif
>

I forgot this, but you also need to make sure that __WORDSIZE is available.
Add #include <limits.h> to the begining of h-config.h!


--
Christer Nyfalt
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

Thanks for the sugestions. I changed h-config-h and tried compiling
again, but it still crashes at the same place as before.
The version I compiled on my laptop works fine on my athlon64 machine,
so it's not that much of a problem for me.
Maybe there is something odd in my setup that makes in freeze, but its
strange that it only happens on oangband.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

On 2005-07-07, Trin Tragula <simon.doubleday@btinternet.com> wrote:
> Thanks for the sugestions. I changed h-config-h and tried compiling
> again, but it still crashes at the same place as before.
> The version I compiled on my laptop works fine on my athlon64 machine,
> so it's not that much of a problem for me.
> Maybe there is something odd in my setup that makes in freeze, but its
> strange that it only happens on oangband.
>
Your laptop is 32-bit?
Have you tried to compare the autoconf.h headers for both versions and see
if there is some difference? This difference might give us a hint on where
the problem is.
It could also be that there is a bug in the 64-bit support of you compiler.
You might consider upgrading to a newer version if there is one available.

--
Christer Nyfalt
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

In article <slrndcr7tc.3lg.christer.nyfalt@localhost.localdomain>,
Christer Nyfalt <christer.nyfalt@welho.null.com> wrote:
>On 2005-07-07, Trin Tragula <simon.doubleday@btinternet.com> wrote:
>> Thanks for the sugestions. I changed h-config-h and tried compiling
>> again, but it still crashes at the same place as before.
>> The version I compiled on my laptop works fine on my athlon64 machine,
>> so it's not that much of a problem for me.
>> Maybe there is something odd in my setup that makes in freeze, but its
>> strange that it only happens on oangband.
>>
>Your laptop is 32-bit?
>Have you tried to compare the autoconf.h headers for both versions and see
>if there is some difference? This difference might give us a hint on where
>the problem is.
>It could also be that there is a bug in the 64-bit support of you compiler.
>You might consider upgrading to a newer version if there is one available.

It could also be a bug in O that only manifests with 64-bit longs.
--
Julian Lighton jl8e@fragment.com
/* You are not expected to understand this. */
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

Thanks to the OAngband compile problems thread, I came to a resolution
about this issue in less then five minutes - a record for me.

anyway, defining L64 is necessarry to get a working zangband (and, I'd
guess, most other variants as well) on any pure x86-64 machine without
any 32bit compatability code. I'm guessing this problem isn't vary
common, but best to fix it now.

the problem manifests itself as this for me:

You start the game, it recognizes the fact that it's lacking a
savefile, goes through character selection, lets you put in the wieghts
for the traits when it autorolls, and promptly freezes.

I never bothered to run it through gdb or strace, as I found an answer
here quickly and easily enough. Add #define L64 outside of any ifs in
h-config.h and the game works fine.