![]() |
#1 |
Rookie
Join Date: Nov 2013
Posts: 4
![]() |
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" 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' ... |
![]() |
![]() |
![]() |
#2 |
Angband Devteam member
Join Date: Apr 2007
Posts: 334
![]() |
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.
|
![]() |
![]() |
![]() |
#3 | |
Rookie
Join Date: Nov 2013
Posts: 4
![]() |
Quote:
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 |
|
![]() |
![]() |
![]() |
#4 | |
Angband Devteam member
Join Date: Apr 2007
Posts: 334
![]() |
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:
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 |
|
![]() |
![]() |
![]() |
#5 |
Rookie
Join Date: Nov 2013
Posts: 4
![]() |
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 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" ... |
![]() |
![]() |
![]() |
#6 |
Rookie
Join Date: Nov 2013
Posts: 4
![]() |
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! |
![]() |
![]() |
![]() |
Tags |
compilation, ncurses, problem |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 11:13 |
3.3.2 now in Debian & Ubuntu | Magnate | Vanilla | 2 | November 27, 2011 13:45 |
Angband 3.1.1 available in Debian | Magnate | Vanilla | 5 | August 26, 2009 15:50 |