project-navigation
Personal tools

Author Topic: UFOAI 2.5 dosn't build on OSX 10.9  (Read 6697 times)

Offline Napoleon_Blownapart

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
UFOAI 2.5 dosn't build on OSX 10.9
« on: August 31, 2014, 10:44:47 pm »
Hi there!

Since there is no official binary release for 2.5 i tried to build the game myself (which alsways works on my linux-machine).
So i installed all the libraries listed on this page http://ufoai.org/wiki/Compile_for_Mac using mac ports
I then ran the configure script whiche gave me this output:

Code: [Select]
use c compiler: cc
use c++ compiler: c++
Debug build
Compile for darwin
Compile for i386
Disable ccache
Found cc cc
Found cxx c++
Using bindir /usr/local/bin/
Using datadir /usr/local/games/ufo/
Using libdir /usr/local/lib/
Using prefix /usr/local
Enable hard linked cgame
Setting custom data directory
Setting custom library directory
Found zip from zip
Found python from python
Could not find doxygen from doxygen
Could not find xvid.h
Found theora/theora.h
Found execinfo.h
Could not find bfd.h
Found sys/utsname.h
Could not find link.h
Could not find jpeglib.h
Found zlib.h
Found png.h
Could not find CUnit/Basic.h
Could not find mxml.h
Found SDL.h
Found SDL_mixer.h
Found SDL_ttf.h
Could not find SDL.h
Could not find SDL_mixer.h
Could not find SDL_ttf.h
Could not find picomodel.h
Could not find gtk/gtk.h
Could not find gtksourceview/gtksourceview.h
Found libxml/parser.h
Could not find AL/al.h
Could not find gtk/gtkglwidget.h
Build modules:
Build cgame-campaign
Build cgame-multiplayer
Build cgame-skirmish
Build game
Build memory
Disable testall
Build ufo
Build ufo2map
Build ufoded
Build ufomodel
Disable uforadiant
Build ufoslicer
markuss-imac:ufoai-2.5-source markuskoths$ ./configure
use c compiler: cc
use c++ compiler: c++
Debug build
Compile for darwin
Compile for i386
Disable ccache
Found cc cc
Found cxx c++
Using bindir /usr/local/bin/
Using datadir /usr/local/games/ufo/
Using libdir /usr/local/lib/
Using prefix /usr/local
Enable hard linked cgame
Setting custom data directory
Setting custom library directory
Found zip from zip
Found python from python
Could not find doxygen from doxygen
Could not find xvid.h
Found theora/theora.h
Found execinfo.h
Could not find bfd.h
Found sys/utsname.h
Could not find link.h
Could not find jpeglib.h
Found zlib.h
Found png.h
Could not find CUnit/Basic.h
Could not find mxml.h
Found SDL.h
Found SDL_mixer.h
Found SDL_ttf.h
Could not find SDL.h
Could not find SDL_mixer.h
Could not find SDL_ttf.h
Could not find picomodel.h
Could not find gtk/gtk.h
Could not find gtksourceview/gtksourceview.h
Found libxml/parser.h
Could not find AL/al.h
Could not find gtk/gtkglwidget.h
Build modules:
Build cgame-campaign
Build cgame-multiplayer
Build cgame-skirmish
Build game
Build memory
Disable testall
Build ufo
Build ufo2map
Build ufoded
Build ufomodel
Disable uforadiant
Build ufoslicer

then i tried to run which make with returned the following output

Code: [Select]
/bin/sh: line 0: cd: /Users/me/Desktop/ufoai-2.5-source/contrib/installer/mojosetup/scripts: No such file or directory
ls: *.lua: No such file or directory
find: base/maps: No such file or directory
find: base/models: No such file or directory
find: base/models: No such file or directory
find: base/models: No such file or directory
find: base/models: No such file or directory
===> CXX [game] src/game/g_actor.cpp
===> CXX [game] src/game/g_ai.cpp
src/game/g_ai.cpp:1111:22: error: call to 'abs' is ambiguous
                        const int distX = std::abs(ent->pos[0] - to[0]);
                                          ^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:660:1: note:
      candidate function
abs(float __x) _NOEXCEPT {return fabsf(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:664:1: note:
      candidate function
abs(double __x) _NOEXCEPT {return fabs(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:668:1: note:
      candidate function
abs(long double __x) _NOEXCEPT {return fabsl(__x);}
^
src/game/g_ai.cpp:1112:22: error: call to 'abs' is ambiguous
                        const int distY = std::abs(ent->pos[1] - to[1]);
                                          ^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:660:1: note:
      candidate function
abs(float __x) _NOEXCEPT {return fabsf(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:664:1: note:
      candidate function
abs(double __x) _NOEXCEPT {return fabs(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:668:1: note:
      candidate function
abs(long double __x) _NOEXCEPT {return fabsl(__x);}
^
2 errors generated.
make: *** [debug-darwin-i386/game/game/g_ai.cpp.o] Error 1

What do I have to do?


Thanks for your help  :)


--- Update ---
I read in the news-section that this was a known issue and is fixed in the master-branch so i cloned the git repository and was able to compile the game without errors.
I can start a campaign but i can't enter any battles. I guess thats a bug of the dev-version

I hope someone can help me compiling the stable 2.5 - version

cheers
« Last Edit: September 01, 2014, 12:56:45 pm by Napoleon_Blownapart »

Offline zatomic

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: UFOAI 2.5 dosn't build on OSX 10.9
« Reply #1 on: September 01, 2014, 03:48:47 pm »
I've been running the 2.6 dev version on OSX 10.9 for a while with no issues. (the occasional bug you would expect from a dev version but nothing game breaking or any problems loading maps). I just check today and was able to start a campaign and complete a ground battle.

After running make, did you run: make lang models maps-sync

That's all I can think of. What does it do when you try to enter a ground battle?


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: UFOAI 2.5 dosn't build on OSX 10.9
« Reply #2 on: September 01, 2014, 04:16:50 pm »
it looks like this is a bug in the stable version and we would have to backport the fix from master. please open a ticket in our bugtracker for that.

Offline Napoleon_Blownapart

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: UFOAI 2.5 dosn't build on OSX 10.9
« Reply #3 on: September 01, 2014, 05:06:43 pm »
I created the following bug report:
http://ufoai.org/bugs/ufoalieninvasion/issues/5385

I ran make models maps-sync
now the dev version works for me although i prefer stable versions.
Thanks
« Last Edit: September 01, 2014, 07:03:58 pm by Napoleon_Blownapart »