Author Topic: Problems compiling Glest Advanced Engine from SVN in OpenSuse 11.1 64 bit  (Read 2619 times)

PolitikerNEU

  • Guest
Hello everyone, when I am trying to compile Glest advanced engine from svn (revision 301) I get the following errors:
(jam | grep error)
Code: [Select]
shared_lib/sources/platform/posix/socket.cpp: In constructor ‘Shared::Platform::Ip::Ip(const std::string&)’:
shared_lib/sources/platform/posix/socket.cpp:54: error: ‘atoi’ was not declared in this scope               
shared_lib/sources/platform/posix/socket.cpp: In static member function ‘static void Shared::Platform::Socket::throwException(const std::string&)’:
shared_lib/sources/platform/posix/socket.cpp:207: error: ‘strerror’ was not declared in this scope                                                 
shared_lib/sources/platform/posix/socket.cpp: In member function ‘void Shared::Platform::ClientSocket::connect(const Shared::Platform::Ip&, int)’:
shared_lib/sources/platform/posix/socket.cpp:217: error: ‘memset’ was not declared in this scope
shared_lib/sources/util/util.cpp: In function ‘void Shared::Util::copyStringToBuffer(char*, int, const std::string&)’:
shared_lib/sources/util/util.cpp:117: error: ‘strncpy’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘int Shared::Util::strToInt(const std::string&)’:
shared_lib/sources/util/conversion.cpp:37: error: ‘strtol’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘float Shared::Util::strToFloat(const std::string&)’:
shared_lib/sources/util/conversion.cpp:49: error: ‘strtod’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘bool Shared::Util::strToInt(const std::string&, int*)’:
shared_lib/sources/util/conversion.cpp:73: error: ‘strtol’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘bool Shared::Util::strToFloat(const std::string&, float*)’:
shared_lib/sources/util/conversion.cpp:83: error: ‘strtod’ was not declared in this scope
shared_lib/sources/util/properties.cpp: In member function ‘void Shared::Util::Properties::load(const std::string&)’:
shared_lib/sources/util/properties.cpp:50: error: ‘strlen’ was not declared in this scope
glest_game/game/game_camera.cpp: In member function ‘void Glest::Game::GameCamera::update()’:
glest_game/game/game_camera.cpp:103: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:106: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:117: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:120: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:123: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp: In member function ‘void Glest::Game::GameCamera::zoom(float)’:
glest_game/game/game_camera.cpp:236: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:238: error: ‘abs’ was not declared in this scope
glest_game/game/game_settings.cpp: In member function ‘void Glest::Game::GameSettings::randomizeLocs()’:
glest_game/game/game_settings.cpp:61: error: ‘memset’ was not declared in this scope

To be able to run the correct jam, I have first uninstalled boost-jam and reinstalled the "normal" jam.

daniel.santos

  • Guest
Thanks for posting.  I would like to open a bug report, but I need a little more information please.  My initial guess is that this is an autoconf issue (mk/linux/configure.ac or something under mk/linux/mk).  So..
1. Which branch did you check the code out of?  Note that the HEAD is not update, so if you checked it out from there, please check out either the 0.2.x or 0.3 branch.
2. I'm sure can find it online, but if you can please tell me the version of gcc and glibc you have installed, that will help me.

Also, this sounds like we need two separate bugs.  I'll need to figure out why boost-jam doesn't work and see if we should make it compatible or if we should just have configure.ac make sure the correct jam is installed (maybe Matze can help us with this since we're using his jam-based build system).

daniel.santos

  • Guest
Can you please edit your Jamfile and add this to the top and see post the results:

Code: [Select]
CPPFLAGS += -D_XOPEN_SOURCE=600

If it compiles after that, then I'll know what to do :) Thanks

PolitikerNEU

  • Guest
I don't know which glest version I checked out, but I think it is 0.3.0 trunk (I used the command svn co https://glest.codemonger.org/svn/repos/gae/trunk glest)

My gcc-version is 4.3.3, my glibc-version is 2.9-12.2

Adding the line
Code: [Select]
CPPFLAGS += -D_XOPEN_SOURCE=600gives me
Code: [Select]
warning: unknown rule UseAutoconf
warning: unknown rule Package
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule ExternalLibs
warning: unknown rule IncludeDir
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Wildcard
warning: unknown rule Application
warning: unknown rule LinkWith
warning: unknown rule ExternalLibs
warning: unknown rule IncludeDir
...found 9 target(s)...
...updating 1 target(s)...
Ranlib glestlib.a
ranlib: 'glestlib.a': No such file

ranlib glestlib.a

...failed Ranlib glestlib.a ...
...failed updating 1 target(s)...
when running jam

revel

  • Guest
you could try ft jam
http://freetype.org/jam/
im using it for building gae on x86_64

PolitikerNEU

  • Guest
ft-jam gives me the same errors (plus when I compile ft-jam, it gives me a warning about an implicit declaration of a built-in function) - and if ft-jam worked, boost-jam should work too because this is based on that.

daniel.santos

  • Guest
I don't know which glest version I checked out, but I think it is 0.3.0 trunk (I used the command svn co https://glest.codemonger.org/svn/repos/gae/trunk glest)
I'm sorry, I'm still thinking CVS.  What I meant was the trunk.  Please check out https://glest.codemonger.org/svn/repos/gae/branches/0.3 or https://glest.codemonger.org/svn/repos/gae/branches/0.2.x.  There is currently work going on in both branches.  If you want a more stable release, grab https://glest.codemonger.org/svn/repos/gae/tags/0.2.11.  If I understand svn correctly, I think that the "trunk" would be the state from the last time we merged it (which would have been long ago).  Maybe we should remove it?  I'm not certain really, maybe we should just be merging back into the trunk when we release stable?  Anybody know what the best practices is for this?

My gcc-version is 4.3.3, my glibc-version is 2.9-12.2

Adding the line
Code: [Select]
CPPFLAGS += -D_XOPEN_SOURCE=600gives me
oops, I'm sorry, I'm thinking Makefile (I should have tested it myself before posting it).  Just add a space and a semi-colen to what I gave you so it looks like this:
Code: [Select]
CPPFLAGS += -D_XOPEN_SOURCE=600 ;
if ! $(top_builddir)
{
    top_builddir = $(TOP) ;
}
top_srcdir = $(TOP) ;
.
.
.

Alternately, you can edit Jamconfig and find the first instance of CPPFLAGS += (it appears multiple times :( ) and add "-D_XOPEN_SOURCE=600" to it.  I'm not even 100% certain this will fix the problem, I read that I'm supposed to #include <features.h> when using this but maybe that's included internally by glibc's headers, I'm not sure.  Either way, I would like to know if it fixes it and just generally make sure that it will either compile or the configure script will fail telling you what it needs.

ft-jam gives me the same errors (plus when I compile ft-jam, it gives me a warning about an implicit declaration of a built-in function) - and if ft-jam worked, boost-jam should work too because this is based on that.
Can you please post the errors you get with boost-jam and ft-jam?  I can probably reproduce it myself, but it would be helpful if you have that info handy.  Thanks!
[/quote

PolitikerNEU

  • Guest
Old glest version:

Errors with ft-jam
Code: [Select]
shared_lib/sources/platform/posix/socket.cpp: In constructor ‘Shared::Platform::Ip::Ip(const std::string&)’:
shared_lib/sources/platform/posix/socket.cpp:54: error: ‘atoi’ was not declared in this scope
shared_lib/sources/platform/posix/socket.cpp: In static member function ‘static void Shared::Platform::Socket::throwException(const std::string&)’:
shared_lib/sources/platform/posix/socket.cpp:207: error: ‘strerror’ was not declared in this scope
shared_lib/sources/platform/posix/socket.cpp: In member function ‘void Shared::Platform::ClientSocket::connect(const Shared::Platform::Ip&, int)’:
shared_lib/sources/platform/posix/socket.cpp:217: error: ‘memset’ was not declared in this scope
shared_lib/sources/util/util.cpp: In function ‘void Shared::Util::copyStringToBuffer(char*, int, const std::string&)’:
shared_lib/sources/util/util.cpp:117: error: ‘strncpy’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘int Shared::Util::strToInt(const std::string&)’:
shared_lib/sources/util/conversion.cpp:37: error: ‘strtol’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘float Shared::Util::strToFloat(const std::string&)’:
shared_lib/sources/util/conversion.cpp:49: error: ‘strtod’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘bool Shared::Util::strToInt(const std::string&, int*)’:
shared_lib/sources/util/conversion.cpp:73: error: ‘strtol’ was not declared in this scope
shared_lib/sources/util/conversion.cpp: In function ‘bool Shared::Util::strToFloat(const std::string&, float*)’:
shared_lib/sources/util/conversion.cpp:83: error: ‘strtod’ was not declared in this scope
shared_lib/sources/util/properties.cpp: In member function ‘void Shared::Util::Properties::load(const std::string&)’:
shared_lib/sources/util/properties.cpp:50: error: ‘strlen’ was not declared in this scope
glest_game/game/game_camera.cpp: In member function ‘void Glest::Game::GameCamera::update()’:
glest_game/game/game_camera.cpp:103: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:106: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:117: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:120: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:123: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp: In member function ‘void Glest::Game::GameCamera::zoom(float)’:
glest_game/game/game_camera.cpp:236: error: ‘abs’ was not declared in this scope
glest_game/game/game_camera.cpp:238: error: ‘abs’ was not declared in this scope
glest_game/game/game_settings.cpp: In member function ‘void Glest::Game::GameSettings::randomizeLocs()’:
glest_game/game/game_settings.cpp:61: error: ‘memset’ was not declared in this scope

Using boost-jam just gives me
Code: [Select]
Error: You can't use boostjam for this build.
Using the mentioned line
Code: [Select]
CPPFLAGS += -D_XOPEN_SOURCE=600 ;just gives me the same error messages.

I'll repost as soon as I have checked out the 0.3.x branch - sorry, it takes a little bit of time
EDIT:
Thanks, the new 0.3.x compiles fine (using ft-jam), but I get many warnings:
Code: [Select]
cc1plus: warning: game/../shared_lib/include/lua: No such file or directory
bootjam still doesn't work (same error message)
« Last Edit: 24 February 2009, 18:49:22 by PolitikerNEU »

daniel.santos

  • Guest
Ahh, great! glat to hear this!  So if you get that clear of an error message, I'm guessing that Matze's build system just isn't compatibile.  I don't understand it that well so we'll need his experties on that.  As far as the warnings, just do "mkdir source/shared_lib/include/lua" for now, this is my fault because I haven't imported the lua code into svn yet (and it's not used yet either).  Glest 3.2 is to be merged into GAE 0.3 and the lua is part of that.

 

anything