Jump to content
Eternal Lands Official Forums
Roja

Help me compile the client!

Recommended Posts

Hi, I was able to compile the client a couple of times last week following the great windows compilation guide. I was getting a client freeze entering Aeth Aelfan storage. A couple of days later I updated the cvs and tried to compile with the skybox turned off to see if that was causing the freeze because a default cvs version worked fine. I couldn't get it to compile and posted the error to the current cvs error thread. Grum replied that the error was unusual but probably on my end :P So I wiped everything and started over from scratch but now I get a different error :P Any help would be greatly appreciated :)

In file included from 3d_objects.c:4:
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: warning: type defaults to `int' in declaration of `Uint8'

C:/Dev-Cpp/Include/SDL/SDL_active.h:51: warning: `__cdecl__' attribute only applies to function types

C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: syntax error before "SDL_GetAppState"

In file included from cache.h:9,
			 from e3d_object.h:9,
			 from 3d_objects.h:9,

			 from 3d_objects.c:5:
C:/Dev-Cpp/Include/SDL/SDL_types.h:48: error: 'Uint8' redeclared as different kind of symbol

C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: previous declaration of 'Uint8' was here

C:/Dev-Cpp/Include/SDL/SDL_types.h:48: error: 'Uint8' redeclared as different kind of symbol

C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: previous declaration of 'Uint8' was here

3d_objects.c: In function `draw_3d_objects':

3d_objects.c:261: warning: implicit declaration of function `SDL_GetAppState'

make.exe: *** [3d_objects.o] Error 1

Execution terminated

Share this post


Link to post
Share on other sites

In file included from 3d_objects.c:4:
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: warning: type defaults to `int' in declaration of `Uint8'

Ok, now I seriously begin to think something's broken in your SDL. Can you check SDL_active.h, if it contains the line

#include "SDL_stdinc.h"

If it does, check if SDL_stdinc.h contains a definition for Uint8, something like

typedef uint8_t		 Uint8;

If it doesn't, please check your version of the SDL headers, in SDL_version.h look for something like

#define SDL_MAJOR_VERSION	   1
#define SDL_MINOR_VERSION	   2
#define SDL_PATCHLEVEL		  11

Share this post


Link to post
Share on other sites

SDL_active.h doesn't have that #include. This is what is in my SDL_version.h

 

#define SDL_MAJOR_VERSION	1
#define SDL_MINOR_VERSION	2
#define SDL_PATCHLEVEL		8

 

It's from the SDL packages linked in the windows compilation guide.

 

Edit:

I think I was able to update the SDL to patchlevel 12 I don't think I did it right so I reinstalled the windows compilation guide from scratch again and will post any other errors here as mentioned below :P Thanks for your help.

Edited by Kazoo

Share this post


Link to post
Share on other sites

Okay, I've updated cvs, and 3d_objects.c should probably compile now. I wouldn't be surprised if you'd run into similar problems with other files though, so post here if you do.

 

Placid (or whoever's responsible for those DevPak), any chance of updating the SDL file to something more recent? Say 1.2.11 or 1.2.12?

Share this post


Link to post
Share on other sites

I have another similar problem this time in actors.c

In file included from actors.c:4:
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: warning: type defaults to `int' in declaration of `Uint8'
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: warning: `__cdecl__' attribute only applies to function types
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: syntax error before "SDL_GetAppState"
In file included from C:/Dev-Cpp/Include/SDL/SDL_main.h:61,
			 from C:/Dev-Cpp/Include/SDL/SDL_mutex.h:36,
			 from actors.h:9,
			 from actors.c:5:
C:/Dev-Cpp/Include/SDL/SDL_types.h:48: error: 'Uint8' redeclared as different kind of symbol
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: previous declaration of 'Uint8' was here
C:/Dev-Cpp/Include/SDL/SDL_types.h:48: error: 'Uint8' redeclared as different kind of symbol
C:/Dev-Cpp/Include/SDL/SDL_active.h:51: error: previous declaration of 'Uint8' was here
actors.c: In function `draw_actor_banner':
actors.c:201: warning: implicit declaration of function `SDL_GetAppState'
make.exe: *** [actors.o] Error 1

Share this post


Link to post
Share on other sites

Heads up about a Linux-y compile issue:

 

For the first time ever I had to add -lGLcore to successfully link the client.

 

I use Fedora Core 6 with nvidia drivers and livna repositories. I have seen complaints of errors like mine on message boards from users of other Red Hat based distros. This is likely related to some Fedora update funkiness... EL code that I was working on compiled one month and not the next with only a few "yum update"s in between.

 

The errors I got were all about missing symbols like _nv#### (can't remember the exact numbers).

 

edited for spelling and clarity

Edited by emajekral

Share this post


Link to post
Share on other sites

I have packaged the latest and greatest versions of the three SDL libraries we use in the project.

 

Here are some temporary links:

SDL-1.2.12

SDL_image-1.2.6

SDL_net-1.2.7

 

If you have followed the official compile guide then you can get things working easily:

  • open the DevCpp package manager (Tools>Package Manager)
  • remove the 3 SDL packages you find there
  • download all three packages in this post and install them

I have tested these packs as described and from a clean install. Everything *should* work for you. Let me know if any thing goes wrong.

 

There were some errors in CVS at the time I first wrote this. See this for details. I think they are fixed now.

 

edited for clarity

Edited by emajekral

Share this post


Link to post
Share on other sites

After reinstalling my OS I can't compile client, but I can run already compiled binary. Any special dependencies I forgot to install?

 

[hendrik@arvut elc]$ make -f Makefile.linux 
gcc -march=i686 -Wall -Wdeclaration-after-statement -O0 -ggdb -pipe -DLINUX -DELC  -DAFK_FIX  -DALPHA_ACTORS  -DCLICKABLE_CONTINENT_MAP  -DCOUNTERS  -DCUSTOM_LOOK  -DDEBUG  -DEYE_CANDY  -DFONTS_FIX  -DFUZZY_PATHS  -DIDLE_FIX  -DMASKING  -DMINIMAP  -DNEW_ACTOR_ANIMATION  -DNEW_SOUND  -DNEW_TEX  -DNEW_WEATHER  -DOGG_VORBIS  -DOPTIONS_I18N  -DPARANOID_CAMERA  -DPNG_SCREENSHOT  -DSFX  -DSIMPLE_LOD  -DSKY_FPV_CURSOR  -DUSE_INLINE  -DZLIB -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libxml2 -fno-strict-aliasing  -c -o sound.o sound.c
sound.c: In function 'stop_all_sounds':
sound.c:2934: warning: unused variable 'i'
sound.c: In function 'print_sound_types':
sound.c:4307: error: 'struct <anonymous>' has no member named 'sound'
make: *** [sound.o] Error 1

Share this post


Link to post
Share on other sites
sound.c:4307: error: 'struct <anonymous>' has no member named 'sound'

Dangit. Nah, that's a bug. Sorry.

 

Patch will be in shortly.

Share this post


Link to post
Share on other sites

On my x86_64 i got the following error:

 

g++ -march=athlon64 -Wall -O0 -ggdb -pipe -DLINUX -DELC -DAFK_FIX -DALPHA_ACTORS -DATI_9200_FIX -DAUTO_UPDATE -DCOUNTERS -DCUSTOM_LOOK -DCUSTOM_UPDATE -DEYE_CANDY -DFONTS_FIX -DFUZZY_PATHS -DIDLE_FIX -DMASKING -DNEW_ACTOR_ANIMATION -DNEW_TEX -DOGG_VORBIS -DOPTIONS_I18N -DPNG_SCREENSHOT -DSFX -DSIMPLE_LOD -DUSE_INLINE -DZLIB -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libxml2 -fno-strict-aliasing -c -o eye_candy/eye_candy.o eye_candy/eye_candy.cpp

eye_candy/eye_candy.cpp: In member function 'virtual void ec::Shape::draw()':

eye_candy/eye_candy.cpp:147: error: cast from 'void*' to 'Uint32' loses precision

make: *** [eye_candy/eye_candy.o] Error 1

 

:P

 

seems to be 64bit related ..

 

-Erdie

Share this post


Link to post
Share on other sites

Enable X86_64 in make.conf.

 

It is enabled, i got the message afterthat. Without enabling this, the compile breaks at once. Now it runs a certain time before this error appears.

 

thanks

Erdie

Share this post


Link to post
Share on other sites
-DLINUX -DELC -DAFK_FIX -DALPHA_ACTORS -DATI_9200_FIX -DAUTO_UPDATE -DCOUNTERS -DCUSTOM_LOOK -DCUSTOM_UPDATE -DEYE_CANDY -DFONTS_FIX -DFUZZY_PATHS -DIDLE_FIX -DMASKING -DNEW_ACTOR_ANIMATION -DNEW_TEX -DOGG_VORBIS -DOPTIONS_I18N -DPNG_SCREENSHOT -DSFX -DSIMPLE_LOD -DUSE_INLINE -DZLIB -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
It is enabled, i got the message afterthat. Without enabling this, the compile breaks at once. Now it runs a certain time before this error appears.
It doesn't look to me to be enabled. There should be a -DX86_64 compile flag in that list.

 

This is the block from 144 to 148:

144  #ifdef X86_64
145	srand((Uint32)(Uint64)(void*)this);
146  #else
147	srand((Uint32)(void*)this);
148  #endif

You don't have X86_64 enabled.

Share this post


Link to post
Share on other sites

Yes, you may hit me. I enabled it in make.defaults but not in make.conf. I did not know that this must be switched twice. Now it compiles, thank you.

 

-Erdie

Edited by Erdie

Share this post


Link to post
Share on other sites
Yes, you may hit me. I enabled it in make.defaults but not in make.conf. I did not know that this must be switched twice. Now it compiles, thanks you.

No probs.

 

It is *meant* to automagically update make.conf if make.defaults is changed, however on some systems it doesn't work. Dev-C++ is a good example of this. If make.conf isn't updated, then you manually need to update it, and make.defaults is ignored.

Share this post


Link to post
Share on other sites

Now I get errors like this:

 

io/elfilewrapper.cpp: In function `CalCoreAnimation* CalLoader_ELLoadCoreAnimation(CalLoader*, const char*)':
io/elfilewrapper.cpp:151: error: `get' has not been declared
io/elfilewrapper.cpp:151: error: request for member of non-aggregate type before '(' token
io/elfilewrapper.cpp:151: error: `explicitIncRef' undeclared (first use this function)
io/elfilewrapper.cpp:151: error: (Each undeclared identifier is reported only once for each function it appears in.)
io/elfilewrapper.cpp: In function `CalCoreMaterial* CalLoader_ELLoadCoreMaterial(CalLoader*, const char*)':
io/elfilewrapper.cpp:163: error: `get' has not been declared
io/elfilewrapper.cpp:163: error: request for member of non-aggregate type before '(' token
io/elfilewrapper.cpp:163: error: `explicitIncRef' undeclared (first use this function)

io/elfilewrapper.cpp: In function `CalCoreMesh* CalLoader_ELLoadCoreMesh(CalLoader*, const char*)':
io/elfilewrapper.cpp:175: error: `get' has not been declared
io/elfilewrapper.cpp:175: error: request for member of non-aggregate type before '(' token
io/elfilewrapper.cpp:175: error: `explicitIncRef' undeclared (first use this function)
io/elfilewrapper.cpp: In function `CalCoreSkeleton* CalLoader_ELLoadCoreSkeleton(CalLoader*, const char*)':
io/elfilewrapper.cpp:187: error: `get' has not been declared
io/elfilewrapper.cpp:187: error: request for member of non-aggregate type before '(' token
io/elfilewrapper.cpp:187: error: `explicitIncRef' undeclared (first use this function)
io/elfilewrapper.cpp: In function `int CalCoreModel_ELLoadCoreAnimation(CalCoreModel*, const char*)':
io/elfilewrapper.cpp:199: error: `CalCoreAnimationPtr' undeclared (first use this function)
io/elfilewrapper.cpp:199: error: expected `;' before "pCoreAnimation"
io/elfilewrapper.cpp:201: error: `pCoreAnimation' undeclared (first use this function)
io/elfilewrapper.cpp: In function `int CalCoreModel_ELLoadCoreMaterial(CalCoreModel*, const char*)':
io/elfilewrapper.cpp:218: error: `CalCoreMaterialPtr' undeclared (first use this function)
io/elfilewrapper.cpp:218: error: expected `;' before "pCoreMaterial"
io/elfilewrapper.cpp:220: error: `pCoreMaterial' undeclared (first use this function)
io/elfilewrapper.cpp: In function `int CalCoreModel_ELLoadCoreMesh(CalCoreModel*, const char*)':
io/elfilewrapper.cpp:237: error: `CalCoreMeshPtr' undeclared (first use this function)
io/elfilewrapper.cpp:237: error: expected `;' before "pCoreMesh"
io/elfilewrapper.cpp:239: error: `pCoreMesh' undeclared (first use this function)
io/elfilewrapper.cpp: In function `CalBoolean CalCoreModel_ELLoadCoreSkeleton(CalCoreModel*, const char*)':
io/elfilewrapper.cpp:256: error: `CalCoreSkeletonPtr' undeclared (first use this function)

io/elfilewrapper.cpp:256: error: expected `;' before "pCoreSkeleton"
io/elfilewrapper.cpp:258: error: `pCoreSkeleton' undeclared (first use this function)

make.exe: *** [io/elfilewrapper.o] Error 1

Execution terminated

Share this post


Link to post
Share on other sites

If you use Visual Studio, open cal3d.dsw, click Yes and/or Ok a couple times and then compile the Cal3D project. You'll find the compiled binaries in a Bin folder, and you'll also need the include files from the src\cal3d folder. If you use some other compiler .... no idea :happy:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×