Compilation troubles

Non-platform specific questions.

Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 8:47 am

Hello.
I'm rather new to Linux, so it can be a noobish question.

I did not get how to compile GE. I got llvm and llvm-gcc installed, i got GE sources from SVN, placed the RakNet sources into RakNet folder and compiled them (for what? :D), then i tried to compile the program itself. I got some errors about misplaced files andone about mistakes in code. I corrected some of them, but there are new that I can't correct.

First, there was an error about misplaced awe_voice.h, I copied it to the folder compiler said.
Second, there was an error about RakNet/NatPunchthrough.o that had not compilation properties, i just removed it from Makefile.
And third, there was an error about mistake in EiC/src/preproc.h's code that i couldn't correct.

May be there are other solutions than I did.

P.S. OS is Ubuntu 9.10 amd64
P.P.S. Sorry for my bad English, i'm Russian :)
Last edited by PrimuS on Sat Oct 31, 2009 2:50 pm, edited 1 time in total.
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sat Oct 31, 2009 12:49 pm

Please, post the error log.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 2:50 pm

One minute, i forgot that :D
First:
make[1]: Entering directory `/home/primus/gesrc/Game Editor/SDL/SDL_mixer/VisualC/native_midi'
llvm-gcc -emit-llvm -c -c ../../native_midi_gpl/emumidi.c -o ../../../../output/emumidi.o -I"../../../SDL/include/" -I"../.." -I"../../native_midi" -I"../../native_midi_gpl" -DLLVM
In file included from ../../native_midi_gpl/emumidi.h:16,
from ../../native_midi_gpl/emumidi.c:21:
../../native_midi_gpl/playmidi.h:58:30: error: linux/awe_voice.h: No such file or directory
After you copy native_midi_gpl/awe_voice.h to native_midi_gpl/linux/awe_voice.h it compiles.

Second:
make -f makefile.raknet -C RakNet/ 'BUILD_TYPE=' 'CC=llvm-gcc -emit-llvm -c' 'TARGET=-DLLVM'
make[1]: Entering directory `/home/primus/gesrc/Game Editor/RakNet'
make[1]: *** No rule to make target `Source/NatPunchthrough.cpp', needed by `../output/RakNet/NatPunchthrough.o'. Stop.
make[1]: Leaving directory `/home/primus/gesrc/Game Editor/RakNet'
make: *** [all] Error 2
After you edit the RakNet/makefile.raknet and delete /output/RakNet/NatPunchthrough.o from OBJ list, it compiles

Third:
../src/preproc.c:315: error: conflicting types for 'getline'
/usr/include/stdio.h:653: error: previous declaration of 'getline' was here
../src/preproc.c: In function 'EiC_prolineStringFile':
../src/preproc.c:617: warning: return discards qualifiers from pointer target type
make[1]: *** [../../../output/preproc.o] Error 1
make[1]: Leaving directory `/home/primus/gesrc/Game Editor/gameEngine/EiC/Visual'
make: *** [all] Error 2
I did not get how to correct this. There are many functions used by preproc.c so i cant find where the second declaration of getline is. :)
Log attached to the post.
Attachments
log.txt.tar.gz
(2.62 KiB) Downloaded 163 times
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sat Oct 31, 2009 3:51 pm

Just replace getline with eic_getline in the preproc.c file (I will update the repository)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 4:02 pm

Thank you. I'll try it.
Also, don't forget about NatPunchtrough.o.

EDIT:
Actually, it worked, but there is another error :)

lvm-gcc -emit-llvm -c ' 'TARGET=-DLLVM'
make[1]: Entering directory `/home/primus/gesrc/Game Editor/kyra/engine'
llvm-gcc -emit-llvm -c -c action.cpp -o ../../output/engine/action.o -I"../../SDL/SDL/include" -I"../../SDL/SDL_image" -DLLVM -D_LIB
../util/glmap.h: In constructor 'GlPointerHash<T>::GlPointerHash(T) [with T = KrTexture**]':
../util/glmap.h:523: instantiated from 'bool GlMap<KEY, VALUE, HASH>::Add(const KEY&, const VALUE&) [with KEY = KrTexture**, VALUE = char, HASH = GlPointerHash<KrTexture**>]'
ogltexture.h:115: instantiated from here
../util/glmap.h:141: error: cast from 'KrTexture**' to 'U32' loses precision
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sat Oct 31, 2009 4:39 pm

Are you using a 64 bit system?
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 4:41 pm

Yeah, Ubuntu 9.10 amd64, i wrote that in the first post.
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sat Oct 31, 2009 5:28 pm

The Game Editor code needs to be reviewed to match a 64bit system requeriments.
I think is not just change the variable declarations (like changing U32 to U64 or something), but is the first thing to do!

If you want to try, you are welcome :-)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 5:36 pm

I'll see.
If i will correct something, I'll post solution and/or binaries here :D
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sat Oct 31, 2009 7:10 pm

Thanks :-)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby PrimuS » Sat Oct 31, 2009 7:31 pm

Eh, changing U32 to U64 corrected that error %)
Now it says
painter.cpp: In function 'void KrPaint16_Alpha_NoAlpha(KrPaintInfo*, void*, void*, char, int, const KrColorTransform&)':
painter.cpp:3866: error: cast from 'void*' to 'int' loses precision

Thinking...
I never even saw C++ code. But i will do my best :)

BTW, who is the coder of GE? :D

EDIT:
I did not get it to work. I need CPP-coder here :D
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby makslane » Sun Nov 08, 2009 9:18 pm

PrimuS wrote:BTW, who is the coder of GE?


Me!
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Compilation troubles

Postby speckford123 » Mon Nov 09, 2009 12:28 pm

Mak is the almighty creator of GE, all himself with no team to help him, I'm still amazed at how one person made such a great engine. Once I learn more about programming I hope I might be able to help with the new source code :D
...........the new engine might be finished before I'm good enough to help, but If not, I'll take a look :lol:
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Re: Compilation troubles

Postby PrimuS » Tue Nov 10, 2009 3:28 pm

Yay, good.
I'll try to do something with that.
I corrected some errors, but there are new, they are not connected with architecture, its some parts of code that newer versions of gcc and other compilers mark as errors :D
BTW, Makslane is really almighty if he did the entire project himself only :)
PrimuS
 
Posts: 11
Joined: Sat Oct 31, 2009 8:34 am
Score: 0 Give a positive score

Re: Compilation troubles

Postby jonaternet » Sun Nov 22, 2009 1:55 am

Hi everyone,

I'm also stuck at the same step. I also use Ubuntu 9.10 "karmic" amd64
Here are the steps I followed, and the errors I met and solved :
Code: Select all
svn co https://game-editor.svn.sourceforge.net/svnroot/game-editor/trunk "Game_Editor"
cd Game-Editor
mkdir llvm
cd llvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk .
cd tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ..
./configure --enable-optimized
make && sudo make install
cd tools/clang
make && sudo make install
cd ../../../RakNet
wget http://www.jenkinssoftware.com/raknet/downloads/RakNet-3.711.zip
unzip RakNet-3.711.zip
cd RakNet-3.711
./bootstrap
./configure --enable-optimized
make && sudo make install
aptitude install llvm-gcc-4.2  ## was not installed.
cd ~/Game*
make

## First error : couldn't find awe_voice.h
cd SDL/SDL_mixer/native_midi_gpl/
mkdir linux && mv awe_voice.h linux/
cd ../../../
make

## Second error  :  Due to the new version of RakNet,
ln RakNet/Source/NatPunchthroughClient.cpp RakNet/Source/NatPunchthrough.cpp

## Third......
cd kyra/util
perl -i -p -e 's|U32|U64|' "glmap.h"
make

## Then :
make[1]: entrant dans le répertoire « /root/Desktop/Game_Editor/kyra/engine »
llvm-gcc -emit-llvm -c          -c painter.cpp -o ../../output/engine/painter.o -I"../../SDL/SDL
/include" -I"../../SDL/SDL_image"  -DLLVM -D_LIB 
painter.cpp: In function 'void KrPaint16_Alpha_NoAlpha(KrPaintInfo*, void*, void*, char, int, const KrColorTransform&)':
painter.cpp:3866: error: cast from 'void*' to 'int' loses precision
painter.cpp:3866: error: cast from 'void*' to 'int' loses precision
make[1]: *** [../../output/engine/painter.o] Erreur 1
make[1]: quittant le répertoire « /root/Desktop/Game_Editor/kyra/engine »
make: *** [all] Erreur 2


I'm so sad.
I have to use a whole 32-bits Lenny (wich still includes libstdc++5) VM in virtualbox, and use the linux binary. My old computer (sempron64) doesn't like it...
Last edited by jonaternet on Sun Nov 22, 2009 6:06 pm, edited 1 time in total.
jonaternet
 
Posts: 1
Joined: Sat Nov 21, 2009 2:01 am
Score: 0 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest