Closed cmarfil closed 9 years ago
Are you using the newest TFS? The error is saying that you are msising EOF, = add a new line at the end of luascript.cpp. Just checked the last commit there(mine) and there is a new line.
I think yes, I followed https://github.com/otland/forgottenserver/wiki/Compiling-on-Ubuntu
The same process on my mac with: https://github.com/otland/forgottenserver/wiki/Compiling-on-Mac-OS-X has ended successfully.
But on ubuntu server from DigitalOcean always return error like:
[ 33%] Building CXX object CMakeFiles/tfs.dir/src/game.cpp.o
{standard input}: Assembler messages:
{standard input}:11417: Warning: end of file not at end of a line; newline inserted
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
I'm a web developer but I'm not familiar with this environment, maybe i'm failing at something simple but in my mac has worked at first.
Thanks 4 reply @WibbenZ
Im not that experiences in C++ aswell, but trying to learn more Can you upload your luascript.cpp to paste-ots.me or some other paste site?
Edit: Aswell as luascript.h
How much RAM do you have? Are you using swap? Both files are quite heavy to crunch, maybe that's why GCC chokes and crashes.
Can you upload your luascript.cpp to paste-ots.me or some other paste site?
I can't download now from server but is last version of TFS
How much RAM do you have?
512MB, I can test droplet with more ram if is need.
Thanks.
Id say 512 is abit to low tbh, so try to increase it to 1-2gb and you will be fine even for starting and hosting it.
512 MiB of RAM is definitely too low to compile a Release build (even a x86 one) without swap (though adding swap is just going to be a waste of time). If you want to run the server on that 512 MiB droplet, you'll need to compile the server on an another machine and send the compiled executable there (you'll also need to make sure that libraries are at the same versions to avoid problems, preferably compile on a local Linux installation, or if you don't have one, use a virtual machine). You should also consider running an x86 install of Ubuntu - the OS is going to use less memory.
I have compiled successfully the release build several times on 512M machines without swap. Hardly ever there is a possibility of problems with cotire depending on the distro (Ubuntu is a lot more memory hungry than Arch, for example).
If possible, consider moving to a more lightweight distro for running on such a low memory space, I suggest the previously mentioned Arch Linux and CoreOS, but I can confirm it also works on Amazon Linux and Fedora. Just avoid Ubuntu.
You can also edit the CMakeLists to comment out the cotire stuff (line 10) and remove the -pipe
CXX flag (end of line 13) if you run into problems with those distros or you still want to use Ubuntu.
@djarek mentioned compiling the release build on another machine and copying to your server; DON'T do that as release build is configured with native optimizations and, if your computer and the server run different processors (and probably do, as I don't see many home computers running on Xeons and Opterons), it might run slower or even don't run at all. Learn about the -march
flag if you really want to try that.
Another possibility: you can try using Ninja as a build system instead of make. To do that, install Ninja (its package is called ninja-build
), run CMake with the flag -GNinja
, then run ninja
instead of make
. It is lighter and tends to be faster.
Guys, thanks 4 replies! I tested with a 2GB server instead of 512 and it worked perfect!!
Thanks!
Hello,
I frollowed the instructions for ubuntu and i get this error:
Machine: Ubuntu 14.04x64 fresh installation from DigitalOcean.
¿Any idea?
Thanks.