Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 27, 2013, 00:55   #1
gangli
Rookie
 
Join Date: Nov 2013
Posts: 4
gangli is on a distinguished road
Compiling 3.4.1 fails on Debian Wheezy

This is the first time i'm poking around in Angband caverns since the olden days of the menacing presence of Thangorodrim.... and I'd love to elaborate on the countless hours wasted dungeon crawling through Zangband and Angband, but more urgent matters prompted me to have a look here. So, I'm not happy with the official Debian Wheezy package of Angband (I believe it's 3.3 something) . That's why I'm trying to compile it myself from the source ver 3.4.1

I've both ncurses and ncursesw (and both bin and dev pkgs) installed on the system (as mentioned before : Debian Wheezy, 64bit).

The "./configure" line is as follows:
Code:
CFLAGS="-O3 -mtune=native" ./configure --prefix=$HOME/local/ --with-x --with-ncurses-prefix="/lib/x86_64-linux-gnu" --with-ncurses-exec-prefix="/usr"
The make fails _after_ building main-gcu.c with the following type of error messages:

Code:
...
main-gcu.c:(.text+0x628): undefined reference to `stdscr'
main-gcu.c:(.text+0x630): undefined reference to `wgetch'
main-gcu.c:(.text+0x641): undefined reference to `cbreak'
main-gcu.c:(.text+0x667): undefined reference to `stdscr'
main-gcu.c:(.text+0x674): undefined reference to `nodelay'
main-gcu.c:(.text+0x67b): undefined reference to `stdscr'
main-gcu.c:(.text+0x683): undefined reference to `wgetch'
main-gcu.c:(.text+0x6a2): undefined reference to `stdscr'
main-gcu.c:(.text+0x6aa): undefined reference to `wgetch'
main-gcu.c:(.text+0x751): undefined reference to `ungetch'
...
Obviously some library is either missing, or its link path is missing/wrong. I hope you people can point to a solution.
gangli is offline   Reply With Quote
Old November 27, 2013, 02:45   #2
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by gangli View Post
The "./configure" line is as follows:
Code:
CFLAGS="-O3 -mtune=native" ./configure --prefix=$HOME/local/ --with-x --with-ncurses-prefix="/lib/x86_64-linux-gnu" --with-ncurses-exec-prefix="/usr"
configure expects a valid ncursesw5-config executable in $ncurses_exec_prefix/bin/ncursesw5-config or, if that's not set, in $ncurses_prefix/bin/ncursesw5-config. Does /usr/bin/ncursesw5-config --libs output linker options that point to a valid ncursesw library? You may also want to check config.log for references to ncurses.
myshkin is offline   Reply With Quote
Old November 27, 2013, 04:13   #3
gangli
Rookie
 
Join Date: Nov 2013
Posts: 4
gangli is on a distinguished road
Quote:
Originally Posted by myshkin View Post
configure expects a valid ncursesw5-config executable in $ncurses_exec_prefix/bin/ncursesw5-config or, if that's not set, in $ncurses_prefix/bin/ncursesw5-config. Does /usr/bin/ncursesw5-config --libs output linker options that point to a valid ncursesw library? You may also want to check config.log for references to ncurses.

Thanks for the reply. ncursesw5-config is present and in /usr/bin.

Output of ncursesw5-config --libs is -lncursesw -ltinfo

Both libraries are in /usr/lib/x86_64-linux-gnu (and this is also the output of ncursesw5-config --libdir)

grepping for ncurses in config.log (grep -i ncurs -A2) gives the following:
Code:
  $ ./configure --prefix=/home/todor/local --with-x --with-ncurses-exec-prefix=/usr --with-ncurses-prefix=/usr/lib/x86_64-linux-gnu

## --------- ##
--
configure:4845: checking for ncursesw5-config
configure:4876: result: /usr/bin/ncursesw5-config
configure:4884: checking for ncurses - wide char support
configure:4916: gcc -o conftest -O3 -mtune=native -DHAVE_CONFIG_H -fno-strength-reduce -W -Wall -Wno-unused-parameter -pedantic -Wno-missing-field-initializers   -I.  conftest.c   >&5
configure:4916: $? = 0
--
| #define USE_NCURSES 1
| #define USE_GCU 1
| /* end confdefs.h.  */
--
| #define USE_NCURSES 1
| #define USE_GCU 1
| /* end confdefs.h.  */
--
| #define USE_NCURSES 1
| #define USE_GCU 1
| /* end confdefs.h.  */
--
ac_cv_path_NCURSES_CONFIG=/usr/bin/ncursesw5-config
ac_cv_path_RM=/bin/rm
ac_cv_path_TPUT=/usr/bin/tput
--
NCURSES_CFLAGS=''
NCURSES_CONFIG='/usr/bin/ncursesw5-config'
NCURSES_LIBS=''
NOINSTALL=''
OBJEXT='o'
--
#define USE_NCURSES 1
#define USE_GCU 1
#define USE_X11 1
gangli is offline   Reply With Quote
Old November 27, 2013, 06:45   #4
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by gangli View Post
Output of ncursesw5-config --libs is -lncursesw -ltinfo
This is a little suspicious. I wonder whether /usr/lib/x86_64-linux-gnu is in your linker's default search path. If not, it won't be able to find the libraries without -L/usr/lib/x86_64-linux-gnu. If these are system packages, though, they should be set up coherently...

Quote:
Originally Posted by gangli View Post
grepping for ncurses in config.log (grep -i ncurs -A2) gives the following:
Code:
  $ ./configure --prefix=/home/todor/local --with-x --with-ncurses-exec-prefix=/usr --with-ncurses-prefix=/usr/lib/x86_64-linux-gnu

## --------- ##
--
configure:4845: checking for ncursesw5-config
configure:4876: result: /usr/bin/ncursesw5-config
configure:4884: checking for ncurses - wide char support
configure:4916: gcc -o conftest -O3 -mtune=native -DHAVE_CONFIG_H -fno-strength-reduce -W -Wall -Wno-unused-parameter -pedantic -Wno-missing-field-initializers   -I.  conftest.c   >&5
configure:4916: $? = 0
--
Could you go a few lines farther in the file here? When I run configure, I get
Code:
configure:4914: checking for ncurses - wide char support
configure:4946: gcc -o conftest -g -O2 -DHAVE_CONFIG_H -W -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-missing-field-initializers -I/usr/include/ncursesw  -I.  conftest.c  -L/usr/lib -lncursesw -ltinfo >&5
configure:4946: $? = 0
configure:4946: ./conftest
configure:4946: $? = 0
configure:4960: result: yes
Quote:
Originally Posted by gangli View Post
Code:
NCURSES_CFLAGS=''
NCURSES_CONFIG='/usr/bin/ncursesw5-config'
NCURSES_LIBS=''
NOINSTALL=''
OBJEXT='o'
This is very suspicious. NCURSES_LIBS should be the output of ncursesw5-config --libs.
myshkin is offline   Reply With Quote
Old November 27, 2013, 08:54   #5
gangli
Rookie
 
Join Date: Nov 2013
Posts: 4
gangli is on a distinguished road
Mine is similar:

Code:
configure:4916: gcc -o conftest -O3 -mtune=native -DHAVE_CONFIG_H -fno-strength-reduce -W -Wall -Wno-unused-parameter -pedantic -Wno-missing-field-initializers   -I.  conftest.c   >&5
configure:4916: $? = 0
configure:4916: ./conftest
configure:4916: $? = 0
configure:4930: result: yes
Immediately afterwards though , the "mvwaddnwstr" , "use_default_colors" and "can_change_colors" tests fail with a linker error. For example:

Code:
...
configure:5009: checking for can_change_color
configure:5009: gcc -o conftest -O3 -mtune=native -DHAVE_CONFIG_H -fno-strength-reduce -W -Wall -Wno-unused-parameter -peda
ntic -Wno-missing-field-initializers   -I.  conftest.c   >&5
/tmp/ccgkn5Nw.o: In function `main':
conftest.c:(.text.startup+0x7): undefined reference to `can_change_color'
collect2: error: ld returned 1 exit status
configure:5009: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Angband"
| #define PACKAGE_TARNAME "angband"
| #define PACKAGE_VERSION "3.4.1"
| #define PACKAGE_STRING "Angband 3.4.1"
| #define PACKAGE_BUGREPORT "bugs@rephial.org"
...
Could this be related?
gangli is offline   Reply With Quote
Old November 27, 2013, 09:06   #6
gangli
Rookie
 
Join Date: Nov 2013
Posts: 4
gangli is on a distinguished road
Whoa. Just tried to configure it for the first time without any additional flags, and the CFLAGS redefinition. And ... at least the configure script works.


It turns out that adding `exec-prefix' flag messed up things. Leaving everything else the same, and throwing that flag away did the job. I started using this, because the script failed to recognise the existence of a freshly installed ncursesw dev package. The system was rebooted between the attempts, so maybe that helped. I don't know. In any case, thanks for trying to help!
gangli is offline   Reply With Quote
Reply

Tags
compilation, ncurses, problem


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
Any good browsers on Debian Squeeze? Mikko Lehtinen Idle chatter 12 April 6, 2013 08:39
3.3.2 fails to mark saves as dead when it ought to Therem Harth Vanilla 7 May 4, 2012 22:27
[3.3.2] Compiling fails under Ubuntu 11.10 raycluster Vanilla 18 February 13, 2012 10:13
3.3.2 now in Debian & Ubuntu Magnate Vanilla 2 November 27, 2011 12:45
Angband 3.1.1 available in Debian Magnate Vanilla 5 August 26, 2009 15:50


All times are GMT +1. The time now is 22:27.


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