Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 5, 2012, 18:08   #1
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Compiling NPP on Ubuntu questions

I am trying to compile NPP on the latest verion of Ubuntu. Once everything is in place, I understand that it is a three step process ("./autogen.sh", then "./configure", and finally "make".
It seemed to indicate I got through the first two steps OK. With the make command, I got:

/bin/bash: line 1: cd monster: No such file or directory
make[3]: *** [subdirs] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] error 1
make: *** [all] error 1

Any thoughts? This is based on the NPPAngband source found at github, work-in-progress branch. Most of the linux specific files in there were taken from Angband at github, v 3.1.2, because that is what NPP is currently based on.

Thanks in advance for anyone who can offer any suggestions as to what to do.

Of course, before doing any of that, I went to http://rephial.org/wiki/Compiling and copied this line into a terminal:

sudo apt-get install autoconf gcc libc6-dev libncurses5-dev libx11-dev \
libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev \
libgtk2.0-dev libglade2-dev
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old February 5, 2012, 18:33   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,949
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by nppangband View Post
I am trying to compile NPP on the latest verion of Ubuntu. Once everything is in place, I understand that it is a three step process ("./autogen.sh", then "./configure", and finally "make".
It seemed to indicate I got through the first two steps OK. With the make command, I got:

/bin/bash: line 1: cd monster: No such file or directory
make[3]: *** [subdirs] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] error 1
make: *** [all] error 1
I suppose my question is, do you have a src/monster/ directory? If not, you'll need to adjust src/Makefile to remove 'monster' from SUBDIRS. (The autoconf system uses the list in SUBDIRS to work out what it needs to compile, so if there's something in there that you don't have / something you don't have in there that you need then the system won't work.)

Does that make sense?
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old February 5, 2012, 19:47   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,378
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
takkaria has it in one - the sundirs line in your src/Makefile should read
Code:
SUBDIRS = gtk
It may be helpful (or misleading ) to look at the FA source on github for comparison for this sort of thing - it has gone with almost all the V3.2/3.3 low level code, but hasn't moved to the monster, object, player subdirectories.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 5, 2012, 21:22   #4
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Yes, that was it. Thank you both. The only subdirectory NPP has with source code is for GTK.

Now on to round 2, where the questions get tougher, but you get double the points........

I got a little further, and worked through a couple more error messages. I had to remove two files from makefile.std that I don't have in NPP. Once I did that, I retried the "make" command, and I got the error:

make[3]: *** No rule to make target 'NPPAngband'. Stop.
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1

I thought this one was strange because I would think it would give me that error first, before the error messages related to specific makefiles.

BTW: Do I have to do the autogen.sh and configure commands each time I make, or just once?

One of the files I removed from makefile.std was snd-sdl.o. Did I read that rignt in that file has functions needed for sound support under sdl? IIRC I have the same functions buried somewhere in another file in NPP, but I will have to confirm that.

I shoudl mention that my eventual goal is not only to confirm everything works fine in the various Linux plaforms, but also hopefully have the same Linux packages that regular angband has, so people can just download and play NPP in Linux. Then I just have to fulfill my longstanding dream of getting a macbook pro and I can work directly on all three platforms.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old February 6, 2012, 00:40   #5
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,378
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
OK, I think that replacing
Code:
angband: $(OBJECTS)
with
Code:
$(PROG): $(OBJECTS)
should fix that.

You should not need to redo autogen.sh and config, as a general rule.

Yes, snd-sdl is for use of sound in SDL - note that you will have to have several SDL-related packages installed for the SDL port to be usable on your machine (just use whatever GUI your version of Ubuntu uses and look for things like SDL_mixer, SDL_ttf, SDL_image).

Note that the full V build system has makefiles in every directory, including the top level one. This helps for installing on linux rather than just running from the local directory, which is not strictly necessary but probably a good idea. Again, using FA1.2 as a template may help.

Quote:
Then I just have to fulfill my longstanding dream of getting a macbook pro and I can work directly on all three platforms.
My current setup (which I have had for the last couple of years) is to have a mac with virtual linux and windows machines. IMHO this is pretty much ideal.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 6, 2012, 05:09   #6
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Nick View Post
OK, I think that replacing {snip} should fix that.
Yes, it did! Thank you very much. I have some compiler warnings and errors to work through in the main.*** files, but I am on my way now.

Quote:
Originally Posted by Nick View Post
Yes, snd-sdl is for use of sound in SDL - note that you will have to have several SDL-related packages installed for the SDL port to be usable on your machine (just use whatever GUI your version of Ubuntu uses and look for things like SDL_mixer, SDL_ttf, SDL_image).
I remember you have make some NPP release packages for previous versions, I am also going to look through those and see what you did.

Quote:
Originally Posted by Nick View Post
Note that the full V build system has makefiles in every directory, including the top level one. This helps for installing on linux rather than just running from the local directory, which is not strictly necessary but probably a good idea. Again, using FA1.2 as a template may help.
I was not quite sure what they do, but I added all of them today anyway, along with a bunch of other files. I think some of them have to do with github rather than compiling, but that can all be sorted out later. I will check out FA as well.

Quote:
Originally Posted by Nick View Post
My current setup (which I have had for the last couple of years) is to have a mac with virtual linux and windows machines. IMHO this is pretty much ideal.
NICE!
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old February 8, 2012, 15:02   #7
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Thanks again for the help. I am getting closer to compiling. This is the latest error that I need help on: I kind of understand what the linker command line is but I am not sure what to do about it:

/usr/bin/ld: snd-sdl.o: undefined reference to symbol 'SDL_GetError'
/usr/bin/ld: note: 'SDL_GetError' is defined in DSO /usr/lib/libSDL-1.2.so.0 so try adding it to the linker command line
/usr/lib/libSDL-1.2.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [nppangband] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old February 8, 2012, 15:20   #8
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
Quote:
Originally Posted by nppangband View Post
Thanks again for the help. I am getting closer to compiling. This is the latest error that I need help on: I kind of understand what the linker command line is but I am not sure what to do about it:

/usr/bin/ld: snd-sdl.o: undefined reference to symbol 'SDL_GetError'
/usr/bin/ld: note: 'SDL_GetError' is defined in DSO /usr/lib/libSDL-1.2.so.0 so try adding it to the linker command line
/usr/lib/libSDL-1.2.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [nppangband] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
ISTR you said earlier in the thread that you had got rid of snd-sdl.c, because those functions were in some other .c file now? If that's right then you shouldn't be linking snd-sdl.o, and you need to remove it from the list of .o files which forms ANGFILES (or MAINFILES, or whatever it is).

If that's not right, and you do build snd-sdl.o from snd-sdl.c, then my guess is that something is missing from your SDL installation. But since libSDL-1.2.so.0 is a very low-level core component of SDL, it's likely to be there if you have installed all the SDL libs.
__________________
"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 February 8, 2012, 17:49   #9
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Magnate View Post
ISTR you said earlier in the thread that you had got rid of snd-sdl.c, because those functions were in some other .c file now? If that's right then you shouldn't be linking snd-sdl.o, and you need to remove it from the list of .o files which forms ANGFILES (or MAINFILES, or whatever it is).

If that's not right, and you do build snd-sdl.o from snd-sdl.c, then my guess is that something is missing from your SDL installation. But since libSDL-1.2.so.0 is a very low-level core component of SDL, it's likely to be there if you have installed all the SDL libs.
The reason I added it back in because I got a compiler error on main-sdl because it calls one of the functions in snd-sdl-o.

I installed the recommended dependencies from the compiling page on rephial (sudo apt-get install autoconf gcc libc6-dev libncurses5-dev libx11-dev \
libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev \
libgtk2.0-dev libglade2-dev ) Did I miss anything?
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old February 8, 2012, 17:57   #10
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Looks like there is already a thread on this one a couple months ago & it is an ubuntu issue.

http://angband.oook.cz/forum/showthread.php?t=5064
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

Last edited by nppangband; February 8, 2012 at 18:03.
nppangband 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
[3.3.2] Compiling fails under Ubuntu 11.10 raycluster Vanilla 18 February 13, 2012 10:13
Few questions. Hengband related. And Ubuntu. Arendil Variants 4 October 1, 2009 16:53
Compiling NPP for Linux? Bandobras Variants 9 July 3, 2009 10:52
Ubuntu SDL Help? benhamill Vanilla 12 February 24, 2009 21:19
[NPP] Compiling on Mac OS X chem Variants 10 January 6, 2009 22:40


All times are GMT +1. The time now is 02:04.


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