FC5 and Lua

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

Moderator: Staff

Phobeus
Newbie
Posts: 3
Joined: Tue Oct 03, 2006 8:30 pm
Contact:

FC5 and Lua

Postby Phobeus » Tue Oct 03, 2006 8:35 pm

Hi,
I just saw your promising project and wants to give it a try. However, I was not able to manage to compile this game on fedora core 5. Configure complains about missing the lua dependencies, however lua should be installed on my system.

checking for lua_open in -llua50... no
checking for lua_open in -llua... no
Could not find the lua library. Check that it is properly installed on your system


rpm -qa | grep lua
lua-5.1-6.fc5
lua-devel-5.1-6.fc5


ls -la /usr/lib/liblua*
-rwxrwxr-x 1 root root 195824 3. Okt 18:39 /usr/lib/liblua5.1.a
-rwxr-xr-x 1 root root 168736 8. Jun 04:32 /usr/lib/liblua-5.1.so
-rwxrwxr-x 1 root root 155199 3. Okt 18:39 /usr/lib/liblua5.1.so
-rw-r--r-- 1 root root 238132 8. Jun 04:31 /usr/lib/liblua.a
lrwxrwxrwx 1 root root 13 3. Okt 18:45 /usr/lib/liblua.so -> liblua-5.1.so


I am even able to use the "lua" interpret. So anyone with an good idea, why configure is not able to detect the lua dependency?
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Postby Roots » Tue Oct 03, 2006 8:52 pm

Yes, the problem is you have Lua 5.1 installed, not Lua 5.0. Right now Allacrost uses Lua 5.0, but we'll be upgrading to Lua 5.1 eventually. From what I know, 5.1 is not backwards compatible with 5.0 (and 5.0 isn't backwards compatible with 4.0). It's a pain, we know. :bash:
Image
User avatar
visage
Former Staff
Posts: 711
Joined: Sat Sep 03, 2005 9:19 pm
Location: USA
Contact:

Postby visage » Wed Oct 04, 2006 12:28 am

Roots is correct. 5.1 has a lot of differences from 5.0, so for the release you will need 5.0 to build.
Phobeus
Newbie
Posts: 3
Joined: Tue Oct 03, 2006 8:30 pm
Contact:

Postby Phobeus » Wed Oct 04, 2006 11:18 am

Woo... not beeing backward compatible between major version? In fact that wasn't something I expected. I removed the lua 5.1 from system and did compile (shared linking) lua 5.0. Configure did detect it this time, however a few lines behind I get this message:
checking for luaopen_table in -llualib50... no
checking for luaopen_table in -llualib... yes
checking for log in -lm... yes
checking for lua-config... no
./configure: line 5468: --include: command not found
checking for dirent.h that defines DIR... yes


Might be important... we are optimistic beeing, aren't we? So I just hit a "make" into the console and got this:
make all-am
make[1]: Entering directory `/home/phobeus/temp/allacrost-0.1.0'
if g++ -DPACKAGE_NAME=\"Hero\ of\ Allacrost\ -\ Demo\" -DPACKAGE_TARNAME=\"allacrost\" -DPACKAGE_VERSION=\"0.1.0\" -DPACKAGE_STRING=\"Hero\ of\ Allacrost\ -\ Demo\ 0.1.0\" -DPACKAGE_BUGREPORT=\"gorzuate@allacrost.org\" -DPACKAGE=\"allacrost\" -DVERSION=\"0.1.0\" -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBPNG=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBSDL=1 -DHAVE_LIBSDL_MIXER=1 -DHAVE_LIBSDL_TTF=1 -DHAVE_LIBLUA=1 -DHAVE_LIBLUALIB=1 -DHAVE_LIBM=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DCLOSEDIR_VOID=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=0 -Dmalloc=rpl_malloc -DHAVE_ATEXIT=1 -DHAVE_MKDIR=1 -DHAVE_RMDIR=1 -DHAVE_SQRT=1 -DHAVE_STRCASECMP=1 -I. -I. -I/usr/include/SDL -I./src -I./src/engine -I./src/engine/audio -I./src/engine/video -I./src/modes -I./src/modes/battle -I./src/modes/boot -I./src/modes/map -I./src/modes/menu -Wall -O3 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o `test -f 'src/main.cpp' || echo './'`src/main.cpp; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstdlib:122: error: '::malloc' has not been declared
make[1]: *** [main.o] Error 1
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Postby gorzuate » Wed Oct 04, 2006 3:08 pm

From your compile line there I notice the flag "-DHAVE_MALLOC=0". It looks like configure is checking for malloc but not finding it. Can you post the message during configure about malloc please?

Maybe it's in a special location for FC5? :shrug:
Image
Phobeus
Newbie
Posts: 3
Joined: Tue Oct 03, 2006 8:30 pm
Contact:

Postby Phobeus » Wed Oct 04, 2006 3:32 pm

You are right. Looks like he does not find malloc during configure process. However, I am not familiar with autotools stuff itself.

./configure | grep malloc
./configure: line 5468: --include: command not found
checking for GNU libc compatible malloc... no

I am quite sure, I have a working libc on my system ;) A header file is avaible in /usr/include/malloc.h
Prototypes and definition for malloc implementation.
Copyright (C) 1996,97,99,2000,2002-2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.

So I guess, this is the file, he is missing. I tried also a ./configure --includedir=/usr/include, however it end up with the same result.
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Postby gorzuate » Wed Oct 04, 2006 11:45 pm

I'm stumped :(

Looks like our video engine is using malloc in some places. :eyebrow: We'll look into this.
Image
Guest

Postby Guest » Fri Jan 12, 2007 12:00 pm

I have seen that happen when there's a problem with some library, I think running ldconfig helped, or had something to do with library paths.. You'll find hints from config.log IIRC.

Return to “Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest