1

Topic: Can't compile Bam ?

When i tried to follow this tutorial here https://www.teeworlds.com/?page=docs&am … Everything i have to compile Bam 0.4.0 but that what happen http://www.mediafire.com/view/tonuw4u9j … worlds.png so  what to do ??
BTW : my OS is Ubuntu 14.04

2

Re: Can't compile Bam ?

It is just a warning, no error. It should be fine.

3 (edited by 2014-04-30 15:15:20)

Re: Can't compile Bam ?

That mean that Bam was compiled correctly ??

So what is this ??

naruto@naruto-Inspiron-N5110:~$ cd teeworlds-0.6.2-source/
naruto@naruto-Inspiron-N5110:~/teeworlds-0.6.2-source$ ../bam-0.4.0/bam
auto configuration

configuration:
AUTO  compiler             gcc
AUTO  stackprotector       yes
AUTO  minmacosxsdk         no
AUTO  macosxppc            no
AUTO  zlib                 (in system path)
AUTO  sdl                  not found (required)
AUTO  freetype             using freetype-config

notes:
saved configuration to 'config.lua'

[  1/133] #1 c++ src/engine/shared/huffman.cpp
[  2/133] #1 c++ src/engine/shared/masterserver.cpp
[  3/133] #1 c++ src/engine/shared/snapshot.cpp
[  4/133] #1 c++ src/engine/shared/jobs.cpp
[  5/133] #1 c++ src/engine/shared/config.cpp
[  6/133] #1 c++ src/engine/shared/map.cpp
[  7/133] #1 c++ src/engine/shared/kernel.cpp
[  8/133] #1 c++ src/engine/shared/console.cpp
[  9/133] #1 c++ src/engine/shared/netban.cpp
[ 10/133] #1 c++ src/engine/shared/mapchecker.cpp
[ 11/133] #1 c++ src/engine/shared/econ.cpp
[ 12/133] #1 c++ src/engine/shared/engine.cpp
[ 13/133] #1 c++ src/engine/shared/network_client.cpp
[ 14/133] #1 c++ src/engine/shared/network_console.cpp
[ 15/133] #1 c++ src/engine/shared/storage.cpp
[ 16/133] #1 c++ src/engine/shared/network_console_conn.cpp
[ 17/133] #1 c++ src/engine/shared/datafile.cpp
[ 18/133] #1 c++ src/engine/shared/linereader.cpp
[ 19/133] #1 c++ src/engine/shared/network.cpp
[ 20/133] #1 c++ src/engine/shared/ringbuffer.cpp
[ 21/133] #1 c++ src/engine/shared/network_server.cpp
[ 22/133] #1 c++ src/engine/shared/compression.cpp
[ 23/133] #1 c++ src/engine/shared/packer.cpp
[ 24/133] #1 c++ src/engine/shared/network_conn.cpp
[ 25/133] #1 c++ src/engine/shared/filecollection.cpp
[ 26/133] #1 c++ src/engine/shared/memheap.cpp
[ 27/133] #1 c++ src/engine/shared/demo.cpp
[ 28/133] #1 c src/base/system.c
[ 29/133] #1 c++ src/engine/server/register.cpp
[ 30/133] #1 c++ src/engine/server/server.cpp
[ 31/133] #1 network_header > src/game/generated/protocol.h
[ 32/133] #1 c++ src/game/gamecore.cpp
[ 33/133] #1 c++ src/game/collision.cpp
[ 34/133] #1 c++ src/game/localization.cpp
[ 35/133] #1 c++ src/game/layers.cpp
[ 36/133] #1 cmd5 src/game/generated/nethash.cpp
[ 37/133] #1 c++ src/game/generated/nethash.cpp
[ 38/133] #1 network_source > src/game/generated/protocol.cpp
[ 39/133] #1 c++ src/game/generated/protocol.cpp
[ 40/133] #1 server_content_header > src/game/generated/server_data.h
[ 41/133] #1 c++ src/game/server/gameworld.cpp
[ 42/133] #1 c++ src/game/server/entity.cpp
[ 43/133] #1 c++ src/game/server/gamecontext.cpp
[ 44/133] #1 c++ src/game/server/gamemodes/dm.cpp
[ 45/133] #1 c++ src/game/server/gamemodes/mod.cpp
[ 46/133] #1 c++ src/game/server/gamemodes/ctf.cpp
[ 47/133] #1 c++ src/game/server/gamemodes/tdm.cpp
[ 48/133] #1 c++ src/game/server/entities/character.cpp
[ 49/133] #1 c++ src/game/server/entities/pickup.cpp
[ 50/133] #1 c++ src/game/server/entities/projectile.cpp
[ 51/133] #1 c++ src/game/server/entities/laser.cpp
[ 52/133] #1 c++ src/game/server/entities/flag.cpp
[ 53/133] #1 c++ src/game/server/eventhandler.cpp
[ 54/133] #1 c++ src/game/server/player.cpp
[ 55/133] #1 c++ src/game/server/gamecontroller.cpp
[ 56/133] #1 server_content_source > src/game/generated/server_data.cpp
[ 57/133] #1 c++ src/game/generated/server_data.cpp
[ 58/133] #1 c src/engine/external/zlib/deflate.c
[ 59/133] #1 c src/engine/external/zlib/inffast.c
[ 60/133] #1 c src/engine/external/zlib/zutil.c
[ 61/133] #1 c src/engine/external/zlib/uncompr.c
[ 62/133] #1 c src/engine/external/zlib/compress.c
[ 63/133] #1 c src/engine/external/zlib/infback.c
[ 64/133] #1 c src/engine/external/zlib/trees.c
[ 65/133] #1 c src/engine/external/zlib/inflate.c
[ 66/133] #1 c src/engine/external/zlib/adler32.c
[ 67/133] #1 c src/engine/external/zlib/inftrees.c
[ 68/133] #1 c src/engine/external/zlib/crc32.c
[ 69/133] #1 link teeworlds_srv_d
[ 70/133] #1 c++ src/game/client/render_map.cpp
[ 71/133] #1 client_content_header > src/game/generated/client_data.h
[ 72/133] #1 c++ src/game/client/animstate.cpp
[ 73/133] #1 c++ src/game/client/gameclient.cpp
[ 74/133] #1 c++ src/game/client/lineinput.cpp
[ 75/133] #1 c++ src/game/client/ui.cpp
[ 76/133] #1 c++ src/game/client/render.cpp
[ 77/133] #1 c++ src/game/client/components/hud.cpp
[ 78/133] #1 c++ src/game/client/components/flow.cpp
[ 79/133] #1 c++ src/game/client/components/menus_demo.cpp
[ 80/133] #1 c++ src/game/client/components/voting.cpp
[ 81/133] #1 c++ src/game/client/components/binds.cpp
[ 82/133] #1 c++ src/game/client/components/items.cpp
[ 83/133] #1 c++ src/game/client/components/maplayers.cpp
[ 84/133] #1 c++ src/game/client/components/scoreboard.cpp
[ 85/133] #1 c++ src/game/client/components/skins.cpp
[ 86/133] #1 c++ src/game/client/components/console.cpp
[ 87/133] #1 c++ src/game/client/components/killmessages.cpp
[ 88/133] #1 c++ src/game/client/components/players.cpp
[ 89/133] #1 c++ src/game/client/components/menus.cpp
[ 90/133] #1 c++ src/game/client/components/emoticon.cpp
[ 91/133] #1 c++ src/game/client/components/camera.cpp
[ 92/133] #1 c++ src/game/client/components/broadcast.cpp
[ 93/133] #1 c++ src/game/client/components/menus_ingame.cpp
[ 94/133] #1 c++ src/game/client/components/menus_browser.cpp
[ 95/133] #1 c++ src/game/client/components/mapimages.cpp
[ 96/133] #1 c++ src/game/client/components/particles.cpp
[ 97/133] #1 c++ src/game/client/components/countryflags.cpp
[ 98/133] #1 c++ src/game/client/components/menus_settings.cpp
[ 99/133] #1 c++ src/game/client/components/damageind.cpp
[100/133] #1 c++ src/game/client/components/sounds.cpp
[101/133] #1 c++ src/game/client/components/nameplates.cpp
[102/133] #1 c++ src/game/client/components/chat.cpp
[103/133] #1 c++ src/game/client/components/debughud.cpp
[104/133] #1 c++ src/game/client/components/controls.cpp
[105/133] #1 c++ src/game/client/components/motd.cpp
[106/133] #1 c++ src/game/client/components/effects.cpp
[107/133] #1 c++ src/game/client/components/spectator.cpp
[108/133] #1 client_content_source > src/game/generated/client_data.cpp
[109/133] #1 c++ src/game/generated/client_data.cpp
[110/133] #1 c++ src/engine/client/graphics.cpp
src/engine/client/graphics.cpp:8:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'objs/engine/client/graphics_d.o' error 256
[111/133] #1 c++ src/engine/client/sound.cpp
src/engine/client/sound.cpp:11:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'objs/engine/client/sound_d.o' error 256
[112/133] #1 c++ src/engine/client/backend_sdl.cpp
src/engine/client/backend_sdl.cpp:2:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'objs/engine/client/backend_sdl_d.o' error 256
[113/133] #1 c++ src/engine/client/input.cpp
src/engine/client/input.cpp:3:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'objs/engine/client/input_d.o' error 256
[114/133] #1 c++ src/engine/client/text.cpp
[115/133] #1 c++ src/engine/client/serverbrowser.cpp
[116/133] #1 c++ src/engine/client/friends.cpp
[117/133] #1 c++ src/engine/client/client.cpp
src/engine/client/client.cpp:53:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'objs/engine/client/client_d.o' error 256
[118/133] #1 c++ src/engine/client/graphics_threaded.cpp
[119/133] #1 c++ src/game/editor/popups.cpp
[120/133] #1 c++ src/game/editor/auto_map.cpp
[121/133] #1 c++ src/game/editor/layer_tiles.cpp
[122/133] #1 c++ src/game/editor/layer_game.cpp
[123/133] #1 c++ src/game/editor/editor.cpp
[124/133] #1 c++ src/game/editor/io.cpp
[125/133] #1 c++ src/game/editor/layer_quads.cpp
[126/133] #1 c src/engine/external/pnglite/pnglite.c
[127/133] #1 c src/engine/external/wavpack/wputils.c
[128/133] #1 c src/engine/external/wavpack/metadata.c
[129/133] #1 c src/engine/external/wavpack/float.c
[130/133] #1 c src/engine/external/wavpack/words.c
[131/133] #1 c src/engine/external/wavpack/bits.c
[132/133] #1 c src/engine/external/wavpack/unpack.c
bam: error: a build step failed

Is this a failure ???

4

Re: Can't compile Bam ?

Yes it is a failure, it says that you haven't installed the SDL stuff. To get it this should work: apt-get install libsdl1.2-dev

IMPORTANT: if you have installed it properly, delete the config.lua !

Luck is allowed

5 (edited by Naruto_Egy 2014-04-30 20:24:03)

Re: Can't compile Bam ?

Thanks i have installed (libsdl1.2-dev) and have to remove config.lua as you say as the error remains and i think Teeworlds have been compiled correctly http://www.mediafire.com/view/jos92y03a … 20done.png
, but i don't know From where to start ??
http://www.mediafire.com/view/ohxv1n91a … 0start.png
i want to see the code of the game and make some mods !!
in fact i want to modify the Infection mod and make it have a lot of admin things so how to start ??

6

Re: Can't compile Bam ?

Please be aware of the difference between warnings and failures.
Your missing SDL library was a failure, the conversion from int to char a warning.

As you can read in your console output, bam compiled teeworlds finally. (With the applications "teeworlds_d" and "teeworlds_srv_d".

Now you can start programming your own stuff!

7 (edited by Naruto_Egy 2014-05-10 19:25:28)

Re: Can't compile Bam ?

Oh that happens again when i try to compile the infection code from here  https://github.com/Teetime/teeworlds/tree/infection
and this happen

naruto@naruto-Inspiron-N5110:~$ cd teeworlds-infection/
naruto@naruto-Inspiron-N5110:~/teeworlds-infection$ ../bam-0.4.0/bam
auto configuration

configuration:
AUTO  compiler             gcc
AUTO  stackprotector       yes
AUTO  minmacosxsdk         no
AUTO  macosxppc            no
AUTO  zlib                 (in system path)
AUTO  sdl                  using sdl-config
AUTO  freetype             using freetype-config

notes:
saved configuration to 'config.lua'

[  1/136] #1 c++ src/engine/shared/huffman.cpp
[  2/136] #1 c++ src/engine/shared/masterserver.cpp
[  3/136] #1 c++ src/engine/shared/snapshot.cpp
[  4/136] #1 c++ src/engine/shared/jobs.cpp
[  5/136] #1 c++ src/engine/shared/config.cpp
[  6/136] #1 c++ src/engine/shared/map.cpp
[  7/136] #1 c++ src/engine/shared/kernel.cpp
[  8/136] #1 c++ src/engine/shared/console.cpp
[  9/136] #1 c++ src/engine/shared/netban.cpp
[ 10/136] #1 c++ src/engine/shared/mapchecker.cpp
[ 11/136] #1 c++ src/engine/shared/econ.cpp
[ 12/136] #1 c++ src/engine/shared/engine.cpp
[ 13/136] #1 c++ src/engine/shared/network_client.cpp
[ 14/136] #1 c++ src/engine/shared/network_console.cpp
[ 15/136] #1 c++ src/engine/shared/storage.cpp
[ 16/136] #1 c++ src/engine/shared/network_console_conn.cpp
[ 17/136] #1 c++ src/engine/shared/datafile.cpp
[ 18/136] #1 c++ src/engine/shared/linereader.cpp
[ 19/136] #1 c++ src/engine/shared/network.cpp
[ 20/136] #1 c++ src/engine/shared/ringbuffer.cpp
[ 21/136] #1 c++ src/engine/shared/network_server.cpp
[ 22/136] #1 c++ src/engine/shared/compression.cpp
[ 23/136] #1 c++ src/engine/shared/packer.cpp
[ 24/136] #1 c++ src/engine/shared/network_conn.cpp
[ 25/136] #1 c++ src/engine/shared/filecollection.cpp
[ 26/136] #1 c++ src/engine/shared/memheap.cpp
[ 27/136] #1 c++ src/engine/shared/demo.cpp
[ 28/136] #1 c src/base/system.c
[ 29/136] #1 c++ src/engine/server/register.cpp
[ 30/136] #1 c++ src/engine/server/server.cpp
[ 31/136] #1 network_header > src/game/generated/protocol.h
[ 32/136] #1 c++ src/game/gamecore.cpp
[ 33/136] #1 c++ src/game/collision.cpp
[ 34/136] #1 c++ src/game/localization.cpp
[ 35/136] #1 c++ src/game/layers.cpp
[ 36/136] #1 cmd5 src/game/generated/nethash.cpp
[ 37/136] #1 c++ src/game/generated/nethash.cpp
[ 38/136] #1 network_source > src/game/generated/protocol.cpp
[ 39/136] #1 c++ src/game/generated/protocol.cpp
[ 40/136] #1 server_content_header > src/game/generated/server_data.h
[ 41/136] #1 c++ src/game/server/gameworld.cpp
[ 42/136] #1 c++ src/game/server/entity.cpp
[ 43/136] #1 c++ src/game/server/gamecontext.cpp
[ 44/136] #1 c++ src/game/server/gamemodes/infection.cpp
src/game/server/gamemodes/infection.cpp:5:17: fatal error: dos.h: No such file or directory
 #include <dos.h>
                 ^
compilation terminated.
bam: 'objs/game/server/gamemodes/infection_d.o' error 256
[ 45/136] #1 c++ src/game/server/gamemodes/dm.cpp
[ 46/136] #1 c++ src/game/server/gamemodes/mod.cpp
[ 47/136] #1 c++ src/game/server/gamemodes/ctf.cpp
[ 48/136] #1 c++ src/game/server/gamemodes/tdm.cpp
[ 49/136] #1 c++ src/game/server/entities/character.cpp
[ 50/136] #1 c++ src/game/server/entities/pickup.cpp
[ 51/136] #1 c++ src/game/server/entities/wall.cpp
In file included from src/game/server/gamecontroller.h:6:0,
                 from src/game/server/gamecontext.h:14,
                 from src/game/server/entities/wall.cpp:5:
src/base/vmath.h: In instantiation of ‘vector2_base<T> closest_point_on_line(vector2_base<T>, vector2_base<T>, vector2_base<T>) [with T = float]’:
src/game/server/entities/wall.cpp:41:63:   required from here
src/base/vmath.h:84:58: error: ‘clamp’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
  return mix(line_point0, line_point1, clamp(t, (T)0, (T)1));
                                                          ^
In file included from src/game/gamecore.h:7:0,
                 from src/game/server/gameworld.h:6,
                 from src/game/server/gamecontext.h:15,
                 from src/game/server/entities/wall.cpp:5:
src/base/math.h:9:10: note: ‘template<class T> T clamp(T, T, T)’ declared here, later in the translation unit
 inline T clamp(T val, T min, T max)
          ^
bam: 'objs/game/server/entities/wall_d.o' error 256
[ 52/136] #1 c++ src/game/server/entities/projectile.cpp
[ 53/136] #1 c++ src/game/server/entities/laser.cpp
[ 54/136] #1 c++ src/game/server/entities/airstrike.cpp
[ 55/136] #1 c++ src/game/server/entities/flag.cpp
[ 56/136] #1 c++ src/game/server/eventhandler.cpp
[ 57/136] #1 c++ src/game/server/player.cpp
[ 58/136] #1 c++ src/game/server/gamecontroller.cpp
[ 59/136] #1 server_content_source > src/game/generated/server_data.cpp
[ 60/136] #1 c++ src/game/generated/server_data.cpp
[ 61/136] #1 c src/engine/external/zlib/deflate.c
[ 62/136] #1 c src/engine/external/zlib/inffast.c
[ 63/136] #1 c src/engine/external/zlib/zutil.c
[ 64/136] #1 c src/engine/external/zlib/uncompr.c
[ 65/136] #1 c src/engine/external/zlib/compress.c
[ 66/136] #1 c src/engine/external/zlib/infback.c
[ 67/136] #1 c src/engine/external/zlib/trees.c
[ 68/136] #1 c src/engine/external/zlib/inflate.c
[ 69/136] #1 c src/engine/external/zlib/adler32.c
[ 70/136] #1 c src/engine/external/zlib/inftrees.c
[ 71/136] #1 c src/engine/external/zlib/crc32.c
[ 72/136] #1 c++ src/game/client/render_map.cpp
[ 73/136] #1 client_content_header > src/game/generated/client_data.h
[ 74/136] #1 c++ src/game/client/animstate.cpp
[ 75/136] #1 c++ src/game/client/gameclient.cpp
[ 76/136] #1 c++ src/game/client/lineinput.cpp
[ 77/136] #1 c++ src/game/client/ui.cpp
[ 78/136] #1 c++ src/game/client/render.cpp
[ 79/136] #1 c++ src/game/client/components/hud.cpp
[ 80/136] #1 c++ src/game/client/components/flow.cpp
[ 81/136] #1 c++ src/game/client/components/menus_demo.cpp
[ 82/136] #1 c++ src/game/client/components/voting.cpp
[ 83/136] #1 c++ src/game/client/components/binds.cpp
[ 84/136] #1 c++ src/game/client/components/items.cpp
[ 85/136] #1 c++ src/game/client/components/maplayers.cpp
[ 86/136] #1 c++ src/game/client/components/scoreboard.cpp
[ 87/136] #1 c++ src/game/client/components/skins.cpp
[ 88/136] #1 c++ src/game/client/components/console.cpp
[ 89/136] #1 c++ src/game/client/components/killmessages.cpp
[ 90/136] #1 c++ src/game/client/components/players.cpp
[ 91/136] #1 c++ src/game/client/components/menus.cpp
[ 92/136] #1 c++ src/game/client/components/emoticon.cpp
[ 93/136] #1 c++ src/game/client/components/camera.cpp
[ 94/136] #1 c++ src/game/client/components/broadcast.cpp
[ 95/136] #1 c++ src/game/client/components/menus_ingame.cpp
[ 96/136] #1 c++ src/game/client/components/menus_browser.cpp
[ 97/136] #1 c++ src/game/client/components/mapimages.cpp
[ 98/136] #1 c++ src/game/client/components/particles.cpp
[ 99/136] #1 c++ src/game/client/components/countryflags.cpp
[100/136] #1 c++ src/game/client/components/menus_settings.cpp
[101/136] #1 c++ src/game/client/components/damageind.cpp
[102/136] #1 c++ src/game/client/components/sounds.cpp
[103/136] #1 c++ src/game/client/components/nameplates.cpp
[104/136] #1 c++ src/game/client/components/chat.cpp
[105/136] #1 c++ src/game/client/components/debughud.cpp
[106/136] #1 c++ src/game/client/components/controls.cpp
[107/136] #1 c++ src/game/client/components/motd.cpp
[108/136] #1 c++ src/game/client/components/effects.cpp
[109/136] #1 c++ src/game/client/components/spectator.cpp
[110/136] #1 client_content_source > src/game/generated/client_data.cpp
[111/136] #1 c++ src/game/generated/client_data.cpp
[112/136] #1 c++ src/engine/client/graphics.cpp
[113/136] #1 c++ src/engine/client/sound.cpp
[114/136] #1 c++ src/engine/client/backend_sdl.cpp
[115/136] #1 c++ src/engine/client/input.cpp
[116/136] #1 c++ src/engine/client/text.cpp
[117/136] #1 c++ src/engine/client/serverbrowser.cpp
[118/136] #1 c++ src/engine/client/friends.cpp
[119/136] #1 c++ src/engine/client/client.cpp
src/engine/client/client.cpp: In member function ‘void CClient::ProcessConnlessPacket(CNetChunk*)’:
src/engine/client/client.cpp:939:105: warning: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
    static char IPV4Mapping[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
                                                                                                         ^
src/engine/client/client.cpp:939:105: warning: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
[120/136] #1 c++ src/engine/client/graphics_threaded.cpp
[121/136] #1 c++ src/game/editor/popups.cpp
[122/136] #1 c++ src/game/editor/auto_map.cpp
[123/136] #1 c++ src/game/editor/layer_tiles.cpp
[124/136] #1 c++ src/game/editor/layer_game.cpp
[125/136] #1 c++ src/game/editor/editor.cpp
[126/136] #1 c++ src/game/editor/io.cpp
[127/136] #1 c++ src/game/editor/layer_quads.cpp
[128/136] #1 c src/engine/external/pnglite/pnglite.c
[129/136] #1 c src/engine/external/wavpack/wputils.c
[130/136] #1 c src/engine/external/wavpack/metadata.c
[131/136] #1 c src/engine/external/wavpack/float.c
[132/136] #1 c src/engine/external/wavpack/words.c
[133/136] #1 c src/engine/external/wavpack/bits.c
[134/136] #1 c src/engine/external/wavpack/unpack.c
[135/136] #1 link teeworlds_d
bam: error: a build step failed

8

Re: Can't compile Bam ?

dos.h is a windows file, most likely not available for linux.
Dunno about the other errors you got there, sorry.

9

Re: Can't compile Bam ?

This seems to be a modified version, the original does not use the header dos.h
https://github.com/Teetime/teeworlds/bl … ection.cpp

The other error at file #51 is weird though. Maybe it helps when you include base/vmath.h in wall.h but well... I have no idea, sorry.