Guild icon
Teeworlds
discord.gg/teeworlds / general
Teeworlds Discord Server.
Between 2024-11-23 00:00 and 2024-11-24 00:00
Avatar
Promoting virus
Avatar
Avatar
visitOP
krx is the best client 💯 💪 🔥
remove that message
03:33
bro
Avatar
yo, I was trying to compile server file from official 0.6.1 source code on linux with bam 0.4.0, but I encountered complications. In the documentation I found that Python 3.x is required/supported since 0.6.0, but I get python errors. I have Python 3.10 and 3.11 base and devel packages installed. Are those Python versions too new and not supported, or is the error somewhere else?
Avatar
sh: line 1: python: command not found
15:56
i think you need python 2
15:56
@WaRNe0nx3
Avatar
ok I tried it with python 2.7, and now there are just bam errors and warnings. here's the output without the warning:
16:06
@jxsl13
Avatar
what bam version you got
Avatar
0.4.0
16:08
I was checking the docs from 2012 with webarchive, they used 0.4.0
Avatar
I got a video from 8 years ago
16:11
but i was stupid and just pulled the master source if bam at that time
16:11
of*
16:12
looking at the dates of the tags
16:13
could be bam 0.5.0
16:13
but i compiled Teeworlds 0.6.3 in my video (edited)
Avatar
[string "src/base.lua"]:38: this file for version 0.4.x of bam. you are running 0.5.x. bam: script error (-t for more detail)
16:26
so it must be bam 0.4.x
16:27
the bam website and https://downloads.teeworlds.com/ only has 0.4.0, so i'm guessing it's the correct version for 0.6.x
Avatar
make sure that bam 0.4.0 is the only version installed and that your environment variables are correctly set to point to it, sometimes old versions can linger and cause conflicts
✅ 1
16:34
and i'd recommend trying Python 3.6 or 3.7, as they are more likely to be compatible with the build scripts from that era ?
Avatar
Avatar
WaRNe0nx3
ok I tried it with python 2.7, and now there are just bam errors and warnings. here's the output without the warning:
sdl not found, make sure you have it installed/bundled
17:03
:P
17:04
idk if bam halts only because it tries to find sdl
Avatar
it should not be required for server, but not only have I SDL installed, it's also in the source code in ./other/sdl/
17:05
idk why the output says it can't find it
Avatar
oh, its bam trying to execute python and fails because it uses python3 as default
17:06
but bam can use python2 only
17:07
error 256 means failed to execute
Avatar
are you sure? the first time I tried with only python310/311 installed, it stopped at [48/69] and had sh: line 1: python: command not found, bam 256, and bam 32512 errors. after installing python2.7 also, it only stopped at [68/69] and bam 256 errors so I think it's using python2 when the output changed, no?
Avatar
it needs to be python 2. pretty sure.
Avatar
export PATH=/path/to/python2.7/bin:$PATH ? (edited)
17:34
then run bam again
Avatar
did export PATH=/usr/bin:$PATH and ran bam again, still same output, all python versions are in /usr/bin (edited)
Avatar
Then run bam with verbose output to get more details on where it’s failing
18:11
./bam -v release
18:11
cuz idk
18:12
either explicitly set Python version in bam by modifying the bam build script to explicitly use python2.7, look for any scripts or makefiles in the bam directory and change python to python2.7 ig
18:13
either create a symlink named python that points to python2.7 in a directory that comes first in your path, this way, when bam calls python, it will use Python 2.7
Avatar
Avatar
visitOP
Then run bam with verbose output to get more details on where it’s failing
24.73 KB
Avatar
sry I didn't checked
Avatar
Avatar
visitOP
either create a symlink named python that points to python2.7 in a directory that comes first in your path, this way, when bam calls python, it will use Python 2.7
Have you tried it?
18:21
sudo ln -s /usr/bin/python2.7 /usr/local/bin/python export PATH=/usr/local/bin:$PATH
Avatar
I did now, output looks still the same
18:28
/usr/bin/python /usr/bin/python2 already link to 2.7, I just checked
18:29
so I think it was already using python2.7 (edited)
Avatar
double-check that the SDL development libraries are correctly installed and that bam can find them. You might need to install the SDL development package if it’s not already installed
18:32
use sudo apt-get install libsdl1.2-dev
Avatar
oh yeah and since bam is still not finding SDL, try manually specifying the SDL path in the bam configuration. Edit the configure.lua file or set the environment variable directly
18:35
with export SDL_CONFIG=/path/to/sdl-config ig
Avatar
why doesn't it find the sdl files that are in the source code
Avatar
And try to start fresh with ./bam clean ./bam release
Avatar
Avatar
WaRNe0nx3
why doesn't it find the sdl files that are in the source code
It might be an issue with how the paths are set up.
18:38
so make sure you have the SDL development package installed. On Debian-based systems, you can install it with: sudo apt-get install libsdl1.2-dev
Avatar
there is no libsdl1.2 dev package in my opensuse repos, can't I path to ./other/sdl somewhere? (edited)
18:45
ah i found it sdl12_compat-devel, now it finds sdl
18:46
doesn't seem like it changed more than the sdl check
24.72 KB
Avatar
Avatar
visitOP
And try to start fresh with ./bam clean ./bam release
bam: target 'clean' not found but I delete the created config.lua and .bam folder before rerunning ./bam-0.4.0/bam server_release
Avatar
Avatar
WaRNe0nx3
doesn't seem like it changed more than the sdl check
Then try to set the SDL environment variable to point directly to the SDL directory in your source code
18:56
To help it finding the right path
18:56
export SDL_CONFIG=/path/to/your/teeworlds/source/other/sdl/sdl-config
Avatar
Avatar
WaRNe0nx3
bam: target 'clean' not found but I delete the created config.lua and .bam folder before rerunning ./bam-0.4.0/bam server_release
that means bam doesn’t have a clean target defined for this project
Avatar
the provided sdl in the source only had header and lua files, but tried sdl_config.h and sdl.lua anyway, it still uses /usr/bin/sdl-config and same output with bam error 256
Avatar
as i said 256 means something fails to execute
19:55
hm, is there a way to log something when job is called
Avatar
is this more helpful? when I printed the output into a file, these got ignored, and it was cut-off in the console
Avatar
it looks like you’re running into a conflict with the round function due to multiple definitions (edited)
20:21
I really am not sure, but try to, in your src/base/math.h file, rename the custom round function to avoid conflicts with the standard library’s round function, for example, you can rename it to round_custom
🧠 1
20:22
then try rebuilding the project
Avatar
ok will try, but it's really the default source code from 0.6.1
20:26
bam: done (0:07) holy shit
Avatar
Avatar
visitOP
then try rebuilding the project
big brain, thank you very much
❤️ 1
Avatar
if ur not confortable modifying the code, u could try using GCC 4.8 or 4.9, which were common around that time
Avatar
Avatar
visitOP
then try rebuilding the project
./bam-0.4.0/bam server_release .
Avatar
oh I might've expressed myself ambiguous, I meant I was able to compile it after editing the math.h file like you said
Avatar
so it's fine ? 🙂 (edited)
Avatar
yes, thank you guys for your help
Avatar
Nice ! Have a good Night 😊
Avatar
GN8
Exported 83 message(s)
Timezone: UTC+0