Jump to content
XCOMUFO & Xenocide

Compilation On Ubuntu Linux


unclouded

Recommended Posts

i had to install these extra libs:

 

* libsqlite3-dev

* libaldmb0-dev

* libdumb0-dev

 

and had to edit "makefile" like so:

 

# LIBS := -static $(LIBS) -lNL ${shell allegro-config --libs}

LIBS := -static $(LIBS) -lNL

SERVER_LIBS += -static -lNL -pthread

else

# LIBS += -lNL -pthread ${shell allegro-config --libs}

LIBS += -lNL -pthread

 

..then "make" worked for me

 

i got:

 

Error: set_gfx_mode() failed (Can not set video mode).

 

..because my laptop can -only- do 1024x768, so editing ufo2000.ini to use this resolution solved the problem

Edited by Serge
Link to comment
Share on other sites

Hi, I hope to remove sqlite dependency soon, only server needs it. Also the game can be compiled without DUMB using 'make no_dumbogg=1'

 

By the way, does compilation of the game really fail without tweaking makefile? What kind of linux are you using?

Link to comment
Share on other sites

By the way, does compilation of the game really fail without tweaking makefile? What kind of linux are you using?

 

On Ubuntu 5.04 (Hedgehog):

 

$ make

..snip..

/usr/bin/ld: cannot find -lXxf86dga

collect2: ld returned 1 exit status

make: *** [ufo2000] Error 1

$ allegro-config --libs

-L/usr/lib -L/usr/X11R6/lib -lalleg-4.1.15 -lm -lpthread -lXxf86dga -lXxf86vm -lXpm -lXext -lX11 -ldl

 

No file named ^.*Xxf86dga.*$ is available in -any- package for Debian so it's not as if I could install a package and the error would go away. I thought that Allegro's dependencies should already be managed by Debian's package management system so that's why I tried without. ufo2000 certainly links and runs without error when the allegro-config jazz is removed from makefile.

Link to comment
Share on other sites

Looks like allegro package is just broken. Probably it was compiled with that Xxf86dga support, but that Xxf86dga package is not installed in the system. Anyway, 4.1.15 is an old unstable version of allegro. The best version now is 4.2.0.

 

By the way, as you are using ubuntu/debian, can you try experimenting with creation of a .deb package for ufo2000? Preferably making .deb package should be supported as one of the targets in the makefile.

Link to comment
Share on other sites

Looks like allegro package is just broken. Probably it was compiled with that Xxf86dga support, but that Xxf86dga package is not installed in the system. Anyway, 4.1.15 is an old unstable version of allegro. The best version now is 4.2.0.

 

By the way, as you are using ubuntu/debian, can you try experimenting with creation of a .deb package for ufo2000? Preferably making .deb package should be supported as one of the targets in the makefile.

 

The attached patch against 1011 will build a Debian package, although ufo2000 may only be run as root at present using this package because Debian stipulates that games be installed in /usr/share/games/ufo2000 to which only root has write access and ufo2000 tries to create files in /usr/share/games/ufo2000. when files such as init-scripts.log are created in ${HOME}/.ufo2000/ instead then this Debian packaging jazz will automagically work. The standard way to build Debian packages is to invoke:

 

  dpkg-buildpackage -rfakeroot

 

..from the main project directory.

deb.diff.gz

Link to comment
Share on other sites

The attached patch against 1011 will build a Debian package, although ufo2000 may only be run as root at present using this package because Debian stipulates that games be installed in /usr/share/games/ufo2000 to which only root has write access and ufo2000 tries to create files in /usr/share/games/ufo2000.  when files such as init-scripts.log are created in ${HOME}/.ufo2000/ instead then this Debian packaging jazz will automagically work.

Actually this all already works :) The game can be installed in gentoo linux, which uses the same /usr/share/games/ufo2000 directory for read only files, all the logs and other files that are modified by the game are created in ${HOME}/.ufo2000/. In order to support FHS, the game needs to be compiled with:

# make DATA_DIR="/usr/share/games/ufo2000"

 

  The standard way to build Debian packages is to invoke:

 

  dpkg-buildpackage -rfakeroot

 

..from the main project directory.

OK, thanks, I'll also try to build debian package for Nokia 770 based on your patch :)

I hope that we will solve SVN/game server hassle soon (on this weekend?) and get back to a normal development.

Link to comment
Share on other sites

  • 2 weeks later...
On Ubuntu 5.04 (Hedgehog):

 

$ make

..snip..

/usr/bin/ld: cannot find -lXxf86dga

collect2: ld returned 1 exit status

make: *** [ufo2000] Error 1

$ allegro-config --libs

-L/usr/lib -L/usr/X11R6/lib -lalleg-4.1.15 -lm -lpthread -lXxf86dga -lXxf86vm -lXpm -lXext -lX11 -ldl

 

No file named ^.*Xxf86dga.*$ is available in -any- package for Debian so it's not as if I could install a package and the error would go away.  I thought that Allegro's dependencies should already be managed by Debian's package management system so that's why I tried without.  ufo2000 certainly links and runs without error when the allegro-config jazz is removed from makefile.

Seems like these 2 bugs: http://bugs.debian.org/cgi-bin/pkgreport.c...=liballegro-dev

And they are supposedly fixed already? Strange.

Link to comment
Share on other sites

Seems like these 2 bugs: http://bugs.debian.org/cgi-bin/pkgreport.c...=liballegro-dev

And they are supposedly fixed already? Strange.

 

These fixes will not be automatically applied to existing stable installations of Debian or Ubuntu even if those installations are kept up-to-date. Only fixes for security holes are automatically applied to existing installations as they are updated. These fixes will fix the problem for people who are on the "unstable" flavours of Debian or Ubuntu and for those who wait for the next stable release before compiling UFO2000 but the makefile must be adjusted if users of stable distributions are to compile UFO2000.

Link to comment
Share on other sites

From what I read there, seems like there are two packages libxxf86dga-dev and libxxf86vm-dev and allegro package should just depend on them. Please try to apt-get them and check if it helps to solve the problem. If it does, probably just adding this information to INSTALL file is enough in Debian/Ubuntu specific section.

 

I don't feel like encouraging bugs in linux distributions :) This one is serious and makes allegro-dev package useless if used in a proper and documented way. It was fixed about half a year ago, but end users still don't have the fix. Let's face the truth, allegro-dev is not a very popular package and it does not affect system stability much, that's why it gets that little attention, is not up to date and broken. If we clearly indicate the problem in our readme file and users will know what's happening, the chance is that it will get more attention and will be resolved sooner :)

Link to comment
Share on other sites

Actually this all already works :) The game can be installed in gentoo linux, which uses the same /usr/share/games/ufo2000 directory for read only files, all the logs and other files that are modified by the game are created in ${HOME}/.ufo2000/. In order to support FHS, the game needs to be compiled with:

# make DATA_DIR="/usr/share/games/ufo2000"

 

I have compile ufo2000 for AltLinux. Found a bug(IMHO): sqlite datafile is created in a current directory. May be more correct is to create it at ~/.ufo2000 or at ~/ufo2000-srv instead?

Link to comment
Share on other sites

  • 2 weeks later...
I have compile ufo2000 for AltLinux. Found a bug(IMHO): sqlite datafile is created in a current directory. May be more correct is to create it at ~/.ufo2000 or at ~/ufo2000-srv instead?

Well, the game serer is just not very end user friendly now. I don't know about user's home directory, maybe it is better to install it in the system and run as a daemon? Anyway, we did not have many feedback from any people using the server, the official game server suits most users well, in addition it is definitely not overcrowded right now.

Link to comment
Share on other sites

Maybe it's time for a new Beta release?
Link to comment
Share on other sites

Well, the game serer is just not very end user friendly now. I don't know about user's home directory, maybe it is better to install it in the system and run as a daemon?

Right, but in this case running from pseudo-user needed not from root. And data-file must be somewhere in /var in this case.

Link to comment
Share on other sites

  • 3 weeks later...
Right, but in this case running from pseudo-user needed not from root. And data-file must be somewhere in /var in this case.

Sure, making end user ready applications needs some extra work done.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
A question to ubuntu users. Did they fix allegro package in the 6.06 release?

 

Hi there, I'm trying to compile under 6.06.

 

When I run make it compiles with no errors, so I guess allegro may be fixed.

 

But I'm running into a different problem, it doesn't appear to link with the NL lib, I get the following when I run ufo2000

 

./ufo2000: error while loading shared libraries: NL.so.1.6: cannot open shared object file: No such file or directory

 

and ldd shows it not linked properly

 

ldd ufo2000

libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00002aaaaabc2000)

libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00002aaaaace5000)

libz.so.1 => /usr/lib/libz.so.1 (0x00002aaaaae60000)

libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00002aaaaaf76000)

NL.so.1.6 => not found

libpthread.so.0 => /lib/libpthread.so.0 (0x00002aaaab09b000)

liballeg.so.4.2 => /usr/lib/liballeg.so.4.2 (0x00002aaaab1b0000)

libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00002aaaab3e7000)

libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00002aaaab4ec000)

libXext.so.6 => /usr/lib/libXext.so.6 (0x00002aaaab602000)

libX11.so.6 => /usr/lib/libX11.so.6 (0x00002aaaab714000)

libdl.so.2 => /lib/libdl.so.2 (0x00002aaaab91c000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002aaaaba1e000)

libm.so.6 => /lib/libm.so.6 (0x00002aaaabc1c000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002aaaabda1000)

libc.so.6 => /lib/libc.so.6 (0x00002aaaabeae000)

/lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

libXau.so.6 => /usr/lib/libXau.so.6 (0x00002aaaac0e8000)

 

 

any help would be appreciated as I am hanging to get this to compile and play it.

Link to comment
Share on other sites

./ufo2000: error while loading shared libraries: NL.so.1.6: cannot open shared object file: No such file or directory

 

You might be able to solve this one by making a symbolic link with that name(NL.so.1.6) to another library which you do have, for example my /usr/libNL.so.1.6 is a symbolic link to libNL.so.1.6.8.

 

Use "locate NL.so" and see what libraries you have which might work with it.

 

And symlink is of course made in this way

ln -s /usr/lib/libNL.so.1.6.8 /usr/lib/NL.so.1.6

(the file after -s is the target and the latter file is the link to be made)

 

Naturally you might have to try other libraries.

 

This solution is kind of a kludge but atleast it might work.

Link to comment
Share on other sites

Thanks for your reply Raging_Hog, it did work making a symbolic link to /usr/lib eg

 

ln -s /usr/local/lib/libNL.so.1.6.8 /usr/lib/NL.so.1.6.8

 

However I had a search around on the Ubuntu forums and it looks as though /usr/local/lib isn't in the default library search path. This can be fixed with the following command:

 

sudo vi /etc/ld.so.conf

 

and add the following line:

/usr/local/lib

 

ufo2000 now finds NL.so.1.6.8 in the library path and compiles.

 

Thanks for your help.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...