Moderators: seebs, franciscotufro
$ sudo apt-get install wine
http://www.microsoft.com/downl.....layLang=en
$ wine vcredist_x86.exe
$ pwd
/home/pengo/.wine/drive_c/Program Files/Moai SDK/samples/WolfToss/lua
$ wine ../host-windows/moai.exe "config-all.lua" "config-windows.lua" "main.lua"
Cheers
src = ( void* )(( u32 )src + 2 );
So that's where I'm at, currently.
I've also tried to remove the assertion instead and let u32 just be 64-bit, but when I try to run one of the examples I just get an empty window (not even painted once) with 100% CPU usage.
Update:
I've just tried it on a virtual 32-bit Ubuntu machine, where I discovered I had forgotten to compile and link to expat (which had somehow just worked on my Arch Linux machine). I also documented the dependencies I needed to install.
On that machine images are showing up fine, but all samples seem to be just paused. Maybe something is missing regarding the timing.
I've amended my commit with the additional fixes and documentation (link above updated).
pengo@toughbook:~/moai-beta$ make
/usr/bin/g++ -Isrc vs2010/moai/main.cpp
-Lsrc/aku -laku
-Lsrc/moaicore -lmoaicore
-Lsrc/uslsext -luslsext
-Lsrc/uslscore -luslscore
-L3rdparty/lua-5.1.3/lib -llua
-L3rdparty/box2d-2.1.2/Box2D/Build/Box2D -lBox2D
-L3rdparty/chipmunk-5.3.4/src -lchipmunk
-L3rdparty/contrib -lutf8
-lpthread -lglut -lGLEW -lssl -lcurl -lpng -lfreetype -lexpat -ltinyxml
-o moai
pengo@toughbook:~/moai-beta$ ./moai
moai: uslscore.cpp:23: void _typeCheck(): Assertion `sizeof ( u32 ) == 4' failed.
Aborted
I tried changing the u32 definition in uslscore/pch.h from a long to an int and recompiling, but then I get a problem in USLuaObject.cpp:
USLuaObject.cpp:54: error: cast from ‘USLuaObject*’ to ‘u32’ loses precision
I noticed there's a lot of 32-bit pointer arithmetic using u32 and the TODO in the code:
void USLuaObject::DebugDump () {
// TODO: fix for 64 bit
printf ( "0x%08X <%s> %s", ( uint )(( u32 )this ), this->TypeName (), this->ToString ().c_str ());
So I was going to try and redo the whole thing under 32-bit Linux …
Cheers
pengo@xubuntu:~/moai-beta/samples/hello-moai$ pwd
/home/pengo/moai-beta/samples/hello-moai
pengo@xubuntu:~/moai-beta/samples/hello-moai$ moai ../config/config.lua main.lua
The result of the command above is a window with an image of a cat.
However, I'm unable to get some of the interaction / animation / gfx samples to do much more than show the same static cat image.
Currently the only packages compiled in the 3rdparty directory are the ones below; the rest are native Ubuntu libraries.
$ cd samples/basic
$ for i in *; do echo $i; pushd $i; moai ../../config/config.lua main.lua ; popd; done
The following directories caused a segfault for the same minor "TTF" vs "ttf" case sensitivity issue you found in the font-ttf directory:
pengo@toughbook:~/moai-beta/samples/basics/util-xml$ moai ../../config/config.lua main.lua
*** glibc detected *** moai: free(): invalid pointer: 0x0000000000919208 ***
======= Backtrace: =========
/lib/libc.so.6(+0x774b6)[0x7fd9c18d54b6]
/lib/libc.so.6(cfree+0x73)[0x7fd9c18dbc83]
/usr/lib/libstdc++.so.6(_ZNSsD1Ev+0x39)[0x7fd9c2117049]
moai(_ZN13TiXmlDocumentD1Ev+0x2a)[0x536baa]
moai(_ZN13MOAIXmlParser10_parseFileEP9lua_State+0x10f)[0x58b94f]
/usr/lib/liblua5.1.so.0(+0xcbc1)[0x7fd9c2c14bc1]
/usr/lib/liblua5.1.so.0(+0x17959)[0x7fd9c2c1f959]
/usr/lib/liblua5.1.so.0(+0xd08d)[0x7fd9c2c1508d]
/usr/lib/liblua5.1.so.0(lua_call+0x26)[0x7fd9c2c10396]
moai(_ZN10USLuaState9DebugCallEii+0x2a)[0x64edfc]
moai(_ZN7MOAISim7RunFileEPKc+0xc7)[0x56da2d]
moai(_Z12AKURunScriptPKc+0x20)[0x4fb2cc]
moai(_Z7AKUGlutiPPc+0x10b)[0x4faa05]
moai(main+0x20)[0x4fa5e4]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7fd9c187cd8e]
moai[0x4fa509]
======= Memory map: ========
00400000-0070b000 r-xp 00000000 08:01 787277 /usr/local/bin/moai
0090b000-0090c000 r--p 0030b000 08:01 787277 /usr/local/bin/moai
0090c000-0090d000 rw-p 0030c000 08:01 787277 /usr/local/bin/moai
0090d000-0091a000 rw-p 00000000 00:00 0
01937000-019e0000 rw-p 00000000 00:00 0 [heap]
7fd9b8000000-7fd9b8021000 rw-p 00000000 00:00 0
7fd9b8021000-7fd9bc000000 ---p 00000000 00:00 0
7fd9bccb7000-7fd9bccba000 r-xp 00000000 08:01 523350 /lib/libgpg-error.so.0.4.0
7fd9bccba000-7fd9bceb9000 ---p 00003000 08:01 523350 /lib/libgpg-error.so.0.4.0
7fd9bceb9000-7fd9bceba000 r--p 00002000 08:01 523350 /lib/libgpg-error.so.0.4.0
7fd9bceba000-7fd9bcebb000 rw-p 00003000 08:01 523350 /lib/libgpg-error.so.0.4.0
7fd9bcebb000-7fd9bcebe000 r-xp 00000000 08:01 530927 /lib/libuuid.so.1.3.0
7fd9bcebe000-7fd9bd0be000 ---p 00003000 08:01 530927 /lib/libuuid.so.1.3.0
7fd9bd0be000-7fd9bd0bf000 r--p 00003000 08:01 530927 /lib/libuuid.so.1.3.0
7fd9bd0bf000-7fd9bd0c0000 rw-p 00004000 08:01 530927 /lib/libuuid.so.1.3.0
7fd9bd0c0000-7fd9bd0c5000 r-xp 00000000 08:01 657819 /usr/lib/libXdmcp.so.6.0.0
7fd9bd0c5000-7fd9bd2c4000 ---p 00005000 08:01 657819 /usr/lib/libXdmcp.so.6.0.0
7fd9bd2c4000-7fd9bd2c5000 r--p 00004000 08:01 657819 /usr/lib/libXdmcp.so.6.0.0
7fd9bd2c5000-7fd9bd2c6000 rw-p 00005000 08:01 657819 /usr/lib/libXdmcp.so.6.0.0
7fd9bd2c6000-7fd9bd2c8000 r-xp 00000000 08:01 657808 /usr/lib/libXau.so.6.0.0
7fd9bd2c8000-7fd9bd4c7000 ---p 00002000 08:01 657808 /usr/lib/libXau.so.6.0.0
7fd9bd4c7000-7fd9bd4c8000 r--p 00001000 08:01 657808 /usr/lib/libXau.so.6.0.0
7fd9bd4c8000-7fd9bd4c9000 rw-p 00002000 08:01 657808 /usr/lib/libXau.so.6.0.0
7fd9bd4c9000-7fd9bd53d000 r-xp 00000000 08:01 523346 /lib/libgcrypt.so.11.5.3
7fd9bd53d000-7fd9bd73d000 ---p 00074000 08:01 523346 /lib/libgcrypt.so.11.5.3
7fd9bd73d000-7fd9bd73e000 r--p 00074000 08:01 523346 /lib/libgcrypt.so.11.5.3
7fd9bd73e000-7fd9bd741000 rw-p 00075000 08:01 523346 /lib/libgcrypt.so.11.5.3
7fd9bd741000-7fd9bd751000 r-xp 00000000 08:01 658672 /usr/lib/libtasn1.so.3.1.9
7fd9bd751000-7fd9bd950000 ---p 00010000 08:01 658672 /usr/lib/libtasn1.so.3.1.9
7fd9bd950000-7fd9bd951000 r--p 0000f000 08:01 658672 /usr/lib/libtasn1.so.3.1.9
7fd9bd951000-7fd9bd952000 rw-p 00010000 08:01 658672 /usr/lib/libtasn1.so.3.1.9
7fd9bd952000-7fd9bd969000 r-xp 00000000 08:01 657779 /usr/lib/libICE.so.6.3.0
7fd9bd969000-7fd9bdb68000 ---p 00017000 08:01 657779 /usr/lib/libICE.so.6.3.0
7fd9bdb68000-7fd9bdb69000 r--p 00016000 08:01 657779 /usr/lib/libICE.so.6.3.0
7fd9bdb69000-7fd9bdb6a000 rw-p 00017000 08:01 657779 /usr/lib/libICE.so.6.3.0
7fd9bdb6a000-7fd9bdb6d000 rw-p 00000000 00:00 0
7fd9bdb6d000-7fd9bdb75000 r-xp 00000000 08:01 657800 /usr/lib/libSM.so.6.0.1
7fd9bdb75000-7fd9bdd74000 ---p 00008000 08:01 657800 /usr/lib/libSM.so.6.0.1
7fd9bdd74000-7fd9bdd75000 r--p 00007000 08:01 657800 /usr/lib/libSM.so.6.0.1
7fd9bdd75000-7fd9bdd76000 rw-p 00008000 08:01 657800 /usr/lib/libSM.so.6.0.1
7fd9bdd76000-7fd9bdd91000 r-xp 00000000 08:01 658769 /usr/lib/libxcb.so.1.1.0
7fd9bdd91000-7fd9bdf91000 ---p 0001b000 08:01 658769 /usr/lib/libxcb.so.1.1.0
7fd9bdf91000-7fd9bdf92000 r--p 0001b000 08:01 658769 /usr/lib/libxcb.so.1.1.0
7fd9bdf92000-7fd9bdf93000 rw-p 0001c000 08:01 658769 /usr/lib/libxcb.so.1.1.0
7fd9bdf93000-7fd9bdf95000 r-xp 00000000 08:01 523358 /lib/libkeyutils.so.1.3
7fd9bdf95000-7fd9be194000 ---p 00002000 08:01 523358 /lib/libkeyutils.so.1.3
7fd9be194000-7fd9be195000 r--p 00001000 08:01 523358 /lib/libkeyutils.so.1.3
7fd9be195000-7fd9be196000 rw-p 00002000 08:01 523358 /lib/libkeyutils.so.1.3
7fd9be196000-7fd9be19d000 r-xp 00000000 08:01 655750 /usr/lib/libkrb5support.so.0.1
7fd9be19d000-7fd9be39c000 ---p 00007000 08:01 655750 /usr/lib/libkrb5support.so.0.1
7fd9be39c000-7fd9be39d000 r--p 00006000 08:01 655750 /usr/lib/libkrb5support.so.0.1
7fd9be39d000-7fd9be39e000 rw-p 00007000 08:01 655750 /usr/lib/libkrb5support.so.0.1
7fd9be39e000-7fd9be3a1000 r-xp 00000000 08:01 523317 /lib/libcom_err.so.2.1
7fd9be3a1000-7fd9be5a0000 ---p 00003000 08:01 523317 /lib/libcom_err.so.2.1
7fd9be5a0000-7fd9be5a1000 r--p 00002000 08:01 523317 /lib/libcom_err.so.2.1
7fd9be5a1000-7fd9be5a2000 rw-p 00003000 08:01 523317 /lib/libcom_err.so.2.1
7fd9be5a2000-7fd9be5c6000 r-xp 00000000 08:01 654526 /usr/lib/libk5crypto.so.3.1
7fd9be5c6000-7fd9be7c6000 ---p 00024000 08:01 654526 /usr/lib/libk5crypto.so.3.1
7fd9be7c6000-7fd9be7c7000 r--p 00024000 08:01 654526 /usr/lib/libk5crypto.so.3.1
7fd9be7c7000-7fd9be7c8000 rw-p 00025000 08:01 654526 /usr/lib/libk5crypto.so.3.1
7fd9be7c8000-7fd9be881000 r-xp 00000000 08:01 655429 /usr/lib/libkrb5.so.3.3
7fd9be881000-7fd9bea80000 ---p 000b9000 08:01 655429 /usr/lib/libkrb5.so.3.3
7fd9bea80000-7fd9bea89000 r--p 000b8000 08:01 655429 /usr/lib/libkrb5.so.3.3
7fd9bea89000-7fd9bea8a000 rw-p 000c1000 08:01 655429 /usr/lib/libkrb5.so.3.3
7fd9bea8a000-7fd9beb25000 r-xp 00000000 08:01 658192 /usr/lib/libgnutls.so.26.14.12
7fd9beb25000-7fd9bed25000 ---p 0009b000 08:01 658192 /usr/lib/libgnutls.so.26.14.12
Aborted
I'll run the same tests on my 32-bit VM next. Cheers
pengo@toughbook:~/WolfToss/lua$ moai config-all.lua config-windows.lua main.lua
res: using new "spritedeck.backgroundForest"
rig-background-forest.lua:74: attempt to call method 'setFrameSource' (a nil value)
stack traceback:
rig-background-forest.lua:74: in main chunk
(tail call): ?
(tail call): ?
level-forest.lua:7: in main chunk
(tail call): ?
level-001.lua:18: in main chunk
(tail call): ?
scene-gameplay.lua:70: in main chunk
(tail call): ?
(tail call): ?
main.lua:140: in function
I believe this is not a problem with the Linux port of moai; I believe WolfToss was compiled with an older version of Moai SDK and is making a call to the presumably deprecated method setFrameSource(). I see setFrameSource in the moai DLL that came with WolfToss, but I see no setFrameSource in the current git source tree.
UPDATE: Simply commenting out the calls to setFrameSource() in the files below let me run WolfToss natively under 64-bit Linux
Users browsing this forum: No registered users and 2 guests