Page 1 of 3

Linux user having trouble compiling

PostPosted: 28 Dec 2012, 22:06
by Daphron
So I've downloaded the repo but upon make I get this: http://pastebin.com/120aBr1p
(After commit 2472c98722)

Anyone have any suggestions on how to fix this? (If it's a work in progress type thing then could someone tell me the commit with the same code as the windows release?)

Re: Linux user having trouble compiling

PostPosted: 29 Dec 2012, 16:39
by qubodup

Re: Linux user having trouble compiling

PostPosted: 29 Dec 2012, 18:41
by Roots
What version of Lua do you have installed on your system? I believe that a new Lua version came out recently that isn't compatible with the latest Luabind version. Unfortunately, it seems that development of Luabind has been stalled (it's a somewhat troublesome library, which is why we include it's source and compile it in directly).

Re: Linux user having trouble compiling

PostPosted: 29 Dec 2012, 19:55
by Daphron
Lua version 5.2.1 (the latest).

Re: Linux user having trouble compiling

PostPosted: 29 Dec 2012, 20:49
by Roots
Well I did some searching and found this: http://lua.2524044.n2.nabble.com/Luabin ... 82662.html

Here's the information I learned:
- Lua 5.2.1 is a very recent release
- The latest official release of Luabind (what is contained with the VT repository) will not work with Lua 5.2.1
- The original developers of Luabind are AWOL
- Several people have forked the project and continued development on it, including some with 5.2.1 compatibility
- However, there is no official 5.2.1 supported release

We might have to just pull some unofficial code from one of these repositories in the Luabind github network: https://github.com/luabind/luabind/network , and put it in our own repository and hope it works. Supporting 5.2.1 right now seems a bit risky when there is no official, tested release...

Re: Linux user having trouble compiling

PostPosted: 30 Dec 2012, 01:59
by IkarusDowned
I think you're better off sticking with an older version of LUA that VT is stable with. otherwise we risk playing cat and mouse with releases and it can get realy messy.

Re: Linux user having trouble compiling

PostPosted: 30 Dec 2012, 02:20
by Bertram
Hi,

While using a newer not stable-considered lib, whatever it is, is unadvised, I do think the precise error seen here could be rather easily be fixed. And I'll fix it as soon as I've got the time to live test the compilation of VT on ArchLinux.

Regards,

Re: Linux user having trouble compiling

PostPosted: 31 Dec 2012, 22:49
by Daphron
Ok, just going to confirm that it is the new lua version. Using lua 5.1 works fine, thanks for the help.

Re: Linux user having trouble compiling

PostPosted: 01 Jan 2013, 05:36
by qubodup
An alternative would be to set lua to <5.2 in the cmake files.

Re: Linux user having trouble compiling

PostPosted: 01 Jan 2013, 20:43
by Bertram
qubodup {l Wrote}:An alternative would be to set lua to <5.2 in the cmake files.


Why not, but only as a temporary solution, since it wouldn't help you, right?

Re: Linux user having trouble compiling

PostPosted: 01 Jan 2013, 21:17
by Bertram
Re,

I will work toward being able to compile against the system lubaind for linux systems. I hope it will do the trick for you both.

Regards,

Re: Linux user having trouble compiling

PostPosted: 01 Jan 2013, 22:45
by qubodup
That's very kind.

Sometimes, I have the feeling that reporting bugs as an arch linux user makes developers waste time, trying to fix them. On the other hand, they might have to do it later anyway, when Debian etc. catch up. in this case, for example, somebody at debian would have probably would have found or made a replacement for the official luabind package, which would have saved some time for you.

Then again, reading this post might take more time than you will ever really uselessly waste on supporting arch linux... :)

A find of a ported luabind: http://lua.2524044.n2.nabble.com/Luabin ... 82662.html

Re: Linux user having trouble compiling

PostPosted: 02 Jan 2013, 15:22
by Bertram
Hi qubodup,

As told in github's issue #93: https://github.com/Bertram25/ValyriaTea ... t-11788182

Added the option: USE_SYSTEM_LUABIND in commit:
03c5337

Please test using:

cmake -DUSE_SYSTEM_LUABIND=on .

If it's working, I add that into the HEI-Release branch.

Regards,

Re: Linux user having trouble compiling

PostPosted: 02 Jan 2013, 21:37
by qubodup
On Arch Linux, there is no luabind package in the official repositories and the on in the user repository is flagged out of date. I built and installed it, building VT then throws the same error as mentioned above.

There is an official lua51 package in Arch Linux and I have it installed. There might be a way to request a list of all lua versions and demand that 5.1 is used...

Re: Linux user having trouble compiling

PostPosted: 02 Jan 2013, 23:08
by Bertram
It must be yes. I need to have a look at it. When installing lua 5.1, does it work for you?

Re: Linux user having trouble compiling

PostPosted: 03 Jan 2013, 04:16
by qubodup
I have both lua (5.2) and lua51 installed, it does not work.

Location of installed files: http://codepad.org/96yEifEl

Re: Linux user having trouble compiling

PostPosted: 03 Jan 2013, 08:56
by Bertram
Arg, then I definitely need to adapt the static luabind source for deprecated lua calls.

I'll have a look at the port.

Re: Linux user having trouble compiling

PostPosted: 03 Jan 2013, 21:42
by qubodup
softcoder, a cmake expert who did much work for MegaGlest, helped me out on irc.freenode.net#freegamer.

softcoder runs Ubuntu, which has also lua5.1 and lua5.2 installed. There, `cmake .` works just like that with current VT git.

On my box, the following command allowed me to build VT, while having lua5.2 and lua5.1 installed:

{l Code}: {l Select All Code}
cmake -DLUA_LIBRARIES=/usr/lib/liblua5.1.so -DLUA_INCLUDE_DIR=/usr/include/lua5.1/ .


Thanks softcoder!

Re: Linux user having trouble compiling

PostPosted: 04 Jan 2013, 01:39
by Bertram
Awesome. Thanks to him for taking the time to help :)

I hope you'll enjoy the end of this demo.

I'll still have a go at fixing the error people could have with luabind on lua 5.2 iteratively, for now at least.

Best regards,

Re: Linux user having trouble compiling

PostPosted: 04 Jan 2013, 02:20
by Bertram
I've pushed this:

https://github.com/Bertram25/ValyriaTea ... 7b096a86ff

Can you try and tell whether the error is evolving when compiling against lua 5.2?

Re: Linux user having trouble compiling

PostPosted: 04 Jan 2013, 02:41
by qubodup
Processing...
{l Code}: {l Select All Code}
git pull
rm CMakeCache.txt
make clean
cmake .
make -j 1 &> no.txt
curlpaste no.txt

http://codepad.org/09is9USu

Maybe the problem is that lua5.1 and 5.2 are being used at the same time... somehow? (uneducated guess).

EDIT: I always used master. I'm sorry, I am not too good with git. Was I supposed to switch to another branch?

Re: Linux user having trouble compiling

PostPosted: 04 Jan 2013, 03:21
by Bertram
Hmm, to me, it's the next logical error, eh.

Re: Linux user having trouble compiling

PostPosted: 04 Jan 2013, 11:58
by Bertram
Ahh!!!
How could I have missed that one:
Peter's commit were pushed in the 0.9 branch of luabind, adapting it for both lua 5.1 and 5.2:
https://github.com/luabind/luabind/commits/0.9

I'll import all that soon. :)

qubodup {l Wrote}:EDIT: I always used master. I'm sorry, I am not too good with git. Was I supposed to switch to another branch?

Np, use the master one.

Btw, you might want to make the arch linux maintainers aware of the 0.9 branch adaptation to lua 5.2.

regards,

Re: Linux user having trouble compiling

PostPosted: 05 Jan 2013, 20:18
by Bertram
Hi,

I pushed all the adaptations used to port luabind to lua 5.2:
https://github.com/Bertram25/ValyriaTea ... 0d5c1dd7ec

Could you try it out?

Re: Linux user having trouble compiling

PostPosted: 07 Jan 2013, 18:04
by qubodup
Thank you,

{l Code}: {l Select All Code}
[  0%] Building CXX object src/CMakeFiles/valyriatear.dir/modes/boot/boot.cpp.o
In file included from /home/qubodup/src/git/ValyriaTear/src/modes/boot/boot.cpp:19:0:
/home/qubodup/src/git/ValyriaTear/src/engine/script/script_modify.h: In member function ‘void hoa_script::ModifyScriptDescriptor::_ModifyData(const string&, T)’:
/home/qubodup/src/git/ValyriaTear/src/engine/script/script_modify.h:243:66: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope
/home/qubodup/src/git/ValyriaTear/src/engine/script/script_modify.h: In member function ‘void hoa_script::ModifyScriptDescriptor::_AddNewData(const string&, T)’:
/home/qubodup/src/git/ValyriaTear/src/engine/script/script_modify.h:321:66: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope
In file included from /home/qubodup/src/git/ValyriaTear/src/common/global/global.h:37:0,
                 from /home/qubodup/src/git/ValyriaTear/src/modes/menu/menu_views.h:25,
                 from /home/qubodup/src/git/ValyriaTear/src/modes/boot/boot.h:26,
                 from /home/qubodup/src/git/ValyriaTear/src/modes/boot/boot.cpp:16:
/home/qubodup/src/git/ValyriaTear/src/modes/map/map_utils.h: At global scope:
/home/qubodup/src/git/ValyriaTear/src/modes/map/map_utils.h:50:14: warning: ‘hoa_map::private_map::HALF_TILES_ON_X_AXIS’ defined but not used [-Wunused-variable]
/home/qubodup/src/git/ValyriaTear/src/modes/map/map_utils.h:51:14: warning: ‘hoa_map::private_map::HALF_TILES_ON_Y_AXIS’ defined but not used [-Wunused-variable]
make[2]: *** [src/CMakeFiles/valyriatear.dir/modes/boot/boot.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/valyriatear.dir/all] Error 2
make: *** [all] Error 2