Problem building from source on Mac OS


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

erf

Temple Termagant

Posts: 9

Joined: Wednesday, 22nd April 2015, 19:11

Post Monday, 4th December 2017, 00:52

Problem building from source on Mac OS

I run make TILES=y from the source folder and get the following error:

  Code:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
  * 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: freetype libpng sdl2 sdl2-image zlib lua/src sqlite
make[2]: *** No rule to make target `src/audio/coreaudio/*.o', needed by `libSDL2.a'.  Stop.
make[1]: *** [sdl2] Error 2
make: *** [.contrib-libs] Error 2


Anyone having success on bulding latest ( 43a1781948 ) on Mac OS?
User avatar

Dungeon Master

Posts: 501

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

Location: Lexington, KY, US

Post Monday, 4th December 2017, 04:06

Re: Problem building from source on Mac OS

I don't have Mac OS to test with, but try this: edit contrib/sdl2/Makefile, find the line
  Code:
src/audio/coreaudio/*.c \
, and change the "*.c" to "*.m".

Dungeon Master

Posts: 215

Joined: Monday, 18th August 2014, 20:04

Post Monday, 4th December 2017, 05:34

Re: Problem building from source on Mac OS

This should be fixed now if you update your submodules. (I build on mac but I guess that .o file was cached somewhere.)

erf

Temple Termagant

Posts: 9

Joined: Wednesday, 22nd April 2015, 19:11

Post Wednesday, 6th December 2017, 03:57

Re: Problem building from source on Mac OS

I got a bit further now, but compliation failed with the following:
  Code:
In file included from clua.cc:7:
./cluautil.h:53:28: error: unknown type name 'luaL_reg'; did you mean 'luaL_Reg'?
                     const luaL_reg *lua_lib,
                           ^~~~~~~~
                           luaL_Reg
/usr/local/include/lauxlib.h:26:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
In file included from clua.cc:7:
./cluautil.h:57:36: error: unknown type name 'luaL_reg'; did you mean 'luaL_Reg'?
                             const luaL_reg *lr,
                                   ^~~~~~~~
                                   luaL_Reg
/usr/local/include/lauxlib.h:26:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
2 errors generated.
make: *** [clua.o] Error 1


Entering 'lua -v' yields:
  Code:
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio


Do i need to install additional Lua libraries?

erf

Temple Termagant

Posts: 9

Joined: Wednesday, 22nd April 2015, 19:11

Post Wednesday, 6th December 2017, 10:16

Re: Problem building from source on Mac OS

I tried to rename the variables as suggeted by the compiler and then got the following errors:

  Code:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C rltiles all ARCH=x86_64-apple-darwin17.2.0 TILES=y
    CXX cluautil.o
cluautil.cc:55:5: error: use of undeclared identifier 'luaL_openlib'
    luaL_openlib(ls, global, lua_lib, 0);
    ^
cluautil.cc:81:9: error: use of undeclared identifier 'luaL_openlib'
        luaL_openlib(ls, nullptr, lr, 0);
        ^
2 errors generated.
make: *** [cluautil.o] Error 1

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

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