Exult Logo
 
Home | Download | Documentation | FAQ | Studio | Screen Shots
Development | Discussion | About Us | Letters | History | Links
 
Exult Discussion
Before posting, make sure you've read the FAQ and searched the message board for previous discussions. When reporting problems/bugs, please include details about your setup (Exult version, OS, sound and video cards).

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Irdin (---.localdomain)
Date:   10-22-09 17:48

Hello there!

To successfully configure Exult 1.2 under Ubuntu 9.04 (gcc 4.3.3) I needed the following packages:
libsdl1.2-dev
libsdl-mixer1.2
libsdl-mixer1.2-dev

All of them can be found in ubuntu's main repository.

Running 'make' however resulted in an error:

In file included from Flex.cc:27:
Flex.h: In copy constructor 'Flex::Flex(const Flex&)':
Flex.h:52: error: 'memcpy' is not a member of 'std'
Flex.h:53: error: 'memcpy' is not a member of 'std'
Flex.h: In member function 'Flex& Flex::operator=(const Flex&)':
Flex.h:60: error: 'memcpy' is not a member of 'std'
Flex.h:61: error: 'memcpy' is not a member of 'std'
In file included from Flex.cc:35:
utils.h: In function 'uint16 Read2(FILE*)':
utils.h:84: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:85: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h: In function 'uint16 Read2high(FILE*)':
utils.h:127: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:128: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h: In function 'uint32 Read4(FILE*)':
utils.h:174: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:175: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:176: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:177: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h: In function 'uint32 Read4high(FILE*)':
utils.h:222: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:223: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:224: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
utils.h:225: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
In file included from Flex.cc:36:
databuf.h: In member function 'virtual void FileDataSource::read(char*, int)':
databuf.h:198: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
Flex.cc: In member function 'virtual char* Flex::retrieve(uint32, size_t&)':
Flex.cc:103: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
make[3]: *** [Flex.lo] Error 1

I'm new to this and would be very grateful for some help or leads.

Reply To This Message
 
 Re: Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Marzo Sette Torres Junior 
Date:   10-23-09 02:00

For starters, I feel I must warn you that Exult 1.2 isn't really supported anymore. This issue, along many, many, many others, have been fixed in the 1.4.x branch.

With that out of the way: in files/Flex.h, add a new line at around line 25 containing
#include <cstring>

This should take care of the errors above.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Irdin (---.localdomain)
Date:   10-25-09 14:58

Thank you for your advice!
Since putting the line '#include <cstring>' into Flex.h resulted in several other errors during compilation I now downloaded the SVN source code snapshot.

I installed everything listed in INSTALL plus 'byacc' and 'FLEX' which are apparently required to compile EXULT.

For other Ubuntu/Debian users:
Read this thread to successfully compile exult 1.4.05 from the svn sourcecode:
http://exult.sourceforge.net/forum/read.php?f=1&i=298388&t=275790

It would have saved me a great deal of time if all of these requirements would have been part of your project's docs. May I suggest you add the '-lx11' part to your faq?

Reply To This Message
 
 Re: Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Marzo Sette Torres Junior 
Date:   10-25-09 17:38

Quote:

byacc and 'FLEX'

Bison and flex are required only for the usecode compiler, and should not be needed unless you are going to compile it; I don't know if byacc is an adequate substitute for bison.

Re: the "-lX11" bit: I use Ubuntu 9.04 myself, and I haven't needed to use that since I switched from 8.10; it is odd that you are needing to use it.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Irdin (---.localdomain)
Date:   10-25-09 20:37

I do not know that much about compiling but I'm learning.

bison: A parser generator that is compatible with YACC
byacc: public domain Berkeley LALR Yacc parser generator

Since both seem to work, I guess any YACC compatible parser generator would do?

I don't get your statement about usecode.
I just used gcc to compile exult from the svn-sourcecode I downloaded.
make resulted in an error (which I could reproduce on demand) and after
having installed both byacc and flex this error didn't occur anymore.
Instead, 'make' quit after:
undefined reference to `XChangeProperty'

So I altered this line in the makefile:
CXXFLAGS = -g -O2
to:
CXXFLAGS = -g -O2 -lX11

make then was successful.

Much of this is beyond my scope. I hope at least you and others can learn something from my problems.

Exult runs on my machine now and everybody involved has my gratitude.

Thanks Marzo!

Reply To This Message
 
 Re: Compiling-Error: Exult 1.2 with gcc 4.3.3 (Ubuntu 9.04)
Author: Marzo Sette Torres Junior 
Date:   10-26-09 02:13

Quote:

bison: A parser generator that is compatible with YACC
byacc: public domain Berkeley LALR Yacc parser generator

Since both seem to work, I guess any YACC compatible parser generator would do?

Not quite; byacc is a reimplementation of yacc, while bison is compatible with yacc. Some extensions of bison over yacc may not work in byacc, and I don't know if ucc uses any of them (and can't guarantee it won't in the future).

Quote:

I don't get your statement about usecode.

Usecode is a byte-code virtual machine that drives the game plot. The Exult source includes the source ucc, the usecode c compiler, which compiles a c-like language into that byte-code. This can be used to create usecode patches to alter the way the game works. Only ucc requires bison and flex.

But now that I think, it is enabled by default.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 Go to Top  |  Go to Topic  |  Threaded View   Newer Topic  |  Older Topic 


 
 Reply To This Message
 Your Name:
 Your E-mail:
 Subject:
 Subject:
   
 
SourceForge   phorum.org
 
Problems with Exult or this webpage? Contact us.
Last modified: 24 Oct 2001(GMT)