iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

Compiling issues on Linux #131

Closed MajorLunaC closed 9 years ago

MajorLunaC commented 9 years ago

I'll advertise this game as soon as I can actually get it to work. I keep getting more and more errors as I keep trying again and again with small changes. This is using Cmake.

*Here are some solutions I managed to find so far:

In /iceball-master/include/common.h

TO

include <SDL/SDL.h>

TO

include <../xlibinc/sackit.h>

Ideally, put a copy of sackit in iceball to compile just before the rest of iceball source.

*Linker flags are a total mess. To fix just some of them, I had to manually add the following:

-lGLEW -lGL -lm -ldl -fopenmp -libpng -lenet

I think the -libpng might need a version number with it though. And I still get errors everywhere, which makes me question, is this game 32-bit only? Nowhere along the way during compiling or anywhere here does it mention it if so. And it would really suck.

More of the errors if anyone is interested: http://pastebin.com/kSWdh76k

*I also tried with the original Makefile (which is overwritten by cmake if running cmake . ) which has most of those linker flags, but I don't think it can find lua:

No package 'lua-5.1' found Package lua5.1 was not found in the pkg-config search path. Perhaps you should add the directory containing lua5.1.pc' to the PKG_CONFIG_PATH environment variable undefined reference tolua_createtable'

I have lua 5.1 in /usr/lib64 , and I even made an extra link ( ln /usr/lib64/liblua-5.1.so /usr/lib64/liblua5.1.so ) which is known to cause problems if missing.

iamgreaser commented 9 years ago

For the include changes: FUCK NO. HELL FUCKING NO. CHANGE THOSE BACK.

CMake was for learn_more's personal MSVC Win32 builds. Don't use that. Use make.

If it complains about lua-5.1 AND lua5.1 missing then it can't find it. I'm just doing pkg-config twice for the cflags and libs, because Debian likes to do things one way and FreeBSD likes to do it another way.

We don't use libpng, we use a custom PNG loader that relies on zlib, plus even if we did you'd do -lpng, not -libpng.

The software renderer is not actually available from 0.1.2-11 onwards.

If it's still failing, give a pastebin of your make output.

MajorLunaC commented 9 years ago

All right, but it continues despite not finding lua (should have stopped there), so every single function call: http://pastebin.com/SJas2E1B

Yeah, and please warn somewhere about using make and not CMake for Linux.

iamgreaser commented 9 years ago

OK, that's genuinely not finding Lua.

Look in these places for something that looks a little bit like a thing for Lua 5.1:

Let me know the filename and I'll add it to the list.

Alternatively you could modify the Makefile to point to the right place w/o going via pkg-config, but I'd prefer it if you could actually find some pkg-config file to use.

MajorLunaC commented 9 years ago

lua.pc in /usr/lib64/pkgconfig/

rakiru commented 9 years ago

All mention of CMake was removed from the README.txt because it's outdated. That's why it only mentions the Makefiles.

iamgreaser commented 9 years ago

I'll sort that case out once I have time.

iamgreaser commented 9 years ago

Should be sorted in 0.2.1 - if not, check the new findlua.sh and make it work.

(Note, I botched up the findlua.sh in the release, but it SHOULD still work with your case.)

MajorLunaC commented 9 years ago

Yup, it works now. Apart from not finding everything on the first attempt of run.sh with option 1) Single-player, it did manage to work with option 3) Lighting test, and then option 1 worked on the next run. First run of option 1) Single-player output: http://pastebin.com/azBPHz1r

rakiru commented 9 years ago

Oh yeah, the start scripts should probably be removed. They are there from before we had a launcher, and when the software renderer still existed.

iamgreaser commented 9 years ago

What rakiru said.

Anyway, problem solved, so closing!

nyovaya commented 8 years ago

I try to compile it too - but can someone tell me what installpath I should choose for sackit?

iamgreaser commented 8 years ago

After building sackit, copy libsackit.a and sackit.h to iceball/xlibinc/ (the directory should exist when you get Iceball from Git).

Don't worry if sackit spews errors, if libsackit.a exists, it built. (Running make for sackit will build the library and then a bunch of test programs which Iceball doesn't need.)