Topic: Compiling on Mac
MacOS X 10.10, bam 0.4, teeworlds 0.6
I have already installed Framework and xcode tools
When I am trying to compile bam, I am getting these warnings:
src/luafuncs.c:431:2: warning: indirection of non-volatile null pointer will be
deleted, not trap [-Wnull-dereference]
*(int*)0 = 0;
^~~~~~~~
src/luafuncs.c:431:2: note: consider using __builtin_trap() or qualifying
pointer with 'volatile'
1 warning generated.
src/lua/lauxlib.c:577:61: warning: while loop has empty body [-Wempty-body]
while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
^
src/lua/lauxlib.c:577:61: note: put the semicolon on a separate line to silence
this warning
1 warning generated.
src/lua/loslib.c:60:3: warning: 'tmpnam' is deprecated: This function is
provided for compatibility reasons only. Due to security concerns inherent
in the design of tmpnam(3), it is highly recommended that you use
mkstemp(3) instead. [-Wdeprecated-declarations]
lua_tmpnam(buff, err);
^
src/lua/luaconf.h:657:33: note: expanded from macro 'lua_tmpnam'
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
^
/usr/include/stdio.h:276:7: note: 'tmpnam' has been explicitly marked deprecated
here
char *tmpnam(char *);
^
1 warning generated.
After that, I am trying to compile teeworlds:
../bam/bam release
[ 1/152] #1 c++ src/game/gamecore.cpp
[ 2/152] #1 c++ src/game/generated/nethash.cpp
[ 3/152] #1 c++ src/game/generated/protocol.cpp
[ 4/152] #1 c++ src/game/client/animstate.cpp
[ 5/152] #1 c++ src/game/client/components/binds.cpp
[ 6/152] #1 c++ src/game/client/components/broadcast.cpp
[ 7/152] #1 c++ src/game/client/components/camera.cpp
[ 8/152] #1 c++ src/game/client/components/chat.cpp
[ 9/152] #1 c++ src/game/client/components/console.cpp
[ 10/152] #1 c++ src/game/client/components/controls.cpp
[ 11/152] #1 c++ src/game/client/components/countryflags.cpp
[ 12/152] #1 c++ src/game/client/components/damageind.cpp
[ 13/152] #1 c++ src/game/client/components/debughud.cpp
[ 14/152] #1 c++ src/game/client/components/effects.cpp
[ 15/152] #1 c++ src/game/client/components/emoticon.cpp
[ 16/152] #1 c++ src/game/client/components/flow.cpp
[ 17/152] #1 c++ src/game/client/components/hud.cpp
[ 18/152] #1 c++ src/game/client/components/items.cpp
[ 19/152] #1 c++ src/game/client/components/killmessages.cpp
[ 20/152] #1 c++ src/game/client/components/mapimages.cpp
[ 21/152] #1 c++ src/game/client/components/maplayers.cpp
[ 22/152] #1 c++ src/game/client/components/menus.cpp
[ 23/152] #1 c++ src/game/client/components/menus_browser.cpp
[ 24/152] #1 c++ src/game/client/components/menus_demo.cpp
[ 25/152] #1 c++ src/game/client/components/menus_ingame.cpp
[ 26/152] #1 c++ src/game/client/components/menus_settings.cpp
[ 27/152] #1 c++ src/game/client/components/motd.cpp
[ 28/152] #1 c++ src/game/client/components/nameplates.cpp
[ 29/152] #1 c++ src/game/client/components/particles.cpp
[ 30/152] #1 c++ src/game/client/components/players.cpp
[ 31/152] #1 c++ src/game/client/components/scoreboard.cpp
[ 32/152] #1 c++ src/game/client/components/skins.cpp
[ 33/152] #1 c++ src/game/client/components/sounds.cpp
[ 34/152] #1 c++ src/game/client/components/spectator.cpp
[ 35/152] #1 c++ src/game/client/components/voting.cpp
[ 36/152] #1 c++ src/game/client/gameclient.cpp
[ 37/152] #1 c++ src/game/client/render.cpp
[ 38/152] #1 c++ src/game/generated/client_data.cpp
[ 39/152] #1 c src/base/system.c
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:45:
/usr/include/mach/lock_set.h:63:15: error: conflicting types for 'lock_release'
kern_return_t lock_release
^
src/base/system.h:408:6: note: previous declaration is here
void lock_release(LOCK lock);
^
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:45:
/usr/include/mach/lock_set.h:75:15: error: conflicting types for 'lock_try'
kern_return_t lock_try
^
src/base/system.h:406:5: note: previous declaration is here
int lock_try(LOCK lock);
^
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:49:
/usr/include/mach/task.h:193:15: error: conflicting types for 'thread_create'
kern_return_t thread_create
^
src/base/system.h:363:7: note: previous declaration is here
void *thread_create(void (*threadfunc)(void *), void *user);
^
src/base/system.c:1791:2: warning: implicit declaration of function
'CreateStandardAlert' is invalid in C99 [-Wimplicit-function-declaration]
CreateStandardAlert(kAlertStopAlert,
^
src/base/system.c:1797:2: warning: implicit declaration of function
'RunStandardAlert' is invalid in C99 [-Wimplicit-function-declaration]
RunStandardAlert(theItem, NULL, &itemIndex);
^
2 warnings and 3 errors generated.
bam: 'objs/base/system_x86_64.o' error 256
[ 40/152] #1 c++ src/engine/client/backend_sdl.cpp
[ 41/152] #1 c++ src/engine/client/client.cpp
In file included from src/engine/client/client.cpp:45:
src/engine/client/client.h:36:8: warning: private field 'm_RLast' is not used
[-Wunused-private-field]
int64 m_RLast;
^
src/engine/client/client.h:37:8: warning: private field 'm_TLast' is not used
[-Wunused-private-field]
int64 m_TLast;
^
2 warnings generated.
[ 42/152] #1 c++ src/engine/client/graphics.cpp
[ 43/152] #1 c++ src/engine/client/input.cpp
[ 44/152] #1 c++ src/game/editor/editor.cpp
[ 45/152] #1 c++ src/game/editor/io.cpp
[ 46/152] #1 c++ src/game/editor/layer_quads.cpp
[ 47/152] #1 c++ src/game/editor/layer_tiles.cpp
[ 48/152] #1 c++ src/game/server/entities/character.cpp
[ 49/152] #1 c++ src/game/server/entities/flag.cpp
[ 50/152] #1 c++ src/game/server/entities/laser.cpp
[ 51/152] #1 c++ src/game/server/entities/pickup.cpp
[ 52/152] #1 c++ src/game/server/entities/projectile.cpp
[ 53/152] #1 c++ src/game/server/entity.cpp
[ 54/152] #1 c++ src/game/server/eventhandler.cpp
[ 55/152] #1 c++ src/game/server/gamecontext.cpp
[ 56/152] #1 c++ src/game/server/gamecontroller.cpp
[ 57/152] #1 c++ src/game/server/gamemodes/ctf.cpp
[ 58/152] #1 c++ src/game/server/gamemodes/tdm.cpp
[ 59/152] #1 c++ src/game/server/gameworld.cpp
[ 60/152] #1 c++ src/game/server/player.cpp
[ 61/152] #1 c++ src/game/generated/server_data.cpp
[ 62/152] #1 c++ src/versionsrv/versionsrv.cpp
[ 63/152] #1 c++ src/game/gamecore.cpp
[ 64/152] #1 c++ src/game/generated/nethash.cpp
[ 65/152] #1 c++ src/game/generated/protocol.cpp
[ 66/152] #1 c++ src/game/client/animstate.cpp
[ 67/152] #1 c++ src/game/client/components/binds.cpp
[ 68/152] #1 c++ src/game/client/components/broadcast.cpp
[ 69/152] #1 c++ src/game/client/components/camera.cpp
[ 70/152] #1 c++ src/game/client/components/chat.cpp
[ 71/152] #1 c++ src/game/client/components/console.cpp
[ 72/152] #1 c++ src/game/client/components/controls.cpp
[ 73/152] #1 c++ src/game/client/components/countryflags.cpp
[ 74/152] #1 c++ src/game/client/components/damageind.cpp
[ 75/152] #1 c++ src/game/client/components/debughud.cpp
[ 76/152] #1 c++ src/game/client/components/effects.cpp
[ 77/152] #1 c++ src/game/client/components/emoticon.cpp
[ 78/152] #1 c++ src/game/client/components/flow.cpp
[ 79/152] #1 c++ src/game/client/components/hud.cpp
[ 80/152] #1 c++ src/game/client/components/items.cpp
[ 81/152] #1 c++ src/game/client/components/killmessages.cpp
[ 82/152] #1 c++ src/game/client/components/mapimages.cpp
[ 83/152] #1 c++ src/game/client/components/maplayers.cpp
[ 84/152] #1 c++ src/game/client/components/menus.cpp
[ 85/152] #1 c++ src/game/client/components/menus_browser.cpp
[ 86/152] #1 c++ src/game/client/components/menus_demo.cpp
[ 87/152] #1 c++ src/game/client/components/menus_ingame.cpp
[ 88/152] #1 c++ src/game/client/components/menus_settings.cpp
[ 89/152] #1 c++ src/game/client/components/motd.cpp
[ 90/152] #1 c++ src/game/client/components/nameplates.cpp
[ 91/152] #1 c++ src/game/client/components/particles.cpp
[ 92/152] #1 c++ src/game/client/components/players.cpp
[ 93/152] #1 c++ src/game/client/components/scoreboard.cpp
[ 94/152] #1 c++ src/game/client/components/skins.cpp
[ 95/152] #1 c++ src/game/client/components/sounds.cpp
[ 96/152] #1 c++ src/game/client/components/spectator.cpp
[ 97/152] #1 c++ src/game/client/components/voting.cpp
[ 98/152] #1 c++ src/game/client/gameclient.cpp
[ 99/152] #1 c++ src/game/client/render.cpp
[100/152] #1 c++ src/game/generated/client_data.cpp
[101/152] #1 c src/base/system.c
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:45:
/usr/include/mach/lock_set.h:63:15: error: conflicting types for 'lock_release'
kern_return_t lock_release
^
src/base/system.h:408:6: note: previous declaration is here
void lock_release(LOCK lock);
^
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:45:
/usr/include/mach/lock_set.h:75:15: error: conflicting types for 'lock_try'
kern_return_t lock_try
^
src/base/system.h:406:5: note: previous declaration is here
int lock_try(LOCK lock);
^
In file included from src/base/system.c:31:
In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43:
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:9:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h:13:
In file included from /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h:30:
In file included from /usr/include/xpc/xpc.h:330:
In file included from /usr/include/launch.h:29:
In file included from /usr/include/mach/mach.h:67:
In file included from /usr/include/mach/mach_interface.h:49:
/usr/include/mach/task.h:193:15: error: conflicting types for 'thread_create'
kern_return_t thread_create
^
src/base/system.h:363:7: note: previous declaration is here
void *thread_create(void (*threadfunc)(void *), void *user);
^
3 errors generated.
bam: 'objs/base/system_x86.o' error 256
[102/152] #1 c++ src/engine/client/backend_sdl.cpp
[103/152] #1 c++ src/engine/client/client.cpp
In file included from src/engine/client/client.cpp:45:
src/engine/client/client.h:36:8: warning: private field 'm_RLast' is not used
[-Wunused-private-field]
int64 m_RLast;
^
src/engine/client/client.h:37:8: warning: private field 'm_TLast' is not used
[-Wunused-private-field]
int64 m_TLast;
^
2 warnings generated.
[104/152] #1 c++ src/engine/client/graphics.cpp
[105/152] #1 c++ src/engine/client/input.cpp
[106/152] #1 c++ src/game/editor/editor.cpp
[107/152] #1 c++ src/game/editor/io.cpp
[108/152] #1 c++ src/game/editor/layer_quads.cpp
[109/152] #1 c++ src/game/editor/layer_tiles.cpp
[110/152] #1 c++ src/game/server/entities/character.cpp
[111/152] #1 c++ src/game/server/entities/flag.cpp
[112/152] #1 c++ src/game/server/entities/laser.cpp
[113/152] #1 c++ src/game/server/entities/pickup.cpp
[114/152] #1 c++ src/game/server/entities/projectile.cpp
[115/152] #1 c++ src/game/server/entity.cpp
[116/152] #1 c++ src/game/server/eventhandler.cpp
[117/152] #1 c++ src/game/server/gamecontext.cpp
[118/152] #1 c++ src/game/server/gamecontroller.cpp
[119/152] #1 c++ src/game/server/gamemodes/ctf.cpp
[120/152] #1 c++ src/game/server/gamemodes/tdm.cpp
[121/152] #1 c++ src/game/server/gameworld.cpp
[122/152] #1 c++ src/game/server/player.cpp
[123/152] #1 c++ src/game/generated/server_data.cpp
[124/152] #1 c++ src/versionsrv/versionsrv.cpp
bam: error: a build step failed
What am I doing wrong?
How can I fix that?
P.S. Sorry for my English