Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 8, 2012, 18:08   #11
ghengiz
Adept
 
ghengiz's Avatar
 
Join Date: Nov 2011
Location: Roaming in Terry Pratchett's Discworld
Posts: 178
ghengiz is on a distinguished road
Quote:
Originally Posted by nppangband View Post
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?
That's...interesting.
I checked Makefile.std, and it does *not* mention libSDL-1.2.so.0 explicitely, but just the ttf, image and mixer components.
Have you already tried to add it manually?
Also, that 0 at the end of libSDL-1.2.so.0 looks weird...IIRC, the sub-version numbers are add before the .so and .a, not after
ghengiz is offline   Reply With Quote
Old February 8, 2012, 18:39   #12
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
I am going to try adding it manually when I get home tonight.

I found many threads on the subject (it almost certainly is an Ubuntu issue), that recommend adding this line (which I understand will add it manually, I am still quite the Linux novice, and I don't know much about makefiles wither":

LDFLAGS += -{file_name}

so my plan is to add "LDFLAGS += -libSDL-1.2.so.0" to either makefile or makefile.std and see how it goes.
__________________
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, 18:57   #13
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by nppangband View Post
so my plan is to add "LDFLAGS += -libSDL-1.2.so.0" to either makefile or makefile.std and see how it goes.
You need "-lSDL" (or possibly "-lsdl"); the linker will automatically find the "libSDL.a" or "libSDL.so".
AnonymousHero is offline   Reply With Quote
Old February 9, 2012, 03:24   #14
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Thanks, everybody. That worked, and I got a little further.

I also confirmed that, in Ubuntu, Angband 3.3 (Master Branch from github) has the same problem. Adding the line LDFLAGS += -lSDL to Makefile allows it to fniish compiling.

Here is my next roadblock in NPP:

Successfully compiled z-term.c.
Successfully compiled z-type.c.
Successfully compiled z-util.c.
Successfully compiled z-virt.c.
LINK nppangband
Makefile:5: *** missing separator. Stop.
make[5]: *** [subdirs] Error 1
make[4]: *** [all] Error 1
make[3]: *** [subdirs] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1

I thought this meant there is a tab missing in makefile, line 5. But line 5 is:
"include Makefile.src", and it look like I got well past that in compiling.

So I can't quite tell where the compiling stopped. Any suggestions?

I looked for the word "LINK" in the makefiles. Is this were I got the error (in Makefile)?

$(PROG): $(OBJECTS)
$(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@
@printf "%10s %-20s\n" LINK $@
__________________
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 9, 2012, 05:27   #15
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Is there an "nppangband" file?

"Missing separator" is usually a sign that the whitespace (tab vs. spaces) is messed up, I think. You might want to double-check the Makefile indentation in an editor where you can distinguish tab from normal spaces.
(Perhaps line 5, given the error message?)
AnonymousHero is offline   Reply With Quote
Old February 9, 2012, 05:30   #16
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by ghengiz View Post
That's...interesting.
I checked Makefile.std, and it does *not* mention libSDL-1.2.so.0 explicitely, but just the ttf, image and mixer components.
AFAIUI, it's probably relying on the old behavior of binutils/ld which was to also pull in dependencies -- so, for example, libSDL-ttf depends on libSDL which would mean that libSDL would get linked in too automatically. Not sure why it was changed.
AnonymousHero is offline   Reply With Quote
Old February 9, 2012, 15:54   #17
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
Is there an "nppangband" file?
Only the output file. I am reading up on makefiles to try to understand exactly where it fails. As I understand the output, it sucessfully compiled all of the "o' files and failed when it tried to put them all together into the NPPAngband binary.

Quote:
Originally Posted by AnonymousHero View Post
"Missing separator" is usually a sign that the whitespace (tab vs. spaces) is messed up, I think. You might want to double-check the Makefile indentation in an editor where you can distinguish tab from normal spaces.
(Perhaps line 5, given the error message?)
I am searching for that, but I don't see anything yet.

Dumb question (NPP makefiles are almost identical on the Angband makefiles in Angband 3.1.2, so anyone familiar with the Angband makefiles can answer this): On windows, I compile with makefile.win, which uses makefile.inc (which in turn uses makefile.src). On linux, makefile includes makefile.src, but not makefile.inc. Makefile.std sppears to be a template makefile not specifically by either system at this time. Have I read that correctly?
__________________
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 9, 2012, 16:42   #18
Mikko Lehtinen
Veteran
 
Join Date: Sep 2010
Posts: 1,246
Mikko Lehtinen is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
Is there an "nppangband" file?

"Missing separator" is usually a sign that the whitespace (tab vs. spaces) is messed up, I think. You might want to double-check the Makefile indentation in an editor where you can distinguish tab from normal spaces.
(Perhaps line 5, given the error message?)
I googled for "missing separator" and found out that GNU Make and most other Unix Make programs always require TABs at a beginning of a command in a rule, not empty spaces.

"Another, more rare, cause of the above error message is if you use static pattern rules (with the % character) incorrectly. Read the documentation that comes with Make carefully and try to find the error."
Mikko Lehtinen is offline   Reply With Quote
Old February 9, 2012, 19:37   #19
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Mikko Lehtinen View Post
I googled for "missing separator" and found out that GNU Make and most other Unix Make programs always require TABs at a beginning of a command in a rule, not empty spaces.
I'm sure it made sense at the time, but... Worst. Idea. Ever.
AnonymousHero is offline   Reply With Quote
Old February 9, 2012, 19:39   #20
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
I found the tab issue I posted above, and made it a little further. Hopefully I am getting close to compiling. More dumb questions to follow.
__________________
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
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 05:18.


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