Jump to content


Photo

Compilation On Ubuntu Linux


  • Please log in to reply
17 replies to this topic

#1 unclouded

unclouded

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 03 April 2006 - 12:28 AM

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, 10 April 2006 - 09:51 AM.


#2 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 03 April 2006 - 04:30 AM

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?
ufo2000 development team
http://ufo2000.sourceforge.net

#3 unclouded

unclouded

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 03 April 2006 - 06:41 PM

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

<{POST_SNAPBACK}>


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.

#4 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 04 April 2006 - 12:06 PM

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#5 unclouded

unclouded

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 04 April 2006 - 07:41 PM

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.

<{POST_SNAPBACK}>


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.

Attached Files



#6 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 05 April 2006 - 02:01 PM

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.

<{POST_SNAPBACK}>

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#7 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 15 April 2006 - 01:46 AM

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.

<{POST_SNAPBACK}>

Seems like these 2 bugs: http://bugs.debian.o...=liballegro-dev
And they are supposedly fixed already? Strange.
ufo2000 development team
http://ufo2000.sourceforge.net

#8 unclouded

unclouded

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 15 April 2006 - 08:20 PM

Seems like these 2 bugs: http://bugs.debian.o...=liballegro-dev
And they are supposedly fixed already? Strange.

<{POST_SNAPBACK}>


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.

#9 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 15 April 2006 - 11:53 PM

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 :)
ufo2000 development team
http://ufo2000.sourceforge.net

#10 p_serge

p_serge

    Squaddie

  • Forum Members
  • PipPip
  • 3 posts

Posted 21 April 2006 - 09:04 AM

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?

#11 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 30 April 2006 - 03:06 AM

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?

<{POST_SNAPBACK}>

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#12 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 30 April 2006 - 09:38 PM

Maybe it's time for a new Beta release?
Posted Image

#13 p_serge

p_serge

    Squaddie

  • Forum Members
  • PipPip
  • 3 posts

Posted 04 May 2006 - 02:41 AM

[/quote]
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?
[/quote]
Right, but in this case running from pseudo-user needed not from root. And data-file must be somewhere in /var in this case.

#14 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 21 May 2006 - 08:13 AM

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.
ufo2000 development team
http://ufo2000.sourceforge.net

#15 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 12 June 2006 - 05:02 PM

A question to ubuntu users. Did they fix allegro package in the 6.06 release?
ufo2000 development team
http://ufo2000.sourceforge.net

#16 hacksaw

hacksaw

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 09 October 2006 - 05:11 AM

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.

#17 Raging_Hog

Raging_Hog

    Sergeant

  • Forum Members
  • PipPipPip
  • 10 posts

Posted 12 October 2006 - 03:46 PM

./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.

#18 hacksaw

hacksaw

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 13 October 2006 - 09:26 PM

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.