How to compile Egoboo on GNU/Linux

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

Post Reply
arielenter
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Tue Oct 04, 2011 5:38 pm

How to compile Egoboo on GNU/Linux

Post by arielenter »

Hi everyone. I wanted to share how I managed to compile and play Egoboo 2.8.1 on my GNU/Linux distro. The name of the distro I'm currently using is Trisquel 5.0 Dagda and is based on Ubuntu 11.04.

I don't believe that the way I did it is the right or the easiest way to do it. I tried to find more info in Egoboo's site and the tar file but I guess I didn't have any luck understanding.

I'm not an expert when it comes to compiling, so if I missed something that I should have known from the beginning please tell me so. When it comes to compile a program, I usually just follow the instructions given in the tar file, and if there is a problem, usually programs are so well written that they tell you exactly what is wrong, and that's how I came out with this solution.

So here it goes:

Step 1: Download the tar file that holds the game. In my case it was called egoboo-2.8.1.tar.gz . Look for the newest one in the download section of egoboo's official website.

Step 2: Extract the content from the tar file. You will end up with a folder, in my case, it was called egoboo-2.8.1 .

Step 3: Open the egoboo-2.8.1, go to the doc folder and open up the file called Quickstart Guide.pdf . There you will find an Installation Guide, that will ask you to make sure you have the following packages installed on your system, so go ahead and do so:

• libsdl-image1.2-dev
• libsdl-mixer1.2-dev
• libsdl1.2-dev
• libsdl-ttf2.0-dev
• build-essential

Step 3: You will need to install libphysfs-dev also, other wise you will receive the following message during the compiling:

Code: Select all

egoboo_vfs.c:33:20: fatal error: physfs.h: No such file or directory compilation terminated.
This was kind of a problem to find out for me. Now, I know it is mention on DEPENDENCIES.txt, that PhysicsFS >= 2.0.0 was needed, and I know that ubuntu used not to have it, but now that most debian distro have it, why not mention it on the Quickstart Guide.pdf? I'll like to contribute if is needed.

Step 4: This was another bit of a problem for me. I found 3 make files in the tar file. At first I though that the most obvious was to use the one located in “/egoboo-2.8.1/src/game” but when I cd there and run make the following message appeared:

Code: Select all

make: Nothing to be done for `all'.
Maybe I could find out about this opening the makefile but as I said I'm not very skilled when it comes to compiling.

Anyway, what you got to do is open a terminal, cd to “egoboo-2.8.1/src” and run “make “.

If everything went right, you should now be able to find an executable file called “egoboo-2.x” in the “/egoboo-2.8.1/src/game” folder. Great job.

Step 5: Now, we could try to run this executable file, but all the respond we will get is the following:

Code: Select all

Initializing filesystem services...


Game directories are:

	Binaries: /usr/games/

	Data: /usr/share/games/egoboo-2.x

	User Data: /home/ariel/.egoboo-2.x

	Config Files: /usr/etc/egoboo-2.x
And the game won't start at all. Now, we will find a folder called “.egoboo-2.x” in our user home folder, and inside of it a folder called “debug” with a log file. If we open the log file we will find out what's going on:

Code: Select all

FATAL ERROR: Cannot find the file "setup.txt".
The problem is that egoboo is trying to find the necessary files to play in a place were they are not yet: /usr/games/ , /usr/share/games/egoboo-2.x , /home/ariel/.egoboo-2.x and /usr/etc/egoboo-2.x . All the necessary files for the game are still contained in the “egoboo-2.8.1” folder we subtract from the tar file.

Step 6: So the next thing we were suppose to do after we run “make” was to run “sudo make install” after and then all the files would had been copied to were they belong right? Wrong!!! If we do that we will get the following error:

Code: Select all

cp: cannot stat `./basicdat': No such file or directory

It seems to me that the files in the tar file are not arrange the way they are suppose to, but again I don't know much about compiling.

In any case, what you have to do is re arrange the files where they are suppose to go so that “sudo make install” copy them to were the have to go. To do this, just cut everything that is inside the “egoboo-2.8.1” folder exept “egoboo-2.8.1/src” and paste it on “egoboo-2.8.1/src”.

Go back to the terminal, make sure you are in “egoboo-2.8.1/src” and run “sudo make install”. Don't forget to use sudo, other wise you will receive the following message:

Code: Select all

install: cannot create regular file `/usr/games/egoboo-2.x': Permission denied
If everything went right you should see the following message: # Egoboo installation is finished

Step 6: Congratulations, you can now play egoboo, to do so, open a terminal an run “egoboo-2.x”.


Hope this tutorial helps some absentminded as my self. I don't understand why the files in the tar file are arranged the way they are, maybe there is a reason or it's a bug but it really doesn't matter, the game is AWESOME and I'm happy I was able to installed. I thank all the people that is working on this game, for making such a cool jewel or Free software. I hope I'll be able to contribute some how in the near future. Thank you all.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: How to compile Egoboo on GNU/Linux

Post by bgbirdsey »

Thanks for your interest in Eboboo.

I don't know what was in the README.linux in the 2.8.2 distro, but what should have been in it is this:
Egoboo is set up to use the Linux make command to build and install Egoboo. Simply type

Code: Select all

make all
sudo make install
and the game will be built and installed. This method works essentially the same as downloading and installing the files using a package manager, and similarly requires super-user password.

If you do not have a sudo password, you can install Egoboo to a local directory by defining a PREFIX environmental variable on the command-line. A common usage would be

Code: Select all

make all PREFIX=$HOME/.local
make install PREFIX=$HOME/.local
which will build and install the game into your own home folder. To start the game, execute the shell script called egoboo-2.x in the home folder.

The program requires certain packages and other settings to build. A comprehensive list can be found in the DEPENDENCIES file.

If you experience problems, please ask in the Egoboo Forums at http://egoboo.sourceforge.net/forum/. Thank you.

why not mention it on the Quickstart Guide.pdf
  1. because we are trying to make the linux build environment as similar as possible to other build environments (i.e. the build and install instructions being placed in a file called "README.linux). I also hate repeating myself for the 3 READMEN files and so decided to create the DEPENDENCIES.txt file.
  2. because the "Quickstart Guide" is a contributed document, and the person who contributed it is not maintaining it.
arielenter
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Tue Oct 04, 2011 5:38 pm

Re: How to compile Egoboo on GNU/Linux

Post by arielenter »

Thanks bgbirdsey for such a quick respond.

I did read README.linux from the tar file, but I just think that there were somethings that could have been mention too:

For instance, before you run "make all" you should cd to "egoboo-2.8.1/src" . Now, I really don't know what src stands for, maybe it was supposes to be obvious, but then there are noobs like me jejeje.

Second, I'm pretty sure that the makefile should be edited, so that when you run "sudo make install" it finds the installation files where they currently are (see my step 6 on my post).

And lastly most debian system today have libphysfs-dev on they repos, why not mention it along with all the others (libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl1.2-dev, libsdl-ttf2.0-dev and build-essential).

Egoboo is such a great game, that this kind of things are probably the least important to worry about for the developers. That's why I want to contribute some how, with this little things that don't require a very high level of knowledge. I personally like how the quick guide.pdf was coming out, if you believe that I wright OK on English I could contribute updating it, or adding things to README.linux .

Anyway, I'll be around playing the game and try to find ways I can help. See you all.
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: How to compile Egoboo on GNU/Linux

Post by penguinflyer5234 »

src = source; at the time README.linux was written Ubuntu (and probably Debian) didn't have PHYSFS 2.0. README.linux has not been really updated since.
...
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: How to compile Egoboo on GNU/Linux

Post by bgbirdsey »

Again, thanks for your interest in egoboo. The 2.8.1 release should be replaced sometime soon, but there are some significant issues that are being worked on at the moment.
For instance, before you run "make all" you should cd to "egoboo-2.8.1/src" . Now, I really don't know what src stands for, maybe it was supposes to be obvious, but then there are noobs like me jejeje.

Second, I'm pretty sure that the makefile should be edited, so that when you run "sudo make install" it finds the installation files where they currently are (see my step 6 on my post).
This is absolutely not true. You should be running make and make install from the root directory of the egoboo release ( "[wherever you un-gzipped the file]/egoboo-2.8.1" ). This is standard linux procedure to build and install anything. If there is a problem with this, then there is a bug in the Makefile.

The real solution is for the program to be picked up by a Debian distro, but that is still just a dream...
And lastly most debian system today have libphysfs-dev on they repos, why not mention it along with all the others (libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl1.2-dev, libsdl-ttf2.0-dev and build-essential).
  1. libphysfs-dev was available via aptitude at the time that the distribution was made, but only version 1.x.
  2. build-essential should not be a necessary dependency. This is only necessary for building Debian distros.
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: How to compile Egoboo on GNU/Linux

Post by penguinflyer5234 »

Silly bgbirdsey, build-essential includes all of the gcc, make, and the like into one easy package.
(We have to include gcc and make somehow, so I chose build-essential)
...
arielenter
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Tue Oct 04, 2011 5:38 pm

Re: How to compile Egoboo on GNU/Linux

Post by arielenter »

Thanks again bgbirdsey for all your responses. I feel very welcome to the community thanks to you.

And you are totally right, this is the basic GNU/linux procedure to build and install anything. As I said I'm not very experienced and I apology if I jumped to conclusions without knowing very well what I was doing.

Unfortunately now that I've try to run “make all” from the root directory of egoboo-2.8.1 (“/egoboo-2.8.1”) I get the following message:

Code: Select all

make: *** No rule to make target `all'.  Stop.
Only when I run “make all” from the src sub directory (“/egoboo-2.8.1/src”) I manage to get it to work. But again it could be just me, if someone could go ahead and test it I will truly appreciate it.

In my experience compiling other stuffs, some times running “make” by it self works as well, but when I try to run “make” from egoboo-2.8.1 root directory (“/egoboo-2.8.1”) I get the following message:

Code: Select all

make: *** No targets specified and no makefile found.  Stop.
When I read this message, I jumped to the conclusion that a makefile was needed to start compiling. Could it be that a makefile is needed on egoboo-2.8.1's root directory installation tar? Once again I'm just jumping to conclusions without knowing. I'm sure there is a reason for structuring the tar file the way it is and that's why “make all” should work.

In any case, the reason I tried to run “make all” from the src subdirectory (“/egoboo-2.8.1/src”) is because I found a makefile there, and since it worked, that's why I jumped to all this conclusions, once again uninformed and I apology again.

I appreciate the time you have spent on me. I think this is the only way I could learn and give a more informed appreciation next time, so I will truly appreciate any short explanation over this matter that anyone could give me. Thank you.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: How to compile Egoboo on GNU/Linux

Post by bgbirdsey »

Try using just "make" instead of "make all". Make is supposed to treat these as somewhat equivalent.

Without that, it is likely that you will not be able to run the program since the PREFIX environment variable will not be defined when compiling file_nix.c and the program will look for the datafiles in the wrong place, and possibly might install them to an incorrect directory due to the same reason.
arielenter
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Tue Oct 04, 2011 5:38 pm

Re: How to compile Egoboo on GNU/Linux

Post by arielenter »

Thanks again for your respond bgbirdsey .

I just have though why I had to move the files around on step 6 in my original post upstairs, it's because I was suppose to run "make" on the root directory and not on the src subdirectory.

But still, when I try to run "make all" or "make" on the root directory I get either of this responses

Code: Select all

make: *** No rule to make target `all'.  Stop.

make: *** No targets specified and no makefile found.  Stop.
Why is that? am I doing something wrong? is there a problem with egoboo 2.8.1?
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: How to compile Egoboo on GNU/Linux

Post by bgbirdsey »

The make file might broken, or you might need to do a "make clean" before trying to build it again.
arielenter
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Tue Oct 04, 2011 5:38 pm

Re: How to compile Egoboo on GNU/Linux

Post by arielenter »

Well, I'm pretty sure that something is wrong. When I run "make clean" on the root directory I get the following message:

Code: Select all

make: *** No rule to make target `clean'.  Stop.
Mean while my work around will work for now. I'm going to see if I can get my distro to include egoboo in the repos.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: How to compile Egoboo on GNU/Linux

Post by bgbirdsey »

Yeah, I think that Makefile is fubar. I can possibly send you one that will work with the "egoboo-2.8.1/game/Makefile" and "egoboo-2.8.1/enet/Makefile". if you are comfortable editing the file, you can get a copy of the latest one from the files browser on sourceforge, or directly from the svn.
Post Reply