You are not logged in.

#1 2017-03-07 13:11:40

sediment
Member
Registered: 2012-08-01
Posts: 20

trouble compiling Brogue from AUR [SOLVED]

I'm having trouble compiling the Brogue package from the AUR with yaourt. Compilation seems to run OK until this step:

cc -O2 -march=i586 -o bin/brogue src/brogue/Architect.o src/brogue/Combat.o src/brogue/Dijkstra.o src/brogue/Globals.o src/brogue/IO.o src/brogue/Items.o src/brogue/Light.o src/brogue/Monsters.o src/brogue/Buttons.o src/brogue/Movement.o src/brogue/Recordings.o src/brogue/RogueMain.o src/brogue/Random.o src/brogue/MainMenu.o src/brogue/Grid.o src/brogue/Time.o src/platform/main.o src/platform/platformdependent.o src/platform/curses-platform.o src/platform/tcod-platform.o src/platform/term.o -L. -Lsrc/libtcod-1.5.2 `sdl-config --cflags` `sdl-config --libs` -ltcod -lSDL -lm -Wl,-rpath,. -lncurses -lm -Wl,-rpath,.
src/platform/tcod-platform.o: In function `loadFont':
/tmp/yaourt-tmp-james/aur-brogue/src/brogue-1.7.4/src/platform/tcod-platform.c:60: undefined reference to `TCOD_console_set_keyboard_repeat'
collect2: error: ld returned 1 exit status
make: *** [Makefile:85: bin/brogue] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build brogue.

There aren't any other comments about this on the package's page on the AUR, and I have installed brogue OK myself on another Arch machine and I don't think the package itself has changed since then, so maybe something that's set up unusually on my local machine is interfering with it. But this is a relatively fresh install of Arch and I haven't changed much, so I don't know what that might be.

Does anyone have any thoughts? Thanks.

EDIT: I solved this. Brogue ships with the version of libtcod that it needs and its makefile will use it by default. The PKGBUILD edits the makefile to have it use the version from the AUR. Commenting out the two sed lines that operate on the makefile in build() in the PKGBUILD seemed to fix it.

Last edited by sediment (2017-03-11 13:53:26)

Offline

#2 2017-03-07 13:14:53

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: trouble compiling Brogue from AUR [SOLVED]

Try building with makepkg and then post the full output, not just the last few lines.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-03-07 13:30:13

sediment
Member
Registered: 2012-08-01
Posts: 20

Re: trouble compiling Brogue from AUR [SOLVED]

Sure.

[james@justine brogue]$ makepkg
==> Making package: brogue 1.7.4-1 (Tue  7 Mar 13:27:31 GMT 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found brogue-1.7.4-linux-i386.tbz2
  -> Found brogue.sh
==> Validating source files with md5sums...
    brogue-1.7.4-linux-i386.tbz2 ... Passed
    brogue.sh ... Passed
==> Extracting sources...
  -> Extracting brogue-1.7.4-linux-i386.tbz2 with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
./brogue: line 4: ./brogue: No such file or directory
rm -f src/brogue/*.o src/platform/*.o bin/brogue
./brogue: line 4: ./brogue: No such file or directory
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Architect.o -c src/brogue/Architect.c 
src/brogue/Architect.c: In function ‘addMachines’:
src/brogue/Architect.c:1681:55: warning: passing argument 4 of ‘buildAMachine’ makes integer from pointer without a cast [-Wint-conversion]
             if (buildAMachine(MT_AMULET_AREA, -1, -1, NULL, NULL, NULL, NULL)) {
                                                       ^~~~
src/brogue/Architect.c:935:9: note: expected ‘long unsigned int’ but argument is of type ‘void *’
 boolean buildAMachine(enum machineTypes bp,
         ^~~~~~~~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Combat.o -c src/brogue/Combat.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Dijkstra.o -c src/brogue/Dijkstra.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Globals.o -c src/brogue/Globals.c 
src/brogue/Globals.c:72:0: warning: ignoring #pragma mark Colors [-Wunknown-pragmas]
 #pragma mark Colors
 
src/brogue/Globals.c:359:0: warning: ignoring #pragma mark Dynamic [-Wunknown-pragmas]
 #pragma mark Dynamic color references
 
src/brogue/Globals.c:371:0: warning: ignoring #pragma mark Autogenerator [-Wunknown-pragmas]
 #pragma mark Autogenerator definitions
 
src/brogue/Globals.c:435:0: warning: ignoring #pragma mark Terrain [-Wunknown-pragmas]
 #pragma mark Terrain definitions
 
src/brogue/Globals.c:690:0: warning: ignoring #pragma mark Dungeon [-Wunknown-pragmas]
 #pragma mark Dungeon Feature definitions
 
src/brogue/Globals.c:1010:0: warning: ignoring #pragma mark Dungeon [-Wunknown-pragmas]
 #pragma mark Dungeon Profiles
 
src/brogue/Globals.c:1032:0: warning: ignoring #pragma mark Lights [-Wunknown-pragmas]
 #pragma mark Lights
 
src/brogue/Globals.c:1101:0: warning: ignoring #pragma mark Blueprints [-Wunknown-pragmas]
 #pragma mark Blueprints
 
src/brogue/Globals.c:1545:0: warning: ignoring #pragma mark Monster [-Wunknown-pragmas]
 #pragma mark Monster definitions
 
src/brogue/Globals.c:1692:0: warning: ignoring #pragma mark Monster [-Wunknown-pragmas]
 #pragma mark Monster words
 
src/brogue/Globals.c:1926:0: warning: ignoring #pragma mark Mutation [-Wunknown-pragmas]
 #pragma mark Mutation definitions
 
src/brogue/Globals.c:1948:0: warning: ignoring #pragma mark Horde [-Wunknown-pragmas]
 #pragma mark Horde definitions
 
src/brogue/Globals.c:2147:0: warning: ignoring #pragma mark Monster [-Wunknown-pragmas]
 #pragma mark Monster class definitions
 
src/brogue/Globals.c:2168:0: warning: ignoring #pragma mark Item [-Wunknown-pragmas]
 #pragma mark Item flavors
 
src/brogue/Globals.c:2288:0: warning: ignoring #pragma mark Item [-Wunknown-pragmas]
 #pragma mark Item definitions
 
src/brogue/Globals.c:2459:0: warning: ignoring #pragma mark Bolt [-Wunknown-pragmas]
 #pragma mark Bolt definitions
 
src/brogue/Globals.c:2496:0: warning: ignoring #pragma mark Feat [-Wunknown-pragmas]
 #pragma mark Feat definitions
 
src/brogue/Globals.c:2512:0: warning: ignoring #pragma mark Miscellaneous [-Wunknown-pragmas]
 #pragma mark Miscellaneous definitions
 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/IO.o -c src/brogue/IO.c 
src/brogue/IO.c: In function ‘actionMenu’:
src/brogue/IO.c:390:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Items.o -c src/brogue/Items.c 
src/brogue/Items.c: In function ‘getLineCoordinates’:
src/brogue/Items.c:3318:23: warning: variable ‘previousLoc’ set but not used [-Wunused-but-set-variable]
  short currentLoc[2], previousLoc[2];
                       ^~~~~~~~~~~
src/brogue/Items.c: In function ‘throwCommand’:
src/brogue/Items.c:5749:35: warning: variable ‘originLoc’ set but not used [-Wunused-but-set-variable]
  short maxDistance, zapTarget[2], originLoc[2], quantity;
                                   ^~~~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Light.o -c src/brogue/Light.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Monsters.o -c src/brogue/Monsters.c 
src/brogue/Monsters.c: In function ‘monsterDetails’:
src/brogue/Monsters.c:3991:20: warning: variable ‘displayedItemText’ set but not used [-Wunused-but-set-variable]
  boolean anyFlags, displayedItemText = false, alreadyDisplayedDominationText = false;
                    ^~~~~~~~~~~~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Buttons.o -c src/brogue/Buttons.c 
src/brogue/Buttons.c: In function ‘buttonInputLoop’:
src/brogue/Buttons.c:327:8: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
  short x, y, button; // (x, y) keeps track of the mouse location
        ^
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Movement.o -c src/brogue/Movement.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Recordings.o -c src/brogue/Recordings.c 
src/brogue/Recordings.c:31:0: warning: ignoring #pragma mark Recording [-Wunknown-pragmas]
 #pragma mark Recording functions
 
src/brogue/Recordings.c:235:0: warning: ignoring #pragma mark Playback [-Wunknown-pragmas]
 #pragma mark Playback functions
 
src/brogue/Recordings.c:442:0: warning: ignoring #pragma mark Hybrid [-Wunknown-pragmas]
 #pragma mark Hybrid and miscellaneous
 
src/brogue/Recordings.c: In function ‘pausePlayback’:
src/brogue/Recordings.c:722:11: warning: variable ‘oldRNG’ set but not used [-Wunused-but-set-variable]
     short oldRNG;
           ^~~~~~
src/brogue/Recordings.c: At top level:
src/brogue/Recordings.c:1173:0: warning: ignoring #pragma mark Debug [-Wunknown-pragmas]
 #pragma mark Debug functions
 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/RogueMain.o -c src/brogue/RogueMain.c 
src/brogue/RogueMain.c: In function ‘startLevel’:
src/brogue/RogueMain.c:880:55: warning: passing argument 7 of ‘getQualifyingPathLocNear’ makes integer from pointer without a cast [-Wint-conversion]
                                      T_DIVIDES_LEVEL, NULL,
                                                       ^~~~
In file included from src/brogue/RogueMain.c:24:0:
src/brogue/Rogue.h:3026:13: note: expected ‘long unsigned int’ but argument is of type ‘void *’
     boolean getQualifyingPathLocNear(short *retValX, short *retValY,
             ^~~~~~~~~~~~~~~~~~~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Random.o -c src/brogue/Random.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/MainMenu.o -c src/brogue/MainMenu.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Grid.o -c src/brogue/Grid.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/brogue/Time.o -c src/brogue/Time.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/platform/main.o -c src/platform/main.c 
In file included from src/platform/main.c:4:0:
src/libtcod-1.5.2/include/libtcod.h:131:0: warning: "false" redefined
 #define false ((bool)0)
 
In file included from src/platform/platform.h:1:0,
                 from src/platform/main.c:1:
src/brogue/Rogue.h:77:0: note: this is the location of the previous definition
 #define false     0
 
In file included from src/platform/main.c:4:0:
src/libtcod-1.5.2/include/libtcod.h:132:0: warning: "true" redefined
 #define true ((bool)1)
 
In file included from src/platform/platform.h:1:0,
                 from src/platform/main.c:1:
src/brogue/Rogue.h:78:0: note: this is the location of the previous definition
 #define true     1
 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/platform/platformdependent.o -c src/platform/platformdependent.c 
src/platform/platformdependent.c: In function ‘loadKeymap’:
src/platform/platformdependent.c:170:9: warning: implicit declaration of function ‘isspace’ [-Wimplicit-function-declaration]
     if (isspace(buffer[i])) {
         ^~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/platform/curses-platform.o -c src/platform/curses-platform.c 
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/platform/tcod-platform.o -c src/platform/tcod-platform.c 
In file included from src/platform/platform.h:1:0,
                 from src/platform/tcod-platform.c:7:
src/brogue/Rogue.h:77:0: warning: "false" redefined
 #define false     0
 
In file included from src/platform/tcod-platform.c:6:0:
src/libtcod-1.5.2/include/libtcod.h:131:0: note: this is the location of the previous definition
 #define false ((bool)0)
 
In file included from src/platform/platform.h:1:0,
                 from src/platform/tcod-platform.c:7:
src/brogue/Rogue.h:78:0: warning: "true" redefined
 #define true     1
 
In file included from src/platform/tcod-platform.c:6:0:
src/libtcod-1.5.2/include/libtcod.h:132:0: note: this is the location of the previous definition
 #define true ((bool)1)
 
src/platform/tcod-platform.c: In function ‘tcod_nextKeyOrMouseEvent’:
src/platform/tcod-platform.c:360:10: warning: variable ‘tryAgain’ set but not used [-Wunused-but-set-variable]
  boolean tryAgain;
          ^~~~~~~~
cc -Isrc/brogue -Isrc/platform -Wall -Wno-parentheses -DBROGUE_TCOD -Isrc/libtcod-1.5.2/include -DBROGUE_CURSES -I/usr/include/libtcod -g -o src/platform/term.o -c src/platform/term.c 
src/platform/term.c:391:12: warning: ‘coerce_color’ defined but not used [-Wunused-function]
 static int coerce_color (fcolor *fg, fcolor *bg) {
            ^~~~~~~~~~~~
src/platform/term.c:291:14: warning: ‘adamsDistance’ defined but not used [-Wunused-function]
 static float adamsDistance(CIE *v1, CIE *v2) {
              ^~~~~~~~~~~~~
src/platform/term.c:286:14: warning: ‘CIExyY’ defined but not used [-Wunused-function]
 static float CIExyY(CIE *L1, CIE *L2) {
              ^~~~~~
src/platform/term.c:121:13: warning: ‘term_enable_bracketed_paste’ defined but not used [-Wunused-function]
 static void term_enable_bracketed_paste( ) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -O2 -march=i586 -o bin/brogue src/brogue/Architect.o src/brogue/Combat.o src/brogue/Dijkstra.o src/brogue/Globals.o src/brogue/IO.o src/brogue/Items.o src/brogue/Light.o src/brogue/Monsters.o src/brogue/Buttons.o src/brogue/Movement.o src/brogue/Recordings.o src/brogue/RogueMain.o src/brogue/Random.o src/brogue/MainMenu.o src/brogue/Grid.o src/brogue/Time.o src/platform/main.o src/platform/platformdependent.o src/platform/curses-platform.o src/platform/tcod-platform.o src/platform/term.o -L. -Lsrc/libtcod-1.5.2 `sdl-config --cflags` `sdl-config --libs` -ltcod -lSDL -lm -Wl,-rpath,. -lncurses -lm -Wl,-rpath,.
src/platform/tcod-platform.o: In function `loadFont':
/home/james/brogue/src/brogue-1.7.4/src/platform/tcod-platform.c:60: undefined reference to `TCOD_console_set_keyboard_repeat'
collect2: error: ld returned 1 exit status
make: *** [Makefile:85: bin/brogue] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Offline

#4 2017-03-07 19:45:32

skualito
Member
Registered: 2008-11-19
Posts: 203

Re: trouble compiling Brogue from AUR [SOLVED]

It's because brogue needs an old version of libtcod... You have several options:
1. Edit the PKGBUILD and modify the `make` instruction to `make curses`
2. Find a way to install libtcod-1.5.2 on your system, this version is shipped by the way in the brogue tarball...
3. The Tiled version of Brogue works well under wine

Last edited by skualito (2017-03-07 19:56:16)

Offline

#5 2017-03-08 21:41:42

sediment
Member
Registered: 2012-08-01
Posts: 20

Re: trouble compiling Brogue from AUR [SOLVED]

Ah, yes, you're right - I see that the libtcod version on the computer I got it working on is older.

Now that I know it's not just me, I might send a message upstream to let the developer know, in case that helps.

Offline

#6 2017-03-09 03:12:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: trouble compiling Brogue from AUR [SOLVED]

Moving to AUR issues


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB