Compiling crawl on MacOS X with gcc-4.7.1


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Snake Sneak

Posts: 105

Joined: Monday, 11th July 2011, 13:53

Post Wednesday, 19th September 2012, 13:10

Compiling crawl on MacOS X with gcc-4.7.1

I compiled and installed gcc-4.7.1 to /usr/gcc-4.7.1 (I used this tutorial ). I created symlinks in /usr/bin:

  Code:
#[~$]
ls -l /usr/bin/g++
lrwxr-xr-x  1 root  wheel  26 Sep 19 11:31 /usr/bin/g++ -> /usr/gcc-4.7.1/bin/g++-4.7
#[~$]
ls -l /usr/bin/gcc
lrwxr-xr-x  1 root  wheel  26 Sep 19 11:28 /usr/bin/gcc -> /usr/gcc-4.7.1/bin/gcc-4.7
#[~$]


Compilation yields this error message:

  Code:
#[~/crawl/crawl-ref/source$]
make
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
  * If you experience any problems building Crawl, please take a second look
make -C rltiles all ARCH=x86_64-apple-darwin11.4.0 TILES=
    CXX crash.o
crash.cc: In function ‘void _crash_signal_handler(int)’:
crash.cc:137:12: error: ‘alarm’ was not declared in this scope
make: *** [crash.o] Error 1
#[~/crawl/crawl-ref/source$]


Compiling the following test programs works fine:

  Code:
#include <unistd.h>
int main(void)
{
   alarm(1);
   return 0;
}


  • Is 4.7.1 supported?
  • I compiled gcc without objective c/c++ support. It is not needed when compiling the console version, correct?
  • Does anyone has experience with this setup?
User avatar

Dungeon Master

Posts: 502

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

Location: Lexington, KY, US

Post Wednesday, 19th September 2012, 13:34

Re: Compiling crawl on MacOS X with gcc-4.7.1

Both problems (the warnings about pkg-config and the failure on crash.cc) should be fixed in trunk (0.12-a0-562-g3867c10) and 0.11 (0.11-b1-134-g2d3d357) now. If you have further problems, please file a report on Mantis: https://crawl.develz.org/mantis/

Snake Sneak

Posts: 105

Joined: Monday, 11th July 2011, 13:53

Post Wednesday, 19th September 2012, 16:25

Re: Compiling crawl on MacOS X with gcc-4.7.1

Thanks for the quick fix. I just set up the gcc, that's why I thought it was a problem with my setup, not with crawl.

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests

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