|
![]() |
#1 |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
![]()
Anyone able to point me and my compiler in the correct direction?
[mark@mb1 angband-b1011f7cb2d409b7581ab6ad7fede9bfeb70ff77]$ make Entering directory src. cat: ../version: No such file or directory cat: ../version: No such file or directory Entering directory monster. Leaving directory monster. Entering directory object. Leaving directory object. Entering directory player. Leaving directory player. cat: ../version: No such file or directory cat: ../version: No such file or directory main.c:43: warning: ISO C forbids empty initializer braces main.c:42: error: zero or negative size array ‘modules’ Failed to compile main.c! make[3]: *** [main.o] Error 1 make[2]: *** [all] Error 2 make[1]: *** [subdirs] Error 2 make: *** [all] Error 2 I'm not an expert at linker stuff. Where / how do I go about diagnosing this, please? Linux mb1 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux Thanks. |
![]() |
![]() |
![]() |
#2 |
Angband Devteam member
|
Sounds like someone has broken the automated version-generation script. This is pretty arcane, and well beyond me. I will see if noz is around to take a look. If I'm right then master should be broken for everyone on Linux? (I'm not sure if the script is used in the Windows builds.)
But in fact b1101f7 built correctly under the autobuilders, so it looks like it's just you. Do you have git installed? If you just d/l'd the source that might be the problem. I think ./version is generated by a call to git. Odd that you don't get an error message about that though.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila |
![]() |
![]() |
![]() |
#3 |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
My best guess is that you used the wrong makefile. The file the error occurred in defines a "modules" list that depends on which of certain constants has been defined; the compiler is complaining that the list is empty (i.e. none of the constants exists). Try doing e.g. "make -f Makefile.std".
|
![]() |
![]() |
![]() |
#4 |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
makefile
Thank you Magnate, Derekon for responding so quickly.
I have no Makefile.std file, however. Yes, Magnate, I just d/l'd the source. I'll re-try with git this time. Are there any options I should know about when using git? |
![]() |
![]() |
![]() |
#5 |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
ok - I don't even know how to use git.
git clone git://github.com/angband/angband.git /tmp/angband/angband-dev that got me something, not sure which version it is, but the 3.4 code I had earlier compiled without issue... so, I think this is the latest 3.5-dev branch. Last edited by Spacebux; June 27, 2013 at 22:01. |
![]() |
![]() |
![]() |
#6 |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
ok, I got something.. not sure which version it is yet..
... and, it failed with nearly the same error. [root@mb1 angband-dev]# make Entering directory src. Entering directory monster. Leaving directory monster. Entering directory object. Leaving directory object. Entering directory player. Leaving directory player. main.c:43: warning: ISO C forbids empty initializer braces main.c:42: error: zero or negative size array ‘modules’ Failed to compile main.c! make[3]: *** [main.o] Error 1 make[2]: *** [all] Error 2 make[1]: *** [subdirs] Error 2 make: *** [all] Error 2 [root@mb1 angband-dev]# the error seems to have been in the LINK angband.o statement. |
![]() |
![]() |
![]() |
#7 |
Veteran
Join Date: Jun 2007
Posts: 1,391
![]() |
I'm afraid I don't have any help for your issue, but the command snippet you pasted seems to indicate that you're logging in and compiling as the "root" user. I just wanted to say: please don't do that -- it's incredibly unsafe and a single bad makefile can compromise your machine or delete all your files.
Btw, love the machine name ![]() |
![]() |
![]() |
![]() |
#8 | |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
Resolved. Thank you.
Quote:
Wasn't sure if my being a different user I had access issues to certain libraries or not, so I wanted to compile as 'root'. Yeah, beware the Sys-Admin with a screw driver. ok - I installed X11 libraries and ncurses just to be safe. Not sure if it was absolutely necessary, but I did. For those that may come after me, compiling/installing in Linux: yum install ncurses-devel yum install libXt-devel (If you are a Debian user, you'll use replace "yum" with "apt-get" above. Then run ./configure --enable-x11 and angband will compile without that ISO C error & warning. And, best of all, no seg fault when you try to run it. 'Bux. - thanks for the compliment on the machine name. ![]() |
|
![]() |
![]() |
![]() |
#9 |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
Where did you download the source from? This page is the official source; I wouldn't be surprised if there are other, less-official places you could get older versions from. Install Git, then do "git clone https://github.com/angband/angband.git", and you should get a proper copy.
|
![]() |
![]() |
![]() |
#10 | |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why compile programs yourself? (Linux) | caruso | Idle chatter | 24 | June 27, 2012 02:41 |
Anyone got a link to the last nightly version that works? | TJS | Vanilla | 10 | November 25, 2010 01:31 |
[O] Error Using Dev-C++ to compile | BennyG | Variants | 8 | October 2, 2009 16:51 |
cygwin 1.7 compile error | david3x3x3 | Development | 0 | September 13, 2009 00:03 |
Compile error - latest Vanilla Angband SVN | PaulBlay | Development | 3 | April 19, 2009 21:20 |