Hello, we apologize but forum registrations are non-functional at this time. This issue should be fixed around mid-December. Until then, please stop by our Discord channel if you'd like to get in touch with the team. Thanks!

A couple early issues

For those having trouble installing/running the game or to report a bug

Moderator: Staff

Post Reply
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

A couple early issues

Post by Roots » Sun May 08, 2005 10:35 pm

I wanted to document some...complications with the code that we've had recently (it's not really our fault though :angel: ).


1) GNU/Linux Debian and Lua5.0
Lua5.0 and Lua4.0 are radically different, and they don't mix well together on the same system. To mitigate this, Debian (and Debian branch distributions) install Lua5.0 and Lua4.0 into different directories with different file names. Using the current Allacrost Makefile, the game won't find the appropriate lua libraries it needs to compile the game unless you create the following symbolic links:

Code: Select all

# in /usr/include
lrwxrwxrwx  1 root root    5 2005-05-06 18:38 lua -> lua50
lrwxrwxrwx  1 root root   11 2005-05-06 18:42 lua.h -> lua50/lua.h
lrwxrwxrwx  1 root root   14 2005-05-06 18:42 lualib.h -> lua50/lualib.h

# in /usr/share/lib
lrwxrwxrwx  1 root root     10 2005-05-06 18:35 liblua.a -> liblua50.a
lrwxrwxrwx  1 root root     13 2005-05-06 18:37 liblualib.a -> liblualib50.a
lrwxrwxrwx  1 root root     14 2005-05-06 18:37 liblualib.so -> liblualib50.so
lrwxrwxrwx  1 root root     11 2005-05-06 18:36 liblua.so -> liblua50.so


It's very likely we'll put a workaround to this issue in our Makefile when we do an official release so you don't have to create these symbolic links yourself.



2) GNU/Linux and nVidia graphics drivers

It was recently discovered that on Debian/Ubuntu if you don't have the package "nvidia-glx-dev" installed, Allacrost will compile but when you run the game you'll get a segmentation fault. We don't know exactly why this issue exists, but it is easy to fix at least. Other GNU/Linux distributions might need to take similar actions if experiencing this problem.
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Wed Jun 16, 2004 9:03 pm
Location: Hermosa Beach, CA
Contact:

Re: A couple early issues

Post by gorzuate » Wed Mar 08, 2006 8:11 pm

Roots wrote:1) GNU/Linux Debian and Lua5.0
Lua5.0 and Lua4.0 are radically different, and they don't mix well together on the same system. To mitigate this, Debian (and Debian branch distributions) install Lua5.0 and Lua4.0 into different directories with different file names. Using the current Allacrost Makefile, the game won't find the appropriate lua libraries it needs to compile the game unless you create the following symbolic links:

Code: Select all

# in /usr/include
lrwxrwxrwx  1 root root    5 2005-05-06 18:38 lua -> lua50
lrwxrwxrwx  1 root root   11 2005-05-06 18:42 lua.h -> lua50/lua.h
lrwxrwxrwx  1 root root   14 2005-05-06 18:42 lualib.h -> lua50/lualib.h

# in /usr/share/lib
lrwxrwxrwx  1 root root     10 2005-05-06 18:35 liblua.a -> liblua50.a
lrwxrwxrwx  1 root root     13 2005-05-06 18:37 liblualib.a -> liblualib50.a
lrwxrwxrwx  1 root root     14 2005-05-06 18:37 liblualib.so -> liblualib50.so
lrwxrwxrwx  1 root root     11 2005-05-06 18:36 liblua.so -> liblua50.so


It's very likely we'll put a workaround to this issue in our Makefile when we do an official release so you don't have to create these symbolic links yourself.


I think I have a fix for this but I can't really test it out since I don't have a Debian system. So those that do, please give this a try and let me know.

You may have noticed in our repository a file called config.h.in. You may have also noticed that after running ./configure a file called config.h is produced. We must #include this file into our source code (I put it in defs.h). Then any file that #includes lua.h or other lua headers we must make the following changes:

Code: Select all

#include "defs.h"

#ifdef HAVE_LIBLUA
extern "C" {
    #include <lua.h>
}
#else
extern "C" {
    #include <lua50/lua.h>
}
#endif

#ifdef HAVE_LIBLUALIB
extern "C" {
    #include <lauxlib.h>
    #include <lualib.h>
}
#else
extern "C" {
    #include <lua50/lauxlib.h>
    #include <lua50/lualib.h>
}
#endif


I guess it is not necessary to #include config.h into defs.h, we could just substitute it into the above code snippet. However config.h contains values that may be nice to have elsewhere in the code, so it might be nice to just #include it "globally".
Image
ettin
Junior Member
Posts: 45
Joined: Thu Aug 31, 2006 3:23 pm

Re: A couple early issues

Post by ettin » Fri Sep 01, 2006 5:37 pm

Roots wrote:It's very likely we'll put a workaround to this issue in our Makefile when we do an official release so you don't have to create these symbolic links yourself.
Here is a simple fix:

Code: Select all

--- configure.ac  (revision 367)
+++ configure.ac  (working copy)
@@ -88,6 +88,12 @@
 #AC_CHECK_LIB([vorbisfile], [ov_open], [], \
 # [echo "You should install the ALUT library for maximum performance."])

+AC_PATH_PROGS([LUA_CONFIG], [lua-config])
+if test "x$LUA_CONFIG" != "xnone"; then
+  LUA_CFLAGS=`$LUA_CONFIG --include`
+  CXXFLAGS="$LUA_CFLAGS $CXXFLAGS"
+fi
+
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([stdlib.h string.h])
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Post by Roots » Fri Sep 01, 2006 5:55 pm

Thanks! :approve:
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Wed Jun 16, 2004 9:03 pm
Location: Hermosa Beach, CA
Contact:

Post by gorzuate » Fri Sep 01, 2006 6:47 pm

Yeah, thanks, I've implemented that now so no more links should be necessary.
Image
Post Reply