project-navigation
Personal tools

Author Topic: compiling problems  (Read 6303 times)

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
compiling problems
« on: May 01, 2014, 12:18:32 pm »
I had 2.5 compiled and working on ubuntu 12.04 before, I hadn't played in a long time and after recently installing 14.04 I wanted to see what's new and headed to get the source, but I guess I must be doing something wrong... I can't find an executable to launch the game after compiling??

I read through the instructions pages best I could and got the source with
Code: [Select]
git clone -b master git://git.code.sf.net/p/ufoai/code
and dependecies
Code: [Select]
mk-build-deps
sudo dpkg -i ufoai-build-deps_2.5-dev-1_all.deb
sudo apt-get -f install

I'm not seeing any errors returned from running these, but then
./configure


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: compiling problems
« Reply #1 on: May 01, 2014, 12:40:20 pm »
please post the error ;)

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #2 on: May 01, 2014, 01:52:06 pm »
oops! accidentally posted before the message was finished =D Here it is:

I had 2.5 compiled and working on ubuntu 12.04 before, I hadn't played in a long time and after recently installing 14.04 I wanted to see what's new and headed to get the source, but I guess I must be doing something wrong... I can't find an executable to launch the game after compiling??

I read through the instructions pages best I could and got the source with
Code: [Select]
git clone -b master git://git.code.sf.net/p/ufoai/code
checked out to 2.5

and dependecies
Code: [Select]
mk-build-deps
sudo dpkg -i ufoai-build-deps_2.5-dev-1_all.deb
sudo apt-get -f install

I'm not seeing any errors returned from running these, but then
Code: [Select]
./configure
...
Could not find SDL.h
Could not find SDL_mixer.h
Could not find SDL_ttf.h
Could not find picomodel.h

make works for a long time as expected and ends with
Code: [Select]
make: *** [testall] Error 1entire make: http://pastebin.com/7GpvwbtN

There seems to be a lot of references to /usr/* ufo directories, but they have not been created as far as I can tell.

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: compiling problems
« Reply #3 on: May 01, 2014, 04:55:37 pm »
I recently built it following http://ufoai.org/wiki/Debian on precise; try the manual installation of prerequisites ?

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #4 on: May 01, 2014, 05:22:26 pm »
I have ran
Code: [Select]
sudo apt-get install \
   libsdl1.2-dev libsdl-ttf2.0-dev libvorbis-dev zlib1g-dev gettext libtheora-dev \
   libjpeg8-dev libpng12-dev libcurl3-dev libsdl-mixer1.2-dev \
   libxml2-dev libopenal-dev p7zip-full libcunit1-dev binutils-dev libxvidcore-dev libmxml-dev

and
Code: [Select]
sudo apt-get install libcunit1-dev
then I tried
Code: [Select]
mk-build-deps
sudo dpkg -i ufoai-build-deps_2.5-dev-1_all.deb

At this point running apt-get install -f doesn't install anything else.

Just reading at the debian instructions, I would assume that dependencies are met; but something appears to be missing anyway... ??
« Last Edit: May 01, 2014, 05:28:54 pm by kurja »

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #5 on: May 01, 2014, 05:44:26 pm »
the 'could not finds' at configure seem to be part of libsdl1.2-dev; but I do have that. Very confusing.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: compiling problems
« Reply #6 on: May 01, 2014, 07:37:28 pm »
./configure is looking for both SDL1 and SDL2 and will use whichever it can find (but will still print the 'could not find' messages if it can't find one of them even if it finds the other...)

As for the error, is there a libiberty-dev package for your distro?

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: compiling problems
« Reply #7 on: May 01, 2014, 09:19:23 pm »
You could pass --disable-testall to ./configure (not sure whether it's exactly correct, look in ./configure --help). Then it should not try to build testall, which is presumably the unit tests, which are only of use for developers. Several of the other targets are probably also not needed by a player, same for the dependencies they need.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #8 on: May 01, 2014, 10:32:28 pm »
libiberty-dev is available, but doesn't contain those .h files and installing it does not seem to change anything in what configure returns.

./configure --disable-testall returns the same could not founds, as with testall included.

 :o
« Last Edit: May 01, 2014, 10:48:35 pm by kurja »

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #9 on: May 01, 2014, 11:30:37 pm »
having given it a second thought, having ran configure with disable testall I ran make again, this time it did create an executable and I can now launch the game.


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: compiling problems
« Reply #10 on: May 02, 2014, 08:16:09 am »
the problem is the linking option -liberty for testall

a workaround is: ./configure --disable-testall

you don't need the unittests for playing the game anyway.


Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: compiling problems
« Reply #11 on: May 02, 2014, 11:15:13 am »
I notice that there are a bunch of things that are required for compiling, but are only needed for actual development work, not for playing; as it has long been practice with ufo:ai to recommend the latest version over latest stable release, would it make sense to provide an alternative configuration and dependency list for non-developer players?

I just noticed that there is now a debian repository, does that exclude developer tools, afair it's not very recent though?

Offline Steam

  • Rookie
  • ***
  • Posts: 11
    • View Profile
Re: compiling problems
« Reply #12 on: May 03, 2014, 04:50:12 am »
+1 to that.

It is actually easier to run a clean configure through the files from sourceforge than it is the files from github, which makes sense when I think about it.  However I will open a separate thread with more info and my questions.