Compiling Cafu on Fedora 17 x64

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.
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:
Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-26, 07:13

Well Hi everybody I decided to transfer all my development tools to linux and in order to make a game Cafu provides me the tool for make something interesting

the problem is I tried to compile the source code for linux... and well after of the searching of all packages needed for compile cafu and ia have the following error

Code: Select all

[root@darkwarepc Cafu-src-r611]# scons -j 2
scons: Reading SConscript files ...

Checking for C library png... yes
Checking for C library z... yes
Mkdir("ExtLibs/wxWidgets/build-gtk")
os.chdir('ExtLibs/wxWidgets/build-gtk')
../configure --with-gtk --disable-shared --without-libtiff --disable-pnm --disable-pcx --disable-iff --with-opengl --with-regex=builtin --disable-compat26 --disable-compat28
sh: ../configure: Permission denied
os.chdir('/home/scarreno/Downloads/Cafu-src-r611')
scons: *** Error 126
[root@darkwarepc Cafu-src-r611]# 
do you know what happen? or anyone knows?
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-08-27, 23:57

Dear Scorphame,
Scorphame wrote:

Code: Select all

[root@darkwarepc Cafu-src-r611]# scons -j 2
scons: Reading SConscript files ...

Checking for C library png... yes
Checking for C library z... yes
Mkdir("ExtLibs/wxWidgets/build-gtk")
os.chdir('ExtLibs/wxWidgets/build-gtk')
../configure --with-gtk --disable-shared --without-libtiff --disable-pnm --disable-pcx --disable-iff --with-opengl --with-regex=builtin --disable-compat26 --disable-compat28
sh: ../configure: Permission denied
os.chdir('/home/scarreno/Downloads/Cafu-src-r611')
scons: *** Error 126
[root@darkwarepc Cafu-src-r611]# 
do you know what happen? or anyone knows?
Are you running this as the root user? I think you should try this as a normal, non-privileged user instead.

About the permission denied, can you find out what the permissions of the ExtLibs/wxWidgets/configure file are?

(If you try again as a normal user, it's probably best to start from scratch. That is, re-run all the instructions at Getting Started with the Cafu Source Code as the normal user in a fresh directory, in order to avoid accessing files that possibly were created by a different user.)
Best regards,
Carsten
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-28, 02:29

was the permission denied the problem... I changed that... the ll show me the file has 666 permissions :/

okay now I were noticed that my GTK is not right... i'll fix it, thanks a lot ;)
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-28, 21:14

And I also I finalyy get it, I'm copilnig right now the cafu source code under linux Fedora 64 bits... let me say than is a really long process compilnig it (eventually I checked the requierments from getting started with source code) but I needed to install some packages not related there (if they were there, I recomend for users who doesn't use Ubuntu make a comparission)

Here is the list what I did for to compile them (Well I actually enjoyed much more installing some other packages for my own)

Development Libraries (via yum groupinstall)
libpng2-devel (Download the rpm for internet and apply a rpm -ivh in order to find some missing dependences and procede to install them with yum)
gtk2-devel (like libpng2-devel)
mesa devel (yum install mesa*)
change the permissions of ExtLibs/wxWidgets/configure to 767 in order to provide the access from scons

in order to get some other error the scons will tell what rpm is missed and like gtk2 and libpng2 download the rpm for internet and apply a rpm-ivh in order to get the missing dependences...


EIDT: Also

Code: Select all

building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o build/linux2/g++/release/Ca3DE/Server/Server.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/bullet/src -IExtLibs/bullet/src Ca3DE/Server/Server.cpp
Ca3DE/Server/Server.cpp: In destructor 'ServerT::~ServerT()':
Ca3DE/Server/Server.cpp:196:29: error: 'close' was not declared in this scope
scons: *** [build/linux2/g++/release/Ca3DE/Server/Server.o] Error 1
scons: building terminated because of errors.
What is that compiling error? I didn't make any change on the code :shock: :frown: :?
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-08-29, 22:47

Scorphame wrote:EIDT: Also

Code: Select all

building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o build/linux2/g++/release/Ca3DE/Server/Server.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/bullet/src -IExtLibs/bullet/src Ca3DE/Server/Server.cpp
Ca3DE/Server/Server.cpp: In destructor 'ServerT::~ServerT()':
Ca3DE/Server/Server.cpp:196:29: error: 'close' was not declared in this scope
scons: *** [build/linux2/g++/release/Ca3DE/Server/Server.o] Error 1
scons: building terminated because of errors.
What is that compiling error? I didn't make any change on the code :shock: :frown: :?
This sounds like a change in the header files, a relatively frequent occurrence with recent releases of GCC.
What does

Code: Select all

g++ --version
output?

Does it help if you add line

Code: Select all

#include <unistd.h>
near the top of file Ca3DE/Server/Server.cpp ?
Best regards,
Carsten
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-30, 01:22

Carsten wrote:What does

Code: Select all

g++ --version
output?

Code: Select all

g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Carsten wrote:Does it help if you add line

Code: Select all

#include <unistd.h>
near the top of file Ca3DE/Server/Server.cpp ?
yes it helped but now the problem is in client :(

Code: Select all

g++ -o build/linux2/g++/release/Ca3DE/Client/Client.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/bullet/src -IExtLibs/bullet/src Ca3DE/Client/Client.cpp
g++ -o build/linux2/g++/release/Ca3DE/Client/ClientStateConnecting.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/bullet/src -IExtLibs/bullet/src Ca3DE/Client/ClientStateConnecting.cpp
Ca3DE/Client/Client.cpp: In destructor 'ClientT::~ClientT()':
Ca3DE/Client/Client.cpp:67:51: error: 'close' was not declared in this scope
scons: *** [build/linux2/g++/release/Ca3DE/Client/Client.o] Error 1
scons: building terminated because of errors.
I did the same... it didn't work
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-30, 02:09

Solved... I Added the same include file under that .cpp file and ClientStatusIdle.cpp
but we have other

Code: Select all

Libs/Models/Loader_dlod.cpp:87:42: error: deleting object of abstract class type 'ModelLoaderT' which has non-virtual destructor will cause undefined behaviour [-Werror=delete-non-virtual-dtor]
Libs/Models/Loader_dlod.cpp: In destructor 'LoaderDlodT::~LoaderDlodT()':
Libs/Models/Loader_dlod.cpp:97:38: error: deleting object of abstract class type 'ModelLoaderT' which has non-virtual destructor will cause undefined behaviour [-Werror=delete-non-virtual-dtor]
cc1plus: all warnings being treated as errors
scons: *** [Libs/build/linux2/g++/release/Models/Loader_dlod.o] Error 1
scons: building terminated because of errors.
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-08-31, 00:56

If you update your code to r618, or patch file Libs/Models/Loader.hpp as indicated here, does it help with this problem?
Best regards,
Carsten
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-31, 01:22

I'm compiling the last version (I used subversion now to download r618)

let's see if I have some problem
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-08-31, 01:56

It didn't

I downloaded the source code from Subversion and from webpage

I compiled both with all the modifications that we made... and both bring to me the following error:

Code: Select all

g++ -o build/linux2/g++/release/CaWE/MapTerrain.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/noise/src -IExtLibs/noise/src -I/usr/include/freetype2 CaWE/MapTerrain.cpp
g++ -o build/linux2/g++/release/CaWE/MapWorld.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -pthread -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -ILibs -IExtLibs -IExtLibs/wxWidgets/build-gtk/lib/wx/include/gtk2-unicode-static-2.9 -IExtLibs/wxWidgets/include -Ibuild/linux2/g++/release/ExtLibs/lua/src -IExtLibs/lua/src -Ibuild/linux2/g++/release/ExtLibs/noise/src -IExtLibs/noise/src -I/usr/include/freetype2 CaWE/MapWorld.cpp
CaWE/MapTerrain.cpp: In member function 'virtual void MapTerrainT::Render3D(Renderer3DT&) const':
CaWE/MapTerrain.cpp:182:100: error: narrowing conversion of '(1.0e+0 / ((double)(((float)BB.BoundingBox3T<float>::Max.Vector3T<float>::x) - ((float)BB.BoundingBox3T<float>::Min.Vector3T<float>::x))))' from 'double' to 'const float' inside { } is ill-formed in C++11 [-Werror=narrowing]
CaWE/MapTerrain.cpp:183:100: error: narrowing conversion of '(-1.0e+0 / ((double)(((float)BB.BoundingBox3T<float>::Max.Vector3T<float>::y) - ((float)BB.BoundingBox3T<float>::Min.Vector3T<float>::y))))' from 'double' to 'const float' inside { } is ill-formed in C++11 [-Werror=narrowing]
CaWE/MapTerrain.cpp:246:104: error: narrowing conversion of '(1.0e+0 / ((double)(((float)BB.BoundingBox3T<float>::Max.Vector3T<float>::x) - ((float)BB.BoundingBox3T<float>::Min.Vector3T<float>::x))))' from 'double' to 'const float' inside { } is ill-formed in C++11 [-Werror=narrowing]
CaWE/MapTerrain.cpp:247:104: error: narrowing conversion of '(-1.0e+0 / ((double)(((float)BB.BoundingBox3T<float>::Max.Vector3T<float>::y) - ((float)BB.BoundingBox3T<float>::Min.Vector3T<float>::y))))' from 'double' to 'const float' inside { } is ill-formed in C++11 [-Werror=narrowing]
cc1plus: all warnings being treated as errors
scons: *** [build/linux2/g++/release/CaWE/MapTerrain.o] Error 1
scons: building terminated because of errors.
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-09-01, 01:04

Scorphame wrote:It didn't
Uhhh... but it did! You're now seeing another problem. :cheesy:

(I'm still using GCC 4.6 here, and have not yet access to 4.7 to test all this and to fix these issues in the repository. But I expect that Ubuntu 12.10 will come with GCC 4.7 as well.)
I compiled both with all the modifications that we made... and both bring to me the following error:
In all the lines that it is mentioning, please replace all 1.0 constants with 1.0f constants. :up:
Best regards,
Carsten
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-09-03, 21:27

Okay I see.. well I replaced that and it worked, but it stoped in the next file in the destructor of the MorphPrimpT class

Code: Select all

CaWE/MorphPrim.cpp: In destructor 'MorphPrimT::~MorphPrimT()':
CaWE/MorphPrim.cpp:96:102: error: deleting object of polymorphic class type 'MP_VertexT' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
CaWE/MorphPrim.cpp:99:88: error: deleting object of polymorphic class type 'MP_EdgeT' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
CaWE/MorphPrim.cpp: In member function 'void MorphPrimT::UpdateBrushFromVertices()':
CaWE/MorphPrim.cpp:405:39: error: deleting object of polymorphic class type 'MP_VertexT' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
CaWE/MorphPrim.cpp:518:90: error: deleting object of polymorphic class type 'MP_EdgeT' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-09-03, 22:36

Wow...
Ok, in file CaWE/MorphPrim.hpp, in struct MP_PartT, please insert line

Code: Select all

    virtual ~MP_PartT() { }
so that it looks like this:

Code: Select all

struct MP_PartT
{
    enum TypeT
    {
        TYPE_VERTEX,
        TYPE_EDGE
    };


    MP_PartT() : m_Selected(false)
    {
    }

    virtual ~MP_PartT() { }

    virtual TypeT     GetType() const=0;
    virtual Vector3fT GetPos()  const=0;

    bool m_Selected;   ///< Is this part/handle selected by the user?
};
Sorry for all the trouble! :oops:

Btw., would you mind posting / sending me a patch with all the modifications as soon as it compiles properly? I'd be happy to apply it to the official SVN repository, so that others who use GCC 4.7 too don't have to go through the same steps. :-D
Best regards,
Carsten
User avatar
Scorphame
Posts:60
Joined:2010-09-02, 03:39
Location:Chillan Chile
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Scorphame » 2012-09-03, 23:18

hahaha no problem about that, In fact looks interesting solving all these stuff and help me to check the code and maybe understand what it does...

I'll pm you all the changes that I've made (and even the other previous steps before compilation on my fedora)

damn another one

Code: Select all

gcc -o ExtLibs/openal-soft/build/linux2/g++/debug/Alc/alsa.o -c -g -fno-strict-aliasing -fpic -DDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -DAL_BUILD_LIBRARY -IExtLibs/openal-soft/build/linux2/g++/debug -IExtLibs/openal-soft -IExtLibs/openal-soft/build/linux2/g++/debug/include -IExtLibs/openal-soft/include -IExtLibs/openal-soft/build/linux2/g++/debug/OpenAL32/Include -IExtLibs/openal-soft/OpenAL32/Include ExtLibs/openal-soft/Alc/alsa.c
gcc -o ExtLibs/openal-soft/build/linux2/g++/debug/Alc/bs2b.o -c -g -fno-strict-aliasing -fpic -DDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -DAL_BUILD_LIBRARY -IExtLibs/openal-soft/build/linux2/g++/debug -IExtLibs/openal-soft -IExtLibs/openal-soft/build/linux2/g++/debug/include -IExtLibs/openal-soft/include -IExtLibs/openal-soft/build/linux2/g++/debug/OpenAL32/Include -IExtLibs/openal-soft/OpenAL32/Include ExtLibs/openal-soft/Alc/bs2b.c
ExtLibs/openal-soft/Alc/alsa.c:33:28: fatal error: alsa/asoundlib.h: No such file or directory
compilation terminated.
gcc -o ExtLibs/openal-soft/build/linux2/g++/debug/Alc/oss.o -c -g -fno-strict-aliasing -fpic -DDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -DAL_BUILD_LIBRARY -IExtLibs/openal-soft/build/linux2/g++/debug -IExtLibs/openal-soft -IExtLibs/openal-soft/build/linux2/g++/debug/include -IExtLibs/openal-soft/include -IExtLibs/openal-soft/build/linux2/g++/debug/OpenAL32/Include -IExtLibs/openal-soft/OpenAL32/Include ExtLibs/openal-soft/Alc/oss.c
scons: *** [ExtLibs/openal-soft/build/linux2/g++/debug/Alc/alsa.o] Error 1
scons: building terminated because of errors.
I was looking for and I didn't find the asoundlib.h file
Simón Carreño AKA Scorphame.
Leader & Game Designer at HeXentic Games
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Compiling Cafu on Fedora 17 x64

Post by Carsten » 2012-09-04, 21:35

Scorphame wrote:I was looking for and I didn't find the asoundlib.h file
Did you install the (Fedora-equivalent for the) libasound2-dev package as suggested at http://www.cafu.de/wiki/cppdev:gettings ... x_packages ?
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests