PDA

View Full Version : Wanted: Linux user to compile pre-alpha


PaulBlay
April 7, 2009, 17:45
I've had a report that the Angband variant I'm working on won't run under Linux. I don't have Linux (and I didn't think I'd changed anything that would have broken it ...). So basically I'd be grateful if somebody could download the SVN and check whether it runs or not.

If you could fix it as well I'd be REALLY grateful. :D

See
http://sourceforge.jp/projects/angband65/

It's code altered from the latest Vanilla Angband SVN so it should be quite familiar to Angband developers.

Magnate
April 7, 2009, 19:49
I don't understand - what's stopping you getting Linux? It's not like saying "I don't have MacOS" or "I don't have RISCOS". You can download Linux and test the compilation yourself in less than an hour.

??

PaulBlay
April 7, 2009, 20:08
I don't understand - what's stopping you getting Linux? It's not like saying "I don't have MacOS" or "I don't have RISCOS". You can download Linux and test the compilation yourself in less than an hour.

??

Well for one thing I'm on a limited bandwidth internet connection (that goes over about one month in three).

For a second I know nothing worth mentioning about Linux so it would take me a lot longer than an hour to get up to speed.

Seriously though, even if it's 'just' an hour it should be more like five minutes to someone who already knows Linux and has experience compiling Angband variants.

[EDIT] Oh yes, I also have no writeable CDs, no CD writer attached to my computer and the last time I tried to install Linux on a computer it worked for about a fortnight then mysteriously stopped booting on the Linux partition which never worked again.

Magnate
April 7, 2009, 22:07
Ok, well I commiserate you on your experience so far. Linux is well worth persevering with - once you master it, you'll never look back. If you do give it another try, let me know.

In the meantime, I'll have a go at compiling your variant. Watch this space.

PaulBlay
April 7, 2009, 22:15
Ok, well I commiserate you on your experience so far. Linux is well worth persevering with - once you master it, you'll never look back. If you do give it another try, let me know.

In the meantime, I'll have a go at compiling your variant. Watch this space.

Thanks. I had someone give it a go from rec.games.roguelike.development but they had a rather odd error not the same as the earlier report I had (which had something reported wrong with 'object.txt').

src/autoconf.h.in was said to be missing, but that is supposed to be autogenerated (according to what I read in rephial (http://trac.rephial.org/changeset/182)).

PaulBlay
April 8, 2009, 10:14
It looks like a number of files had gone missing (or not been copied in the first place) that relate to compiling in Linux. I have fixed everything I could find of them.

Magnate
April 8, 2009, 12:33
It compiles on i386 Linux, but only after I manually set autogen.sh to be executable! I did configure --with-noinstall, so it compiled with X11 and curses support but not SDL. It compiled with the following warnings:

object/obj-info.c: In function 'describe_slays':
object/obj-info.c:402: warning: unused variable 'descs'
object/randart.c: In function 'parse_frequencies':
object/randart.c:1450: warning: suggest parentheses around && within ||
object/randart.c: In function 'add_ability':
object/randart.c:3136: warning: suggest parentheses around && within ||
object/randart.c: At top level:
object/randart.c:796: warning: 'do_p2val' defined but not used
store.c: In function 'store_maint':
store.c:1443: warning: 'return' with no value, in function returning non-void
store.c:1449: warning: 'return' with no value, in function returning non-void
store.c:1519: warning: control reaches end of non-void function

I don't have time to play-test it, but now I've checked it out I'm happy to update and recompile periodically to confirm that it still builds under Linux.

Btw, you really want to keep your trunk free of all the configure-related stuff. That's the whole point of using autogen.sh

PaulBlay
April 8, 2009, 13:42
It compiles on i386 Linux, but only after I manually set autogen.sh to be executable!
Apparently my setup doesn't copy SVN properties with files. I've set it now.

I did configure --with-noinstall, so it compiled with X11 and curses support but not SDL. It compiled with the following warnings:
Looks like your compiler checks for more (or at least different) warnings than mine does.

object/obj-info.c: In function 'describe_slays':
object/obj-info.c:402: warning: unused variable 'descs'
object/randart.c: In function 'parse_frequencies':
object/randart.c:1450: warning: suggest parentheses around && within ||
object/randart.c: In function 'add_ability':
object/randart.c:3136: warning: suggest parentheses around && within ||
object/randart.c: At top level:
object/randart.c:796: warning: 'do_p2val' defined but not used
store.c: In function 'store_maint':
store.c:1443: warning: 'return' with no value, in function returning non-void
store.c:1449: warning: 'return' with no value, in function returning non-void
store.c:1519: warning: control reaches end of non-void function

Think I've got all those.

I don't have time to play-test it, but now I've checked it out I'm happy to update and recompile periodically to confirm that it still builds under Linux.
Unfortunately I don't really need a play tester right now - at least until I fix one major bug I've just noticed.

Btw, you really want to keep your trunk free of all the configure-related stuff. That's the whole point of using autogen.sh

Apart from 'autoconf.h.in' (which I put in due to an earlier misunderstanding) I think all the 'configure related stuff' is present in the Angband SVN trunk.

Pete Mack
April 8, 2009, 15:10
@paul-
looks like you need a new (or at least different) compiler. Some of those warnings are almost certain bugs, like the messed-up return values. And the missing parentheses are also risky practice. If you mean (A || (B && C)), it's wise to write it that way, because sometimes you might have really meant ((A || B) && C). logical precedence rules are sometimes nonintuitive.

Install MINGW/gcc and run it occasionally for compiler warnings, even if you are using DevCC for editing.

PaulBlay
April 8, 2009, 16:48
@paul-
looks like you need a new (or at least different) compiler.

Probably. Getting used to a new compiler is a pain though. I've been through BCC32 and LCC32 before Dev-C++. I'm trying to get Open Watcom to work for me at the moment.

PaulBlay
April 8, 2009, 17:33
I'm trying to get Open Watcom to work for me at the moment.

Not having much luck yet. Some of the warnings appear incorrect (to my inexperienced eye). For example the following line

if (parse_under && (ke.key >=0 && ke.key <= 32))

gets a "Warning! W124: Comparison result always 1", but I can't see what's wrong with it.

I also have a whole bunch of

Symbol 'SCREEN_REGION' has been defined, but not referenced

warnings, but it's being used like

menu_layout(menu, &SCREEN_REGION);

all over the place. Does 'referenced' mean something else than what I think it does?

Pete Mack
April 8, 2009, 17:39
@paul:
Those warnings are both extremely dubious (ie: wrong). I wouldn't trust the compiler to generate reliable code.

Why pick yet another obsolete compiler? Just use gcc on the command line for a reference, even if you still want to use DevCC for an IDE.


Or go all the way and install Visual C++ express. It's a huge (~800MB) download, but it's an extremely good IDE and compiler.

PaulBlay
April 8, 2009, 17:47
@paul:
Those warnings are both extremely dubious (ie: wrong). I wouldn't trust the compiler to generate reliable code.

Why pick yet another obsolete compiler?

To be fair its last release was in February 2009 so it wasn't exactly obvious to me that it was obsolete.

Or go all the way and install Visual C++ express. It's a huge (~800MB) download, but it's an extremely good IDE and compiler.
I've got Visual C++ installed, it was on the list of compilers to try eventually. I guess I just have bad judgement in picking which ones to try. :confused:

takkaria
April 8, 2009, 17:56
Not having much luck yet. Some of the warnings appear incorrect (to my inexperienced eye). For example the following line

if (parse_under && (ke.key >=0 && ke.key <= 32))

gets a "Warning! W124: Comparison result always 1", but I can't see what's wrong with it.

Looks like ke.key is unsigned on Watcom, when it's not elsewhere. Hence, "ke.key >= 0" will always be true.

I also have a whole bunch of

Symbol 'SCREEN_REGION' has been defined, but not referenced

warnings, but it's being used like

menu_layout(menu, &SCREEN_REGION);

all over the place. Does 'referenced' mean something else than what I think it does?

No. What's happening is that a header file is causing SCREEN_REGION to be defined as static in every single file, even those which don't make use of it. You'll only be getting warnings from the files which don't reference SCREEN_REGION but nevertheless include the ui.h (I think) file.

Pete Mack
April 8, 2009, 17:56
To be fair its last release was in February 2009 so it wasn't exactly obvious to me that it was obsolete.

I had no idea. I wonder what keeps it alive? Anyway, those warnings are wrong.

Really, gcc (aka MINGW) and Visual Studio are the industry standards, with Sun and HP still around for special-purpose code. (lcc is still out there for a light-weight portable compiler, but since it doesn't include C++, it's kind of obsolete.)

zaimoni
April 10, 2009, 17:16
I had no idea. I wonder what keeps it alive?The Watcom compiler was open-sourced a few years back; it's properly OpenWatcom now.

PaulBlay
April 10, 2009, 19:05
The Watcom compiler was open-sourced a few years back; it's properly OpenWatcom now.

Hence
I'm trying to get Open Watcom to work for me at the moment.

Incidentally it is apparently possible to work around the 'same filename different directory' problem, but it's not very user friendly so I'm leaving it for now.

VC++ has its own quirks (angband.ico has to be in the same directory as angband.rc, for instance).