Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 27, 2013, 22:13   #1
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Question 3.5-nightly-compile/link error. (Linux)

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.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 22:19   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
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
Magnate is offline   Reply With Quote
Old June 27, 2013, 22:27   #3
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
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".
Derakon is offline   Reply With Quote
Old June 27, 2013, 22:39   #4
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
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?
Spacebux is offline   Reply With Quote
Old June 27, 2013, 22:44   #5
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
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 23:01.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 22:57   #6
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
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.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 22:59   #7
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
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.
Derakon is offline   Reply With Quote
Old June 27, 2013, 23:02   #8
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Quote:
Originally Posted by Derakon View Post
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.
Yeah, sorry, I edited my earlier post - that's the command I used, except I specified a target location.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 23:06   #9
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
[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
Spacebux is offline   Reply With Quote
Old June 27, 2013, 23:32   #10
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
Quote:
Originally Posted by Spacebux View Post
Yeah, sorry, I edited my earlier post - that's the command I used, except I specified a target location.
Right, that should get you the latest 3.5 development version, as you say.

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).
Derakon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why compile programs yourself? (Linux) caruso Idle chatter 24 June 27, 2012 03:41
Anyone got a link to the last nightly version that works? TJS Vanilla 10 November 25, 2010 02:31
[O] Error Using Dev-C++ to compile BennyG Variants 8 October 2, 2009 17:51
cygwin 1.7 compile error david3x3x3 Development 0 September 13, 2009 01:03
Compile error - latest Vanilla Angband SVN PaulBlay Development 3 April 19, 2009 22:20


All times are GMT +1. The time now is 20:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.