project-navigation
Personal tools

Author Topic: compiling ufoai 2.5-dev on os x 10.8 mountain lion  (Read 5978 times)

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
compiling ufoai 2.5-dev on os x 10.8 mountain lion
« on: January 18, 2013, 09:45:39 am »
hi there!

I really enjoy playing ufoai a lot, so I downloaded and installed the 2.5-dev version on my os x 10.8.2 and it run well, with some sudden crashes though.
therefore I decided to compile it on my own and it worked out. back in december I could compile 2.5 on mountain lion and it runs without crashes.

I updated the source code again last week and now there is no way to compile a working version. it compiles ok, but I can not start it. on startup it crashes because of a failed video initiation:


------- video initialization -------
SDL version: 1.2.15
I: desktop depth: 32bpp
I: video memory: 0
I: Available resolutions: 1920x1178 (1)
I: video driver: x11
I: setting mode -1
I: set multisample buffers to 0
I: set swap control to 0
SDL SetVideoMode failed: X11 driver not configured with OpenGL
Failed to set video mode 1024x768 fullscreen.
I: set multisample buffers to 0
I: set swap control to 0
SDL SetVideoMode failed: X11 driver not configured with OpenGL
Video subsystem failed to initialize
FS_RemoveFile: remove /Users/jo/Documents/UFOAI-2.5-dev/base/keys.cfg
Segmentation fault: 11

I suspect that ufoai is compiled i386 instead of x86_64, and mountain lion is only able to run 64 bit code. is there a way to tell the configure call or to modify the darwin.mk to compile it 64 bit?

or any other hints what might go wrong?
any help appreciated!

cheers, jo

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #1 on: January 18, 2013, 10:00:12 am »
Code: [Select]
SDL SetVideoMode failed: X11 driver not configured with OpenGL

You need a driver for your videocard that support openGL and hardware 3D acceleration.

-geever

Offline ovvldc

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #2 on: January 18, 2013, 11:26:35 am »
@ geever: Mac OS X may not get as many driver updates as Windows, but it does actually come with drivers for OpenGL that have accelerated 3D. It is used by the OS for lots of UI animations..

@ jotsetung: Did you try to install the latest XQuartz? They've been taking care of some bugs that broke Wine, for instance.

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #3 on: January 18, 2013, 11:42:02 am »
ovvldc is right, the driver should not be the problem.

and yes, I installed the latest Xquartz (2.7.4) that is equivalent to xorg-server 1.13.0. this version should have the openGL bug fixed. I even tried the xorg-server 1.13.1 from macports; same problem.

no I'm reinstalling gtk2, cairo and pango without the x11 (default for macports) but the quartz support; maybe (hopefully) that fixes it... let's see.

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #4 on: January 18, 2013, 06:19:07 pm »
ok, reinstalled now some packages from macports without x11 support (hoping that it uses quartz instead):

sudo port install cairo -x11 +quartz gtk2 +no_x11 +quartz pango +no_x11 +quartz gtksourceview2 +quartz gtkglext +quartz libsdl +no_x11

(based on people reporting similar problems: http://lists.gnu.org/archive/html/linphone-developers/2012-12/msg00053.html)


ufoai compiles, but when I want to start it it complains:

------- video initialization -------
Video SDL_Init failed: No available video device


so that's not working. I will now try to install an older version of the libsdl, as it seems that recently there have been made some changes (see http://trac.macports.org/ticket/37562).

let's see how that works out...


Offline ovvldc

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #5 on: January 19, 2013, 12:22:08 am »
Would it be useful to just use the SDL framework that a user can install?

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #6 on: January 19, 2013, 05:28:54 pm »
nope, unfortunately not (or at least I wasn't successful). the libsdl_mixer and libsdl_ttf depend on the libsdl library and thus libsdl is going to be installed automatically by macports... unfortunately the libsdl version 1.2.15_02, that causes the problem.

installation of the older libsdl however worked. I installed the 1.2.15_0 and could compile a running ufoai version on mountain lion.

...still I have the same problem that the mission "City high" is unplayable. there seems to be some problem with the map "c2_main.bsp" in maps/city2...

installation of the older version is actually pretty simple: just unzip the attached file, change into the libsdl directory and call "sudo port install". that will install the version 1.2.15_0 instead of the (presumably already installed 1.2.15_2).


Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #7 on: February 07, 2013, 09:23:26 pm »
just an update:
libsdl package has been fixed in macports, thus no need to tweak anymore. compilation works as described.

Offline ovvldc

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #8 on: February 07, 2013, 10:06:38 pm »
So the game plays now?

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #9 on: February 10, 2013, 03:48:48 pm »
yes. ufoai can be compiled on mountain lion as described on the "Download" page. building of uforadiant has however to be disabled; I didn't manage to compile or configure that.
the compiled version runs smoothly (so far) on mountain lion (64bit).

Offline ovvldc

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #10 on: February 10, 2013, 07:21:44 pm »
Any chance of packaging it up and submitting for download to the fine administrators here?
<tries to look hopeful without being pushy>

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #11 on: February 12, 2013, 06:09:18 pm »
of course... if I knew where and how to upload ;)

Offline jotsetung

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #12 on: February 12, 2013, 06:12:50 pm »
ah, just realized that there is already a dmp from today (12.02.2013) on the server (http://ufoai.org/snapshots/), so no need, that I upload mine.

Offline ovvldc

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: compiling ufoai 2.5-dev on os x 10.8 mountain lion
« Reply #13 on: February 13, 2013, 03:52:09 pm »
Sweet :) Downloading now...