Help getting crawl to build


Questions, Explanations, Howtos

Temple Termagant

Posts: 8

Joined: Monday, 2nd September 2013, 09:26

Post Thursday, 16th April 2015, 02:43

Help getting crawl to build

I wanted to try and create some new species to play as so I downloaded the source code and am trying to build my code.

I am using cygwin to build, but I'm running into some errors. Here is the error message:
----------------------------------------------------------------------------
cat: util/release_ver: No such file or directory
* 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!
* Need to build contribs: pcre lua/src sqlite
make[1]: Entering directory '/cygdrive/c/Users/Joseph/Documents/crawl-master/crawl-master/crawl-ref/source/contrib'
**********************************************************

The 'pcre' directory exists, but the Makefile is missing!
Did 'git submodule update' work properly?
(It's probably better to install all native dependencies instead.)

**********************************************************
Makefile:22: recipe for target 'pcre' failed
make[1]: *** [pcre] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/Joseph/Documents/crawl-master/crawl-master/crawl-ref/source/contrib'
Makefile:1585: recipe for target '.contrib-libs' failed
make: *** [.contrib-libs] Error 2

------------------------------------------------------------------------------------
It looks to me like some directories/files are missing, could anyone give me some advice?

For this message the author XNoize has received thanks:
Siegurt

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Thursday, 16th April 2015, 04:03

Re: Help getting crawl to build

Looks like you're missing the submodules.

Try:
git submodule update
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

For this message the author Siegurt has received thanks:
XNoize

Temple Termagant

Posts: 8

Joined: Monday, 2nd September 2013, 09:26

Post Thursday, 16th April 2015, 06:09

Re: Help getting crawl to build

Siegurt wrote:Looks like you're missing the submodules.

Try:
git submodule update


ok did that, looks like the firewall is blocking git though. I will try again when I can use different wifi.

Temple Termagant

Posts: 8

Joined: Monday, 2nd September 2013, 09:26

Post Thursday, 16th April 2015, 20:19

Re: Help getting crawl to build

Success!

Unfortunately, while crawl starts building fine, I have run into several errors with the to_string() or fileno() functions. For example:

-------------------------------------------------------------
files.cc: In function ‘time_t file_modtime(FILE*)’:
files.cc:304:23: error: ‘fileno’ was not declared in this scope
if (fstat(fileno(f), &filestat))
-------------------------------------------------------------

Upon doing some googling, it appears that this problem can be caused if C++11 support is not enabled. Could anyone give me some advice on how to do this?

Temple Termagant

Posts: 8

Joined: Monday, 2nd September 2013, 09:26

Post Friday, 17th April 2015, 18:17

Re: Help getting crawl to build

Ended up fixing the problem by changing the -std=c++11 to -std=gnu++0x in the makefile, im told -std=gnu++11 should work as well (I have no idea what the difference is). this fixed the fileno errors, I fixed the to_string errors by reverting to the make_stringf("%d", n) function in place of it as it was mentioned in the git repository.
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Saturday, 18th April 2015, 01:09

Re: Help getting crawl to build

XNoize wrote:Ended up fixing the problem by changing the -std=c++11 to -std=gnu++0x in the makefile, im told -std=gnu++11 should work as well (I have no idea what the difference is). this fixed the fileno errors, I fixed the to_string errors by reverting to the make_stringf("%d", n) function in place of it as it was mentioned in the git repository.


Ah, IIRC this is because the standard library that Cygwin uses fails to define POSIX- (Unix-) specific things in standards-compliant mode. This is an intentional behaviour.

Does it help if you go back to compiling with -std=c++11 but put this line at the top of AppHdr.h?

  Code:
#define _POSIX_C_SOURCE 1

Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.