Author Topic: Lua problems on Debian Testing/Unstable  (Read 3184 times)

0 Members and 1 Guest are viewing this topic.

Lua problems on Debian Testing/Unstable
Hello. I was directed here by IssMneur of the #scp channel. I am having difficulty compiling the latest trunk on Linux(Debian Testing/Unstable combo). I attempted to build via instructions from the INSTALL file. autogen.sh/configure complained of a missing lua package, which led me to find out that lua has been changed slightly in Debian in a way that breaks fs2_open. Here is the build log:
http://pastebin.com/Ujqctnqp

Here is the chat log of #scp:
Code: [Select]
01:11 < megatog615> is current svn broken atm?
01:12 < IssMneur> it should build
01:13 < IssMneur> what error are you getting?
01:13 < megatog615> let me try again
01:17 < megatog615> http://pastebin.com/Ujqctnqp
01:19 < megatog615> after a fresh make clean
01:22 < IssMneur> what version of liblua and liblua-dev do you have installed?
01:22 < megatog615> 5.1.4
01:22 < megatog615> afaik
01:22 < megatog615> hold on
01:22 < megatog615> yup
01:23 < Nuke> what about lua
01:24 < Nuke> linux compile ?
01:24 < megatog615> yes
01:24 < Nuke> heh
01:24 < Nuke> im gonna go hide now, pretend i was never here
01:25 < IssMneur> does luaconf.h exist in your system includes?
01:31 < megatog615> /usr/include/lua5.1/luaconf.h
01:32 < IssMneur> does it include LUA_NUMBER_SCAN?
01:32 < megatog615> @@ LUA_NUMBER_SCAN is the format for reading numbers.
01:32 < megatog615> #define LUA_NUMBER_SCAN "%lf"
01:36 < IssMneur> are there any other luaconf.h?
01:36 < megatog615> nope
01:39 < Nuke> wasnt lua upped to version 5.2?
01:39 < Nuke> kinda recently
01:39 < megatog615> configure requires lua of 5.1.3 or better
01:39 < megatog615> and about that...
01:39 < megatog615> i had to apt-file search for lua.pc
01:39 < megatog615> and put it in pkg-config
01:39 < megatog615> to get it to continue
01:40 < megatog615> on debian i guess lua is a bit weird
01:40 < megatog615> by the way this means ubuntu as well
01:40 < Nuke> heh
01:40 < IssMneur> I have not had a problem compiling on ubuntu
01:40 < Nuke> everytime i try to use linux it eventually pisses me off and i format the drive
01:41 < IssMneur> I don't think the version has anything to do with it, because the only luaconf.h that is exists has the symbol in it, so somewhere g++ is finding a different luaconf.h that doesn't have the symbol in it
01:41 < Nuke> linux does make retriving libraries alot easier though
01:41 < Nuke> i spent most of the day looking for libraries to compile pcs2
01:41 < Nuke> it still aint compiled
01:42 < Nuke> always have to google a download and install it manually
01:42 < Nuke> i quit and looked at lolcats for 2 hours
01:44 < IssMneur> metatog615: what instructions where you following for building fs2_open?
01:44 < megatog615> INSTALL
01:44 < megatog615> i have compiled it before
01:44 < megatog615> recently i decided to play it again so i thought maybe i'd get the latest code too
01:45 < IssMneur> which source are you using? trunk? 3.6.10 branch? 3.6.12 branch?
01:47 < megatog615> trunk
02:02 < IssMneur> metatog615: seems you were right about the lua.pc file, it seems they have changed something since I have last built FSO on linux
02:03 < IssMneur> please post your build log, and a copy of this chat log on the cross-platform support forum at hlp
02:04 < IssMneur> as well as any other things you had to do to get fso to build, I will PM chief1983 with the link to your post
02:07 < megatog615> alright i will do that
02:08 < megatog615> thanks
02:08 < IssMneur> on a positive note, the 3.6.12 RC branch of the repo seems to compile correctly, it can be found at svn://svn.icculus.org/fs2open/branches/fs2_open_3_6_12
02:13 < IssMneur> confirmed, the 3.6.12 branch compiles correctly

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Lua problems on Debian Testing/Unstable
Are we sure it's liblua and not libpng related?  I imagine Debian unstable has 1.4 which still needs a fix on our end to work out of the box.  If newer Lua is breaking that's one more thing to fix though.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Lua problems on Debian Testing/Unstable
Are we sure it's liblua and not libpng related?  I imagine Debian unstable has 1.4 which still needs a fix on our end to work out of the box.  If newer Lua is breaking that's one more thing to fix though.
It seems to be specifically lua, though I am not entirely convinced that it is a version issue, based on the fact that luaconf.h is the header that should contain the missing symbol though, Megatog615 says that the only luaconf.h file that he can find does contain the missing symbol. Also note that there is no complaint about the header file being missing (that I noticed), so it is presumably finding the luaconf.h.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline marvn

  • 23
Re: Lua problems on Debian Testing/Unstable
do you have proper lua -dev pkgs?

 
Re: Lua problems on Debian Testing/Unstable
do you have proper lua -dev pkgs?
Yes.

 

Offline Kelner

  • 20
Re: Lua problems on Debian Testing/Unstable
I've bumped into this issue too and found out the following.
On Ubuntu 9.10, which AFAIK has the same lua packages (give or take some small changes) as Debian liblua5.1-dev which provides header files for lua 5.1.4 has it's pkg-config file named lua5.1.pc and no lua.pc
Simply changing check for lua into a check for lua5.1 in configure.in and rerunning autogen.sh makes configure work. I', making a build right now but it seems everything is ok.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Lua problems on Debian Testing/Unstable
Thanks Kelner. That was the answer I was searching for.  With that this patch should allow both the existing lua detection (that seems to be working on whatever linux taylor is using, as he was the one that added this check when we went to using the platform headers on linux) and the debian based linuxes.

Code: [Select]
Index: configure.ac
===================================================================
--- configure.ac (revision 6028)
+++ configure.ac (working copy)
@@ -397,7 +397,12 @@
 FS2_LDFLAGS=$FS2_LDFLAGS" $PNG_LIBS"
 
 dnl LUA
-PKG_CHECK_MODULES([LUA], [lua >= 5.1.3])
+## Checking for lua.pc and if that fails lua5.1.pc
+PKG_CHECK_MODULES(
+ [LUA],
+ [lua >= 5.1.3],
+ [], ## do nothing special
+ [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.3], [])])
 D_CFLAGS=$D_CFLAGS" $LUA_CFLAGS"
 FS2_LDFLAGS=$FS2_LDFLAGS" $LUA_LIBS"
« Last Edit: March 24, 2010, 03:00:33 pm by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments