![]() |
#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 |
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.
|
![]() |
![]() |
![]() |
#8 | |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Adept
Join Date: Apr 2009
Posts: 231
![]() |
[root@mb1 angband-dev]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) [root@mb1 angband-dev]# make --version GNU Make 3.81 This program built for i386-redhat-linux-gnu [root@mb1 angband-dev]# ln --version ln (GNU coreutils) 8.4 |
![]() |
![]() |
![]() |
#10 | |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
Quote:
The compiler output you pasted earlier indicates a problem with compiling main.c, not a problem with the linker. Hence why I suggested making certain that you were using the correct Makefile; it seemed like whatever you were using was failing to define at least one important constant. I don't know if Makefile.std is necessarily the one to use, but the comments at the top indicate it's the right one for Linux. You'd use Makefile.osx for Macs, of course, and Makefile.win for Windows (dunno if that's cygwin/mingw or Visual Studio or what). |
|
![]() |
![]() |
![]() |
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 |