Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 27, 2013, 21: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, 21: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, 21: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, 21: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, 21: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 22:01.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 21: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 28, 2013, 21:19   #7
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,391
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Spacebux View Post
[root@mb1 angband-dev]# make
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 .
AnonymousHero is offline   Reply With Quote
Old June 29, 2013, 00:05   #8
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Resolved. Thank you.

Quote:
Originally Posted by AnonymousHero View Post
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 .

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.
Spacebux is offline   Reply With Quote
Old June 27, 2013, 21:59   #9
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, 22:02   #10
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
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 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


All times are GMT +1. The time now is 00:12.


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