Yake - Community Forum
September 09, 2010, 04:16:42 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: News #2: Feel free to pester the members of the Community Support! Look out for blue stars! Smiley
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 5   Go Down
  Print  
Author Topic: Building yake on linux  (Read 31784 times)
cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #15 on: January 01, 2008, 02:08:58 PM »

ALERT: before moving hands read every thing in this thread.

check my site for an updated version. (compatible with ogre 1.4.6)
(as i have time i'll update even the yake.deb there and even add a ogre.deb)
Logged

cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #16 on: January 20, 2008, 10:51:15 PM »

testers?

i'm also searching a place to host files...
Logged

psyclonist
Administrator
Hero Member
*****
Gender: Male
Posts: 2811



View Profile WWW
« Reply #17 on: January 21, 2008, 05:39:35 PM »

testers?
It'll take me a few days before I can tackle this.

i'm also searching a place to host files...
How many files are we talking about? One or two? Then I suggest to use the forum attachments. If more, then we can talk about additional options on yake.org, if you like.
Logged
R3N3G4D3
Newbie
*
Posts: 11


View Profile
« Reply #18 on: January 27, 2008, 10:46:04 PM »

Hi,

trying to build Yake on Ubuntu myself as well. I tried doing it manually about a month ago but gave up after going through a dependency hell (spent a whole day looking for property_tree library, and after I found it was stuck with luabind -the version I found was incompatible with my Ubuntu version). After I did a fresh Ubuntu install and found your yake_inst.sh script I decided to give it another try. Thanks for the script, it really helped with dependencies, but right now I'm stuck with the same problem (object.hpp at line 723), the only difference is that for me neither make nor bjam can build luabind, both encountering that error. Are you sure you didn't install additional libraries before running bjam? I thought the Python libraries might have been incomplete, but they seem to be there when I check Synaptic.

My current installation is a fresh 32-bit install of Ubuntu 7.10, if that is of any use.

P.S. Your install script has some bugs in it that prevent the install unless fixed first (such as "cp" instead of "cp -r", cd to wrong directories, "s" instead of "y" for yes, mismatched if bracket, some missing dep packages, etc.). I have modified it to work (aside from object.hpp bug), and can send you the updated script if you want.
Logged
cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #19 on: January 28, 2008, 01:57:39 AM »

read in these thread there is my patch for luabind cvs, not tested but...

i like to have your patched script. please free to send any corrections.

PS "s" instead of "y", my bad, here is "si" not "yes" so it mislead to the error.
PS2: i suggest you to use checkinstall to install many packets in tar format -> less maintain work. I've some of them ready, but they are on testing fase, so...

Ps3: do you grab the script from my site or from here? (there is even a version 2 of it)
Logged

R3N3G4D3
Newbie
*
Posts: 11


View Profile
« Reply #20 on: January 29, 2008, 02:22:25 AM »

Thanks cdkeito, I misread your luabind fix the first time I read that post, I thought you were just showing the part of the file where the error occured, not how you fixed it. After that fix, and some more minor fixes to your script I got it to build yake for me, at least it seems to be building it. I noticed that yake has no GUI to test out that it works, and I can't find the runnable samples versionsthat the script compiled. I'm still getting the following error when building, I figured it was just one of the samples and decided it wasn't a big deal:
Code:
==== Building graphicsOgre ====
graphicsOgreEntity.cpp
graphicsOgreSkeleton.cpp
yakeGraphicsWorld.cpp
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp: In member function ‘virtual yake::graphics::IViewport* yake::graphics::ogre3d::GraphicalWorld::createViewport(yake::graphics::ICamera*)’:
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: expected type-specifier before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: expected `>' before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: expected `(' before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: ‘OGRE’ was not declared in this scope
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: expected primary-expression before ‘*’ token
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:195: error: expected primary-expression before ‘>’ token
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp: In member function ‘virtual yake::graphics::IEntity* yake::graphics::ogre3d::GraphicalWorld::pickEntity(const yake::math::Ray&)’:
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: expected type-specifier before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: expected `>' before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: expected `(' before ‘OGRE’
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: ‘OGRE’ was not declared in this scope
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: expected primary-expression before ‘*’ token
../../src/plugins/graphicsOgre/yakeGraphicsWorld.cpp:393: error: expected primary-expression before ‘>’ token
make[1]: *** [../../common/obj/graphicsOgre/Debug/yakeGraphicsWorld.o] Error 1
make: *** [graphicsOgre] Error 2

Also, I used the revision 1 of the script from your website (I didn't know the forums had a copy of it too), I didn't use revision 2 since it seems to be for amd64. My Ubuntu installation is i386, and if I installed 64-bit it would probably be x86_64 since I use Q6600. The edited script should now run on any Gutsy without problems, and probably other versions of Ubuntu too. I also added a command into the script to automatically fix luabind. The forum won't let me attach the script to his message, I can email it if you want.
Logged
R3N3G4D3
Newbie
*
Posts: 11


View Profile
« Reply #21 on: January 29, 2008, 04:57:46 AM »

cdkeito, I fixed the graphicsOgre problem, it was happening because you used /[INCLUDE,include]/ as a match string in sed instead of /INCLUDE\|include/, which told sed to replace any line that contains "<Ogre" and a combination of I,N,C,L,U,D, or E and i,n,c,l,u,d, or e on the same line instead of "include" and "<Ogre" on the same line. For most of the cases this worked, since usually the only place satisfying these is in a .cpp file is the "include" line, in yakeGraphicsWorld.cpp however, line 195 happened to do a typecast to an object whose name starts with Ogre while also matching the other givens, and sed happily replaced the typecast with "<OGRE/Ogre...". Here is what it matched as far as I understand:

return new OgreViewport( msCore, static_cast<OgreCamera*>( pCamera ) );

(The "e" part was matched from include, the "C" part was matched from INCLUDE, and the rest is on sed's "to be replaced" list
Logged
cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #22 on: January 29, 2008, 04:05:46 PM »

thanks for the bugs hunting!
i could really help the corrected script, you can send me by email or bye sendspace linking.

sorry, i didn't tested samples, the scope was only after pure yake. For the "include", that was a great mistake from me, thank you very much!

PS: perhaps, it could help adding a section to compile freeimage for ogre enabling only what you need and not all 10MB of it (-1.5MB to ogre).

as as soon i'll get it, i'll double check your corrections. V2 is only for pure testing.
Logged

cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #23 on: January 29, 2008, 05:27:38 PM »

now, i'm seeking for a machine to run a debian and a fedora distros, so i can check compatibility.
perhaps i'll go after a vmware solution.
Logged

R3N3G4D3
Newbie
*
Posts: 11


View Profile
« Reply #24 on: January 29, 2008, 10:01:53 PM »

Alright, as soon as I test that it installs correctly on my machine with all the changes, I will send you updated script. Right now I'm getting what seems to be a lua linking error. At first I was getting this:
Code:
==== Building sampleEntFsm ====
demo.cpp
Linking sampleEntFsm
/usr/bin/ld: cannot find -llua
collect2: ld returned 1 exit status
make[1]: *** [../../samples/bin/../../samples/bin/debug/sampleEntFsm_d] Error 1
make: *** [sampleEntFsm] Error 2
So I did "sudo ln -s /usr/lib/liblua5.1.a /usr/lib/liblua.a" and now the error is:
Code:
==== Building sampleEntFsm ====
demo.cpp
Linking sampleEntFsm
../../common/obj/sampleEntFsm/Debug/demo.o: In function `luabind::detail::getref(lua_State*, int)':
/usr/include/luabind/detail/ref.hpp:52: undefined reference to `lua_rawgeti(lua_State*, int, int)'
../../common/obj/sampleEntFsm/Debug/demo.o: In function `void luabind::detail::pointer_converter<luabind::detail::cpp_to_lua>::apply<yake::ent::Object>(lua_State*, yake::ent::Object*)':
/usr/include/luabind/detail/policy.hpp:479: undefined reference to `lua_pushnil(lua_State*)'
...
Maybe I created symlink to wrong library? I'll see if I can figure this out tonight
Logged
cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #25 on: January 29, 2008, 11:21:47 PM »

default (and it's very insistent) ubuntu want to install the old lua. and when you remove a packet, remove also another.

check if you have the lua52 in /usr/lib/ and a link to it

sorry, now i don't have time to compile myself the samples, sorry.
Logged

cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #26 on: January 29, 2008, 11:23:52 PM »

another thing you had to read in the thread is that i couldn't compile a yake module about cegui, but that it's not a problem, because only a set of people use cegui. i've made so the script patch to no build it.
Logged

R3N3G4D3
Newbie
*
Posts: 11


View Profile
« Reply #27 on: January 30, 2008, 05:19:36 AM »

I assume you mean lua5.1, not 5.2 since your script installs 5.1. That didn't help, I completely removed lua and all lua libraries and reintalled just 5.1, same result. I went digging further into the error, I narrowed it down to luabind building to the errors I show later in this post, but these errors just don't seem to go away, I think I'm hitting a brick wall. Ironically, while trying to solve this issue, I solved the one you mentioned on previous page about "make" not working on luabind, and having to use "bjam". Try making symbolic link from liblualib.a to liblualib50.a in /usr/lib/, that should fix it (one thing that still confuses me is that liblualib50 does not exist as liblualib5.1 but can work with either liblua5.1 or liblua50 according to synaptic but prefers liblua50, although now it uses liblua5.1 on my pc). Anyway, when I use "make" on luabind, I get a bunch of errors looking like this:
Code:
cd src; make all
make[1]: Entering directory `/home/alex/yake/luabind/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/alex/yake/luabind/src'
cd test; make all
make[1]: Entering directory `/home/alex/yake/luabind/test'
g++ -Wall -ftemplate-depth-100 -g  -I/usr/include/lua5.1/include -I. -I- -I../ -I/usr/include/boost -c test_abstract_base.cpp -o test_abstract_base.o
cc1plus: note: obsolete option -I- used, please use -iquote instead
g++ -Wall -ftemplate-depth-100 -g  -I/usr/include/lua5.1/include -I. -I- -I../ -I/usr/include/boost -c main.cpp -o main.o
cc1plus: note: obsolete option -I- used, please use -iquote instead
g++ test_abstract_base.o main.o -o test_abstract_base.exe -g -L/usr/include/lua5.1/lib -L../lib -lluabind -llualib -llua
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(lauxlib.o): In function `luaL_buffinit':
(.text+0x0): multiple definition of `luaL_buffinit'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o):(.text+0x0): first defined here
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(lauxlib.o): In function `luaL_loadbuffer':
(.text+0xf0): multiple definition of `luaL_loadbuffer'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o):(.text+0x130): first defined here
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(lauxlib.o): In function `luaL_loadfile':
(.text+0x230): multiple definition of `luaL_loadfile'

...

/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(lauxlib.o): In function `luaL_checktype':
(.text+0x1620): multiple definition of `luaL_checktype'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o):(.text+0x1590): first defined here
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `aux_do':
(.text+0x91): undefined reference to `lua_tostring'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `errfile':
(.text+0x24b): undefined reference to `lua_tostring'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `luaL_loadfile':
(.text+0x374): undefined reference to `lua_tostring'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `adjuststack':
(.text+0x5c8): undefined reference to `lua_strlen'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `adjuststack':
(.text+0x5df): undefined reference to `lua_strlen'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `luaL_addvalue':
(.text+0x651): undefined reference to `lua_strlen'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `luaL_addvalue':
(.text+0x675): undefined reference to `lua_tostring'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `getsizes':
(.text+0x82d): undefined reference to `lua_newtable'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lauxlib.o): In function `luaL_newmetatable':

...

/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblualib.a(lbaselib.o): In function `luaB_newproxy':
(.text+0x1c25): undefined reference to `lua_newtable'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0x937): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0x944): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0xa1c): undefined reference to `dlopen'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0xa31): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `gctm':
(.text+0x103e): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[1]: *** [test_abstract_base.exe] Error 1
rm test_abstract_base.o main.o
make[1]: Leaving directory `/home/alex/yake/luabind/test'
make: *** [all] Error 2
The funny thing is that the lua errors seem to be related to extern "C" according to google, but I just don't think that's the problem. I wonder if they're related to liblualib50 thinking it's part of lua5.1, because when I use lua50 completely, I get a lot more errors. I tried compiling with bjam instead and I get this:
Code:
...patience...
...found 530 targets...
...updating 124 targets...
gcc.link test/bin/test_vector_of_object.test/gcc/debug/link-static/test_vector_of_object
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0x937): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0x944): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0xa1c): undefined reference to `dlopen'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `ll_loadfunc':
(.text+0xa31): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/liblua.a(loadlib.o): In function `gctm':
(.text+0x103e): undefined reference to `dlclose'
collect2: ld returned 1 exit status

    "g++" -L"/usr/include/lua5.1/lib" -L"/usr/include/lua5.1/src" -Wl,-R -Wl,"/usr/include/lua5.1/lib" -Wl,-R -Wl,"/usr/include/lua5.1/src" -Wl,-rpath-link -Wl,"/usr/include/lua5.1/lib" -Wl,-rpath-link -Wl,"/usr/include/lua5.1/src" -o "test/bin/test_vector_of_object.test/gcc/debug/link-static/test_vector_of_object" -Wl,--start-group "test/bin/test_vector_of_object.test/gcc/debug/link-static/test_vector_of_object.o" "test/bin/gcc/debug/link-static/libmain-lib.a" "src/bin/gcc/debug/link-static/libluabind.a"  -llua  -Wl,--end-group -g

...failed gcc.link test/bin/test_vector_of_object.test/gcc/debug/link-static/test_vector_of_object...
...
So bjam only gives dlsym, dlerror, dlclose, dlopen errors, which make also gives. Everyone I read about got rid of these errors by passing LDFLAGS+='-ldl' parameter to make, I tried that too and no effect. I'm really frustrated.

p.s. if I can get this to work, I can help you with making it work with other systems , I have vmware workstation too (will also be useful since you use amd64 and I use x64-86).
Logged
cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #28 on: January 30, 2008, 12:08:19 PM »

ok, now i'm get fedora and debian, next will be opensuse.

usually this error: /usr/bin/ld: cannot find -llua
mean that ld can't find liblua.* in it's path includes.

they are the same errors i got before, but bjam solved all of them.
this afternoon i'll look into it and how i've set it up. I've made a deb of it but it's for amd64... so it's not your case.

PS: the 1st error list is telling that you have 2 libs with doubles, so they are incompatibles, check at hand in libs dirs.
Logged

cdkeito
Sr. Member
****
Posts: 381


View Profile WWW
« Reply #29 on: January 31, 2008, 10:58:40 AM »

i've, working, only:
liblua50
liblua51
liblua51-dev
liblualib50
 not added setup was required
Logged

Pages: 1 [2] 3 4 5   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.075 seconds with 18 queries.