Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: problems compiling LCS via Cygwin  (Read 1866 times)

vladdrak

  • Escaped Lunatic
    • View Profile
problems compiling LCS via Cygwin
« on: January 18, 2017, 12:46:38 pm »

Hi!
I was trying to compile LCS 4.x.x (github) via Cygwin, to no avail. I've installed all the dev/lib packages of gcc, g++, (n)curses, make, automake, autoconf, so it would greatly surprise me if it were due to an insufficient dependency.

$ chmod 744 bootstrap

$ ./bootstrap
Code: [Select]
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: not using Libtool
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --force
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoreconf-2.69: running: automake --add-missing --copy --force-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by                                                                    <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake-1.14 line 3930.
configure.ac:12: installing './compile'
configure.ac:10: installing './install-sh'
configure.ac:10: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf-2.69: Leaving directory `.'
$ ./configure
Code: [Select]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking ncursesw/ncurses.h usability... yes
checking ncursesw/ncurses.h presence... yes
checking for ncursesw/ncurses.h... yes
checking for addch in -lncurses... yes
checking for add_wch in -lncurses... yes
checking for addch in -lncursesw... yes
checking for add_wch in -lncursesw... yes
checking for library containing initscr... -lncurses
checking for sdl2-config... no
checking for SDL_Init in -lSDL2... no
configure: WARNING:  *** Unable to find SDL2 library (http://www.libsdl.org/)
checking for Mix_OpenAudio in -lSDL2_mixer... no
configure: WARNING:  *** Unable to find SDL2_mixer library (http://www.libsdl.or                                                                   g/projects/SDL_mixer/)
configure: WARNING:  *** Compiling without SDL2 or SDL2_mixer, and with DONT_INC                                                                   LUDE_SDL defined.
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for memset... yes
checking for mkdir... yes
checking for strchr... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
$ make
Code: [Select]
make  all-recursive
make[1]: Entering directory '/cygdrive/d/SANDBOX/Liberal-Crime-Squad-master'
Making all in src
make[2]: Entering directory '/cygdrive/d/SANDBOX/Liberal-Crime-Squad-master/src'
g++ -DHAVE_CONFIG_H -I. -I..  -DINSTALL_DATA_DIR=\"/usr/local/share\"  -I../src                                                                    -g -O2 -std=c++11 -MT crimesquad-game.o -MD -MP -MF .deps/crimesquad-game.Tpo -c                                                                    -o crimesquad-game.o `test -f 'game.cpp' || echo './'`game.cpp
In file included from ./common.h:34:0,
                 from ./includes.h:83,
                 from game.cpp:68:
../config.h:107:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION "4.10.0"
 ^
In file included from game.cpp:68:0:
./includes.h:77:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "4.10.1"
 ^
mv -f .deps/crimesquad-game.Tpo .deps/crimesquad-game.Po
g++ -DHAVE_CONFIG_H -I. -I..  -DINSTALL_DATA_DIR=\"/usr/local/share\"  -I../src                                                                    -g -O2 -std=c++11 -MT crimesquad-lcsio.o -MD -MP -MF .deps/crimesquad-lcsio.Tpo                                                                    -c -o crimesquad-lcsio.o `test -f 'lcsio.cpp' || echo './'`lcsio.cpp
In file included from ./common.h:34:0,
                 from ./includes.h:83,
                 from ./externs.h:4,
                 from lcsio.cpp:25:
../config.h:107:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION "4.10.0"
 ^
In file included from ./externs.h:4:0,
                 from lcsio.cpp:25:
./includes.h:77:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "4.10.1"
 ^
mv -f .deps/crimesquad-lcsio.Tpo .deps/crimesquad-lcsio.Po
g++ -DHAVE_CONFIG_H -I. -I..  -DINSTALL_DATA_DIR=\"/usr/local/share\"  -I../src                                                                    -g -O2 -std=c++11 -MT crimesquad-cursesmovie.o -MD -MP -MF .deps/crimesquad-curs                                                                   esmovie.Tpo -c -o crimesquad-cursesmovie.o `test -f 'cursesmovie.cpp' || echo '.                                                                   /'`cursesmovie.cpp
In file included from ./common.h:34:0,
                 from ./includes.h:83,
                 from ./externs.h:4,
                 from cursesmovie.cpp:23:
../config.h:107:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION "4.10.0"
 ^
In file included from ./externs.h:4:0,
                 from cursesmovie.cpp:23:
./includes.h:77:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "4.10.1"
 ^
mv -f .deps/crimesquad-cursesmovie.Tpo .deps/crimesquad-cursesmovie.Po
g++ -DHAVE_CONFIG_H -I. -I..  -DINSTALL_DATA_DIR=\"/usr/local/share\"  -I../src -g -O2 -std=c++11 -MT crimesquad-compat.o -MD -MP -MF .deps/crimesquad-compat.Tpo -c -o crimesquad-compat.o `test -f 'compat.cpp' || echo './'`compat.cpp
In file included from ./common.h:34:0,
                 from ./includes.h:83,
                 from ./externs.h:4,
                 from compat.cpp:65:
../config.h:107:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION "4.10.0"
 ^
In file included from ./externs.h:4:0,
                 from compat.cpp:65:
./includes.h:77:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "4.10.1"
 ^
compat.cpp: In function ‘void alarmset(int)’:
compat.cpp:124:8: error: ‘init_alarm’ was not declared in this scope
    if(!init_alarm) initalarm();
        ^
compat.cpp:124:30: error: ‘initalarm’ was not declared in this scope
    if(!init_alarm) initalarm();
                              ^
compat.cpp:128:21: error: ‘timer_on’ was not declared in this scope
    msToItimerval(t,&timer_on);
                     ^
compat.cpp:128:29: error: ‘msToItimerval’ was not declared in this scope
    msToItimerval(t,&timer_on);
                             ^
compat.cpp:129:14: error: ‘ITIMER_REAL’ was not declared in this scope
    setitimer(ITIMER_REAL,&timer_on,NULL);
              ^
compat.cpp:129:40: error: ‘setitimer’ was not declared in this scope
    setitimer(ITIMER_REAL,&timer_on,NULL);
                                        ^
compat.cpp: In function ‘void alarmwait()’:
compat.cpp:138:21: error: aggregate ‘alarmwait()::itimerval timer_now’ has incomplete type and cannot be defined
    struct itimerval timer_now;
                     ^
compat.cpp:139:14: error: ‘ITIMER_REAL’ was not declared in this scope
    getitimer(ITIMER_REAL,&timer_now);
              ^
compat.cpp:139:36: error: ‘getitimer’ was not declared in this scope
    getitimer(ITIMER_REAL,&timer_now);
                                    ^
make[2]: *** [Makefile:884: crimesquad-compat.o] Error 1
make[2]: Leaving directory '/cygdrive/d/SANDBOX/Liberal-Crime-Squad-master/src'
make[1]: *** [Makefile:569: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/SANDBOX/Liberal-Crime-Squad-master'
make: *** [Makefile:382: all] Error 2

NOTE: according to the readme, there should be a
Code: [Select]
PLATFORM=Linux entry in the makefile, which i couldn't locate.

Why am I trying to do this? Well, i wanted to play LCS in the Cygwin terminal (windows built-in cmd is just abysmal), but running LCS through Mintty (Cygwin's terminal-emu) doesn't want to work with the windows binary:

$ ./crimesquad.exe
Code: [Select]
Redirection is not supported.
(Which is odd, as i'm positive i managed to run windows cmd applications through Mintty some time ago.)
So i decided to try to compile it. I shouldn't have.
Any help is much appreciated. Thanks!

P.S: is the game ever going to be updated to use SDL's windowing system?
« Last Edit: January 18, 2017, 03:43:31 pm by vladdrak »
Logged