Pandemonium Purger
Posts: 1298
Joined: Wednesday, 11th April 2012, 02:42
Location: Sydney, Australia
Cygwin/Windows 7 compiling Crawl frustration
Here's what I'm stuck on atm:
What steps do I take from here?
EDIT: It was fixed by upgrading to the latest version of mingw32.
Now I get this:
EDIT 2: I solved it by commenting out the declaration in libutil.h.
Now I get the following error:
What does that even mean? Rep? Standard input from what?
EDIT 3: I solved it by running mingw-get upgrade binutils.
Now I get this error:
EDIT 4: I fixed it by commenting out in wchar.h, //int _EXFUN(wcwidth, (const wchar_t));
Now I get the following errors:
EDIT 5: I fixed it by commenting out in unistd.h //unsigned _EXFUN(alarm, (unsigned __secs ));
Now I get the following errors:
I'm not actually sure where unlink is defined yet.
EDIT 6: I fixed it by adding #include <unistd.h> to files.cc.
Now:
EDIT 7: I fixed it by removing the #if #endifs from around the ftruncate definition in unistd.h.
Now:
EDIT 8: I fixed it by adding to the top of main.cc
#define _fileno(F) ((F)->_file)
#include <io.h>
Now I get:
EDIT 9: I fixed it by adding to endianness.h #include <endian.h>
Now:
1) I replaced the io.h with the io.h from MinGW: http://sourceforge.net/p/mingw/mingw-or ... clude/io.h
2) From MinGW types.h I merged into the types.h I had copied from cygwin into the stone soup source directory.
3) I removed PURE from hash.h.
4) I had to copy from MinGW wchar.h into cygwin wchar.h I had copied into the stone soup source directory this:
EDIT final: After all this fucking around I gave up, shelved cygwin, installed msysgit, followed the instructions for compiling in windows under msysgit and it worked the first time. So I would recommend that either the instructions for compiling in cygwin are scrapped so poor newbies like me are not mislead into thinking it is a good idea, or are updated to be more specific on what you need to do so this mess doesn't happen
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
sh: cc: command not found
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=unknown TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX ability.o
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/postypes.h:42:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/char_traits.h:42,
from c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/string:42,
from externs.h:11,
from AppHdr.h:434,
from ability.cc:6:
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/cwchar:250:11: error: '::wcstold' has not been declared
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/cwchar:266:22: error: '__gnu_cxx::wcstold' has not been declared
In file included from externs.h:15:0,
from AppHdr.h:434,
from ability.cc:6:
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/cstdlib:198:11: error: '::strtold' has not been declared
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/cstdlib:219:22: error: '__gnu_cxx::strtold' has not been declared
In file included from ability.cc:39:0:
libutil.h:75:52: warning: redundant redeclaration of 'size_t strlcpy(char*, const char*, size_t)' in same scope [-Wredundant-decls]
./string.h:94:9: warning: previous declaration of 'size_t strlcpy(char*, const char*, size_t)' [-Wredundant-decls]
Makefile:1468: recipe for target 'ability.o' failed
make: *** [ability.o] Error 1
What steps do I take from here?
EDIT: It was fixed by upgrading to the latest version of mingw32.
Now I get this:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX ability.o
In file included from ability.cc:39:0:
libutil.h:75:52: warning: redundant redeclaration of 'size_t strlcpy(char*, const char*, size_t)' in same scope [-Wredundant-decls]
size_t strlcpy(char *dst, const char *src, size_t n);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from ability.cc:6:
./string.h:94:9: warning: previous declaration of 'size_t strlcpy(char*, const char*, size_t)' [-Wredundant-decls]
size_t _EXFUN(strlcpy,(char *, const char *, size_t));
^
{standard input}: Assembler messages:
{standard input}:19: Error: expecting string instruction after `rep'
{standard input}:655: Error: expecting string instruction after `rep'
Makefile:1468: recipe for target 'ability.o' failed
make: *** [ability.o] Error 1
EDIT 2: I solved it by commenting out the declaration in libutil.h.
Now I get the following error:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX ability.o
{standard input}: Assembler messages:
{standard input}:19: Error: expecting string instruction after `rep'
{standard input}:655: Error: expecting string instruction after `rep'
Makefile:1468: recipe for target 'ability.o' failed
make: *** [ability.o] Error 1
What does that even mean? Rep? Standard input from what?
EDIT 3: I solved it by running mingw-get upgrade binutils.
Now I get this error:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX cio.o
cio.cc: In member function 'virtual int line_reader::process_key(int)':
cio.cc:623:23: error: call of overloaded 'wcwidth(int&)' is ambiguous
if (wcwidth(ch) >= 0 && length + wclen(ch) < static_cast<int>(bufsz))
^
cio.cc:623:23: note: candidates are:
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from cio.cc:6:
./wchar.h:125:5: note: int wcwidth(wchar_t)
int _EXFUN(wcwidth, (const wchar_t));
^
In file included from cio.cc:15:0:
unicode.h:42:5: note: int wcwidth(ucs_t)
int wcwidth(ucs_t c);
^
cio.cc:625:31: error: call of overloaded 'wcwidth(int&)' is ambiguous
int w = wcwidth(ch);
^
cio.cc:625:31: note: candidates are:
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from cio.cc:6:
./wchar.h:125:5: note: int wcwidth(wchar_t)
int _EXFUN(wcwidth, (const wchar_t));
^
In file included from cio.cc:15:0:
unicode.h:42:5: note: int wcwidth(ucs_t)
int wcwidth(ucs_t c);
^
Makefile:1468: recipe for target 'cio.o' failed
make: *** [cio.o] Error 1
EDIT 4: I fixed it by commenting out in wchar.h, //int _EXFUN(wcwidth, (const wchar_t));
Now I get the following errors:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX database.o
In file included from c:\mingw\include\windows.h:93:0,
from threads.h:63,
from database.cc:26:
c:\mingw\include\winsock.h:116:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp]
#warning "fd_set and associated macros have been defined in sys/types. \
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from database.cc:6:
./sys/stat.h:150:81: warning: 'int stat(const char*, stat*)' hides constructor for 'struct stat' [-Wshadow]
int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
^
./sys/unistd.h:22:58: warning: redundant redeclaration of 'int chmod(const char*, mode_t)' in same scope [-Wredundant-decls]
int _EXFUN(chmod, (const char *__path, mode_t __mode ));
^
./sys/stat.h:145:12: warning: previous declaration of 'int chmod(const char*, mode_t)' [-Wredundant-decls]
int _EXFUN(chmod,( const char *__path, mode_t __mode ));
^
./sys/unistd.h:62:53: warning: redundant redeclaration of 'int fchmod(int, mode_t)' in same scope [-Wredundant-decls]
int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
^
./sys/stat.h:146:16: warning: previous declaration of 'int fchmod(int, mode_t)' [-Wredundant-decls]
int _EXFUN(fchmod,(int __fd, mode_t __mode));
^
In file included from database.cc:25:0:
syscalls.h:20:32: error: new declaration 'void alarm(unsigned int)'
void alarm(unsigned int seconds);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from database.cc:6:
./sys/unistd.h:20:18: error: ambiguates old declaration 'unsigned int alarm(unsigned int)'
unsigned _EXFUN(alarm, (unsigned __secs ));
^
In file included from database.cc:25:0:
syscalls.h:21:24: warning: redundant redeclaration of 'int mkstemp(char*)' in same scope [-Wredundant-decls]
int mkstemp(char *dummy);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from database.cc:6:
./stdlib.h:110:5: warning: previous declaration of 'int mkstemp(char*)' [-Wredundant-decls]
int _EXFUN(mkstemp,(char *));
^
database.cc: In member function 'bool TextDB::_needs_update() const':
database.cc:253:63: warning: unknown conversion type character 'l' in format [-Wformat=]
snprintf(buf, sizeof(buf), ":%" PRId64, (int64_t)mtime);
^
database.cc:253:63: warning: too many arguments for format [-Wformat-extra-args]
database.cc:253:63: warning: unknown conversion type character 'l' in format [-Wformat=]
database.cc:253:63: warning: too many arguments for format [-Wformat-extra-args]
database.cc: In member function 'void TextDB::_regenerate_db()':
database.cc:304:63: warning: unknown conversion type character 'l' in format [-Wformat=]
snprintf(buf, sizeof(buf), ":%" PRId64, (int64_t)mtime);
^
database.cc:304:63: warning: too many arguments for format [-Wformat-extra-args]
database.cc:304:63: warning: unknown conversion type character 'l' in format [-Wformat=]
database.cc:304:63: warning: too many arguments for format [-Wformat-extra-args]
Makefile:1468: recipe for target 'database.o' failed
make: *** [database.o] Error 1
EDIT 5: I fixed it by commenting out in unistd.h //unsigned _EXFUN(alarm, (unsigned __secs ));
Now I get the following errors:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX files.o
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from files.cc:6:
./sys/stat.h:150:81: warning: 'int stat(const char*, stat*)' hides constructor for 'struct stat' [-Wshadow]
int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
^
In file included from files.cc:83:0:
syscalls.h:21:24: warning: redundant redeclaration of 'int mkstemp(char*)' in same scope [-Wredundant-decls]
int mkstemp(char *dummy);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from files.cc:6:
./stdlib.h:110:5: warning: previous declaration of 'int mkstemp(char*)' [-Wredundant-decls]
int _EXFUN(mkstemp,(char *));
^
files.cc: In function 'bool load_ghost(bool)':
files.cc:1711:34: error: 'unlink' was not declared in this scope
unlink(ghost_filename.c_str());
^
Makefile:1468: recipe for target 'files.o' failed
make: *** [files.o] Error 1
I'm not actually sure where unlink is defined yet.
EDIT 6: I fixed it by adding #include <unistd.h> to files.cc.
Now:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX hiscores.o
hiscores.cc: In function 'void hiscores_new_entry(const scorefile_entry&)':
hiscores.cc:167:36: error: 'ftruncate' was not declared in this scope
if (ftruncate(fileno(scores), 0))
^
Makefile:1468: recipe for target 'hiscores.o' failed
make: *** [hiscores.o] Error 1
EDIT 7: I fixed it by removing the #if #endifs from around the ftruncate definition in unistd.h.
Now:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX main.o
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from main.cc:6:
./sys/stat.h:151:81: warning: 'int stat(const char*, stat*)' hides constructor for 'struct stat' [-Wshadow]
int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
^
./sys/_default_fcntl.h:197:36: warning: 'int flock(int, int)' hides constructor for 'struct flock' [-Wshadow]
extern int flock _PARAMS ((int, int));
^
main.cc: In function 'int main(int, char**)':
main.cc:275:28: error: '_fileno' was not declared in this scope
_setmode(_fileno(stdout), _O_U8TEXT);
^
main.cc:275:40: error: '_setmode' was not declared in this scope
_setmode(_fileno(stdout), _O_U8TEXT);
^
In file included from AppHdr.h:433:0,
from main.cc:6:
main.cc: In function 'int _zin_recite_to_monsters(coord_def, int, int, actor*)':
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:2327:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(prayertype, 0, NUM_RECITE_TYPES);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:2327:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(prayertype, 0, NUM_RECITE_TYPES);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:2327:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(prayertype, 0, NUM_RECITE_TYPES);
^
debug.h:120:53: warning: too many arguments for format [-Wformat-extra-args]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:2327:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(prayertype, 0, NUM_RECITE_TYPES);
^
main.cc: In function 'void _regenerate_hp_and_mp(int)':
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3177:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3177:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3177:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: too many arguments for format [-Wformat-extra-args]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3177:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3204:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3204:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: unknown conversion type character 'l' in format [-Wformat=]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3204:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
debug.h:120:53: warning: too many arguments for format [-Wformat-extra-args]
#define die(...) die(__FILE__, __LINE__, __VA_ARGS__)
^
debug.h:94:13: note: in expansion of macro 'die'
die("ASSERT failed: " #x " of %" PRIdMAX " out of range " \
^
main.cc:3204:5: note: in expansion of macro 'ASSERT_RANGE'
ASSERT_RANGE(tmp, 0, 100);
^
Makefile:1468: recipe for target 'main.o' failed
make: *** [main.o] Error 1
EDIT 8: I fixed it by adding to the top of main.cc
#define _fileno(F) ((F)->_file)
#include <io.h>
Now I get:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX maps.o
In file included from maps.cc:24:0:
endianness.h:20:6: warning: "BYTE_ORDER" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
endianness.h:20:20: warning: "LITTLE_ENDIAN" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
endianness.h:34:6: warning: "BYTE_ORDER" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
endianness.h:34:20: warning: "LITTLE_ENDIAN" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
maps.cc:43:3: error: #error BYTE_ORDER is not defined
# error BYTE_ORDER is not defined
^
maps.cc:45:5: warning: "BYTE_ORDER" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
maps.cc:45:19: warning: "LITTLE_ENDIAN" is not defined [-Wundef]
#if BYTE_ORDER == LITTLE_ENDIAN
^
In file included from maps.cc:38:0:
syscalls.h:21:24: warning: redundant redeclaration of 'int mkstemp(char*)' in same scope [-Wredundant-decls]
int mkstemp(char *dummy);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from maps.cc:6:
./stdlib.h:110:5: warning: previous declaration of 'int mkstemp(char*)' [-Wredundant-decls]
int _EXFUN(mkstemp,(char *));
^
Makefile:1468: recipe for target 'maps.o' failed
make: *** [maps.o] Error 1
EDIT 9: I fixed it by adding to endianness.h #include <endian.h>
Now:
- Code:
tim@echelon /cygdrive/c/users/tim/documents/stone_soup-0.14.0/source
$ make
* If you experience any problems building Crawl, please take a second look
* at INSTALL.txt: the solution to your problem just might be in there!
make -C rltiles all ARCH=mingw32 TILES=
make[1]: Entering directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
make[1]: Leaving directory '/cygdrive/c/users/tim/documents/stone_soup-0.14.0/source/rltiles'
CXX syscalls.o
In file included from syscalls.cc:26:0:
syscalls.h:21:24: warning: redundant redeclaration of 'int mkstemp(char*)' in same scope [-Wredundant-decls]
int mkstemp(char *dummy);
^
In file included from ./wchar.h:4:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:40,
from externs.h:11,
from AppHdr.h:434,
from syscalls.cc:6:
./stdlib.h:110:5: warning: previous declaration of 'int mkstemp(char*)' [-Wredundant-decls]
int _EXFUN(mkstemp,(char *));
^
syscalls.cc: In function 'int mkstemp(char*)':
syscalls.cc:175:51: error: '_open_osfhandle' was not declared in this scope
return _open_osfhandle((intptr_t)fh, 0);
^
syscalls.cc: In function 'int unlink_u(const char*)':
syscalls.cc:326:35: error: '_wunlink' was not declared in this scope
return _wunlink(OUTW(pathname));
^
syscalls.cc: In function 'FILE* fopen_u(const char*, const char*)':
syscalls.cc:336:42: error: '_wfopen' was not declared in this scope
return _wfopen(OUTW(path), OUTW(mode));
^
syscalls.cc: In function 'int mkdir_u(const char*, mode_t)':
syscalls.cc:345:34: error: '_wmkdir' was not declared in this scope
return _wmkdir(OUTW(pathname));
^
syscalls.cc: In function 'int open_u(const char*, int, mode_t)':
syscalls.cc:354:46: error: '_wopen' was not declared in this scope
return _wopen(OUTW(pathname), flags, mode);
^
syscalls.cc: In function 'int unlink_u(const char*)':
syscalls.cc:330:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
syscalls.cc: In function 'FILE* fopen_u(const char*, const char*)':
syscalls.cc:340:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
syscalls.cc: In function 'int mkdir_u(const char*, mode_t)':
syscalls.cc:349:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
syscalls.cc: In function 'int open_u(const char*, int, mode_t)':
syscalls.cc:358:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:1468: recipe for target 'syscalls.o' failed
make: *** [syscalls.o] Error 1
1) I replaced the io.h with the io.h from MinGW: http://sourceforge.net/p/mingw/mingw-or ... clude/io.h
2) From MinGW types.h I merged into the types.h I had copied from cygwin into the stone soup source directory.
3) I removed PURE from hash.h.
4) I had to copy from MinGW wchar.h into cygwin wchar.h I had copied into the stone soup source directory this:
- Code:
#ifndef __STRICT_ANSI__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
#endif /* __STRICT_ANSI__ */
EDIT final: After all this fucking around I gave up, shelved cygwin, installed msysgit, followed the instructions for compiling in windows under msysgit and it worked the first time. So I would recommend that either the instructions for compiling in cygwin are scrapped so poor newbies like me are not mislead into thinking it is a good idea, or are updated to be more specific on what you need to do so this mess doesn't happen