scons problem :(

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
monkeyslayer56
Posts:5
Joined:2011-05-08, 22:30
scons problem :(

Post by monkeyslayer56 » 2011-05-08, 23:33

well i downloaded the svn version and scons is giving me this (end, figured the whole output isn't needed, if it is let me know please)

Code: Select all

checking for X11/Xlib.h... yes
checking for X11/XKBlib.h... yes
checking for Xxf86vm extension... no
checking for -lSM - X11 session management... no
configure: WARNING: libSM not found; disabling session management detection
checking for OpenGL headers... found in /usr/include
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
os.chdir('/media/disk1/cafusvn/cafu')
scons: *** Error 1
i have the GL library at /usr/lib/libGL.so (linked to libGL.so.1 which is linked to the nvidia provided one, libGL.so.270.41.06)
I am running arch linux and am not sure of the problem here if anyone could point me into the right direction please do as im anxious to play around with Cafu :) Thanks
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: scons problem :(

Post by Carsten » 2011-05-09, 09:03

Hi,
welcome to the Cafu forums! :welcome:
monkeyslayer56 wrote: I am running arch linux and am not sure of the problem here if anyone could point me into the right direction please do as im anxious to play around with Cafu :)
Did you install the libraries mentioned at Linux Packages?
Your configure step cannot find the Mesa libraries, which are required for OpenGL development. Please install them, and try again. :up:
Best regards,
Carsten
monkeyslayer56
Posts:5
Joined:2011-05-08, 22:30

Re: scons problem :(

Post by monkeyslayer56 » 2011-05-09, 16:42

ya thats the funny thing, i have the libraries installed that it needs (i even complied a sample hello world type openGL application to test) and its still not finding them for some reason... Could me using the muiltilib version of GCC be causing the prob?

EDIT:
well i edited the config file for wxwidgets since it was looking in somware in /opt (i forget exactly ware) for the opengl libs... so changed that and now i get

Code: Select all

scons: building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o build/linux2/g++/release/CaTools/ReadDump.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs CaTools/ReadDump.cpp
CaTools/ReadDump.cpp: In function 'int main(int, const char**)':
CaTools/ReadDump.cpp:168:14: error: variable 'EthernetDest' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:169:14: error: variable 'EthernetSource' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:223:14: error: variable 'IPSource' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:224:14: error: variable 'IPDest' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

scons: *** [build/linux2/g++/release/CaTools/ReadDump.o] Error 1
scons: building terminated because of errors.
im not sure what to do here so i would be pleased to get pointed in the correct direction thanks
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: scons problem :(

Post by Carsten » 2011-05-10, 11:19

monkeyslayer56 wrote:ya thats the funny thing, i have the libraries installed that it needs (i even complied a sample hello world type openGL application to test) and its still not finding them for some reason... Could me using the muiltilib version of GCC be causing the prob?

EDIT:
well i edited the config file for wxwidgets since it was looking in somware in /opt (i forget exactly ware) for the opengl libs...
Hm, well, this looks like a matter of compiler setup, i.e. it's normally up to the compiler config to come with proper system default paths...

Can you please say more specifically what you changed in wxWidgets in order to make it work?
What system are you using exactly, what compiler, versions, etc?
so changed that and now i get

Code: Select all

scons: building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o build/linux2/g++/release/CaTools/ReadDump.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs CaTools/ReadDump.cpp
CaTools/ReadDump.cpp: In function 'int main(int, const char**)':
CaTools/ReadDump.cpp:168:14: error: variable 'EthernetDest' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:169:14: error: variable 'EthernetSource' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:223:14: error: variable 'IPSource' set but not used [-Werror=unused-but-set-variable]
CaTools/ReadDump.cpp:224:14: error: variable 'IPDest' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

scons: *** [build/linux2/g++/release/CaTools/ReadDump.o] Error 1
scons: building terminated because of errors.
im not sure what to do here so i would be pleased to get pointed in the correct direction thanks
Another sign for a somewhat unusual (or at least unexpected) compiler setup.
Where does the -Werror=unused-but-set-variable parameter come from?
It's certainly set neither by Cafu nor by wxWidgets build scripts.

Solutions to the above errors include removing the -Werror=unused-but-set-variable parameter from the compiler call, or to remove the variables from the (ReadDump.cpp) program source it is complaining about.

Please let me know if and how this works for you, I'm always interested in improving the Cafu build scripts. :up:
Best regards,
Carsten
monkeyslayer56
Posts:5
Joined:2011-05-08, 22:30

Re: scons problem :(

Post by monkeyslayer56 » 2011-05-10, 11:37

in the configure for wxwidgets i had to change

Code: Select all

  for ac_dir in $SEARCH_LIB /opt/graphics/OpenGL/lib
to

Code: Select all

  for ac_dir in $SEARCH_LIB /opt/graphics/OpenGL/lib /usr/lib;
and

Code: Select all

  for ac_dir in $SEARCH_LIB
to

Code: Select all

  for ac_dir in $SEARCH_LIB /usr/lib;
then i did manage to get past the other error by changing the lines

Code: Select all

elif compiler=="g++":
    envDebug_Cafu  .Append(CCFLAGS=Split("-funsigned-char -Wall -Werror -Wno-char-subscripts"));
    envRelease_Cafu.Append(CCFLAGS=Split("-funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing"));
    envProfile_Cafu.Append(CCFLAGS=Split("-funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing"));
to

Code: Select all

elif compiler=="g++":
    envDebug_Cafu  .Append(CCFLAGS=Split("-funsigned-char -Wall -Wno-char-subscripts"));
    envRelease_Cafu.Append(CCFLAGS=Split("-funsigned-char -Wall -Wno-char-subscripts -fno-strict-aliasing"));
    envProfile_Cafu.Append(CCFLAGS=Split("-funsigned-char -Wall -Wno-char-subscripts -fno-strict-aliasing"));
(just removed the -Werror flag)
after i did all that it continied to compile for a while before it hit another error, this time while building bullet... I haven't looked to far into this error yet since i just got up (after going to bed while it compiled this far) and the error is

Code: Select all

ExtLibs/bullet/src/BulletSoftBody/btSoftBodyInternals.h: In function 'void ZeroInitialize(T&) [with T = btSoftBody::Tetra]':
ExtLibs/bullet/src/BulletSoftBody/btSoftBody.cpp:315:20:   instantiated from here
ExtLibs/bullet/src/BulletSoftBody/btSoftBodyInternals.h:175:17: error: uninitialized const 'zerodummy' [-fpermissive]
ExtLibs/bullet/src/BulletSoftBody/btSoftBody.h:225:9: note: 'const struct btSoftBody::Tetra' has no user-provided default constructor
scons: *** [ExtLibs/bullet/build/linux2/g++/debug/BulletSoftBody/btSoftBody.o] Error 1
scons: building terminated because of errors.
As for my compiler setup im using gcc/g++ 4.6.0 20110429 (prerelease). It is the muiltilib version (don't know if thats normal or not, but for my distribution(Arch linux) its not the default) so that i can compile both 32 and 64 bit stuff on my 64bit system. I highly dout i have to an extreme of a setup (if i do it'd be by accident...) because ive only played around with coding a little bit and the most exotic thing ive done with compiler setup is install some that would let me cross compile for windows and linux in my IDE (i forget the name of that compiler, but it shouldn't interfere with this as other things compile just fine). Well thanks for the suggestions so far, hopefully we can this problem resolved :) and on the bright side i think i remember some cafu stuff going by in the terminal output without error :)
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: scons problem :(

Post by Carsten » 2011-05-10, 16:52

monkeyslayer56 wrote:As for my compiler setup im using gcc/g++ 4.6.0 20110429 (prerelease).
Ah, well, would you mind using g++ 4.4 or 4.5 ?
I've successfully compiled the Cafu source code this morning from scratch on Ubuntu 11.04 (Natty Narwhal), which comes with g++ 4.5, without problems, as well as on the older Ubuntu 10.04 using g++ 4.4.

I don't have g++ 4.6 available, and thus I cannot provide support for it, but it's known that the GCC developers tend to make changes to the compiler that require changes to the program source code. That's usually a good thing, but as I haven't access to g++ 4.6, I cannot make these changes until it ships e.g. with the next version of Ubuntu.

However, the error message that it produced is pretty clear, isn't it?
You can fix it by either providing an initialization for uninitialized const 'zerodummy', or use compiler option -fpermissive to, according to the manual, "Downgrade some diagnostics about nonconformant code from errors to warnings."
Best regards,
Carsten
monkeyslayer56
Posts:5
Joined:2011-05-08, 22:30

Re: scons problem :(

Post by monkeyslayer56 » 2011-05-10, 23:00

ya i i should have noticed that (even if i only looked at it for a few min after waking up...) i added the -fpermissive and i'll see how it goes, it that doesn't work i'll see if i can get my hands on an older version of GCC, thanks for the help you've provided so far, i'll post back my results after trying to (and hopefully succeeding in) compiling

EDIT: Well downgrading to gcc (GCC) 4.5.0 20100520 (prerelease) i got it to compile and run the tech demo map now i have a problem in that i can't run the world editor... release version segfaults and debug gives me this at the terminal

Code: Select all

josh@my-computer:/media/disk1/cafusvn/cafu$ ./CaWE 
../src/common/image.cpp(1560): assert "Ok()" failed in GetWidth(): invalid image
../src/common/image.cpp(1567): assert "Ok()" failed in GetHeight(): invalid image
../src/common/image.cpp(1937): assert "Ok()" failed in HasMask(): invalid image
../src/common/image.cpp(1560): assert "Ok()" failed in GetWidth(): invalid image
../src/common/image.cpp(1567): assert "Ok()" failed in GetHeight(): invalid image
../src/common/image.cpp(1819): assert "Ok()" failed in GetAlpha(): invalid image
../src/common/image.cpp(1819): assert "Ok()" failed in GetAlpha(): invalid image
../src/common/image.cpp(1801): assert "Ok()" failed in SetAlpha(): invalid image
Segmentation fault
josh@my-computer:/media/disk1/cafusvn/cafu$ 
probably something stupid on my part but any help (again) would be appreciated, in the meantime i'll try a clean recompile (versis changing compilers halfway through when it errored)


EDIT: ya it was stupid me... i don't recomend renaming the CaWE directory so that the excutable with the same name may exist... instead renaming the CaWE excutable fixed it
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: scons problem :(

Post by Carsten » 2011-05-12, 10:13

monkeyslayer56 wrote:EDIT: ya it was stupid me... i don't recomend renaming the CaWE directory so that the excutable with the same name may exist... instead renaming the CaWE excutable fixed it
Ah, thanks for the update!
Does that mean that CaWE (and the other programs) now work for you?
Best regards,
Carsten
monkeyslayer56
Posts:5
Joined:2011-05-08, 22:30

Re: scons problem :(

Post by monkeyslayer56 » 2011-05-12, 12:53

yep, everything apears to be working, i built the sample world in the tutorial last night and so far im really liking it
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: scons problem :(

Post by Carsten » 2011-05-14, 10:53

By the way, in case you're using Ubuntu 11.04 (Natty Narwhal): I just committed a fix for a bug that prevents showing the applications main frame in CaWE and the Cafu Engine.

Run this sequence of commands to update:

Code: Select all

svn update
rm ExtLibs/wxWidgets/build-gtk/make-ok-flag
rm -rf build/linux2/g++/
scons
If you're not affected by this bug (i.e. the main window of each program opens normally when the program is started), all of the above is entirely optional.
:up:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests