ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Apr 10, 2020 6:26 am

All times are UTC




Post new topic Reply to topic  [ 326 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 22  Next
Author Message
 Post subject: Re: ToME 2 maintenance
PostPosted: Sat Apr 02, 2011 7:49 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Code:
$ pacman -Q boost boost-libs gcc
boost 1.46.0-4
boost-libs 1.46.0-4
gcc 4.5.2-6


These don't appear to be excessively new.

I will say, though, that I am running Arch Linux at the moment. Aside from keeping things on the newish side, Arch seems to have most packages optimized -O2. Maybe that has something to do with this?


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sat Apr 02, 2011 7:56 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
You're way ahead of me on the Boost version. (GCC is the same.)

OK, I think it may be as simple as a missed header. Try adding
Code:
#include <boost/shared_ptr.hpp>

along with the other boost includes at the top of the file.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sat Apr 02, 2011 10:19 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Did that, still getting the exact same error.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 8:52 am 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
I've done some namespace hygiene work in the most recent commit (just pushed) which may solve the problem.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 1:23 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Well it doesn't solve the type problem in gods.cc... And now it bugs out even earlier in the compilation. :?

Code:
/home/proteus/Games/miramors-tome2/src/files.cc: In function ‘bool_ txt_to_html(const char*, const char*, const char*, const char*, bool_, bool_)’:
/home/proteus/Games/miramors-tome2/src/files.cc:3451:61: error: invalid conversion from ‘bool (*)(const std::string&)’ to ‘boost::enable_if_c<true, void>::type*’
/home/proteus/Games/miramors-tome2/src/files.cc:3451:61: error:   initializing argument 2 of ‘boost::filesystem3::path::path(const Source&, typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type*) [with Source = char [1024], typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type = void]’
make[2]: *** [src/CMakeFiles/tome.dir/files.cc.o] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 1:29 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Lord Estraven wrote:
Well it doesn't solve the type problem in gods.cc...


Oh, right, I forgot about that. I suppose I should add a fix :).

Lord Estraven wrote:
And now it bugs out even earlier in the compilation. :?

Code:
/home/proteus/Games/miramors-tome2/src/files.cc: In function ‘bool_ txt_to_html(const char*, const char*, const char*, const char*, bool_, bool_)’:
/home/proteus/Games/miramors-tome2/src/files.cc:3451:61: error: invalid conversion from ‘bool (*)(const std::string&)’ to ‘boost::enable_if_c<true, void>::type*’
/home/proteus/Games/miramors-tome2/src/files.cc:3451:61: error:   initializing argument 2 of ‘boost::filesystem3::path::path(const Source&, typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type*) [with Source = char [1024], typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type = void]’
make[2]: *** [src/CMakeFiles/tome.dir/files.cc.o] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2


This is caused by an apparent incompatibility between Boost Filesystem V2 and V3. For now you can comment that if statement -- the code isn't really used for anything right now -- I had to update it to get rid of file_exists().


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 1:52 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Okay thanks, I'll try that...

Nope, loadsave.cc too:

Code:
/home/proteus/Games/miramors-tome2/src/loadsave.cc: In function ‘bool_ load_player()’:
/home/proteus/Games/miramors-tome2/src/loadsave.cc:2144:42: error: invalid conversion from ‘bool (*)(const std::string&)’ to ‘boost::enable_if_c<true, void>::type*’
/home/proteus/Games/miramors-tome2/src/loadsave.cc:2144:42: error:   initializing argument 2 of ‘boost::filesystem3::path::path(const Source&, typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type*) [with Source = char [1024], typename boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename boost::decay<Source>::type> >::type = void]’
make[2]: *** [src/CMakeFiles/tome.dir/loadsave.cc.o] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 2:26 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Gah.

Try reverting the 2a5ade875685e853391a22fe255b2b5eafcd9288 commit locally and see if that helps.

(Just "git revert 2a5ade875" should do it. Not sure if it'll conflict with later bits in the branch, but it's worth a shot.)


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 2:48 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Unfortunately it conflicts.

Code:
error: could not revert 2a5ade8... Loading/saving: Use boost::filesystem and BOOST_TYPEOF_TPL instead of typeof().
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 3:02 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Alright, I'll try to install a more recent Boost in a virtual machine environment to see if I can find a solution.

EDIT: (EDIT#2: scratch that)

EDIT#2: You could also try the very latest revision from the repo; Apparently I was using a deprecated "path" constructor. It now compiles on F15 (which also has a newer Boost), but immediately segfaults on startup.


Last edited by AnonymousHero on Sun Apr 03, 2011 4:31 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 4:18 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
That makes it compile... However, there are bunch of "no matching function to call for min/max" errors in casting_context.cc. Casting those as ints almost makes it compile... Then I get this when it tries to link the binary:

Code:
CMakeFiles/tome.dir/cmd5.cc.o: In function `get_level_school(spells::spell const*, int, int)':
cmd5.cc:(.text+0x43f4): undefined reference to `lua_get_level(spells::spell const*, int, int, int, int)'
CMakeFiles/tome.dir/casting_context.cc.o: In function `spells::device_casting_context::scaled_effective_level(spells::spell const*, int, int) const':
casting_context.cc:(.text+0x378): undefined reference to `lua_get_level(spells::spell const*, int, int, int, int)'
collect2: ld returned 1 exit status
make[2]: *** [src/tome] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2


Typo maybe?


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 4:33 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Did you do a "make clean" beforehand?

EDIT: See also my edit#2 of the post above yours.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 5:07 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
Yeah, 'make clean' doesn't seem to help. I think I'm going to give it a break.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 5:43 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
It could be that there are some stale build files still lying around. (EDIT: See (*))

Could you please provide a diff of the changes you did to std::max, std::min to get the code compiling? It's a bit difficult to spot all the cases just by looking at the code :).

(*) EDIT: That is to say: I've sometimes observed "make clean" not cleaning "enough". What you can do to avoid this is issue is to have the build directory separate from the source directory. Something like this:
Code:
$ mkdir src
$ cd src
$ git clone wherever-you-are-cloning-from
$ cd ..
$ mkdir build
$ cd build
$ cmake ../src

Then you can just nuke the "build" directory completely if you want to be absolutely sure that everything is rebuilt without having to worry about any local changes to the source.


Top
 Profile  
 
 Post subject: Re: ToME 2 maintenance
PostPosted: Sun Apr 03, 2011 6:28 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 708
AnonymousHero wrote:
Could you please provide a diff of the changes you did to std::max, std::min to get the code compiling? It's a bit difficult to spot all the cases just by looking at the code :).


I just did a search/replace on all instances of "min(" and "max(", changing them "min<int>(" and "max<int>(". Ham-fisted, stupid, and probably capable of causing all kinds of problems, but it appeared to work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 326 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 22  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group