FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: 1 [2]

Author Topic: OS X Snow Leopard - build issues  (Read 13382 times)

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #15 on: December 29, 2009, 11:14:39 am »

hmmm did you install PyYAML from source like this?

Code: [Select]

$ sudo python_select python26
$ wget http://pyyaml.org/download/pyyaml/PyYAML-3.09.tar.gz
$ tar -zxvf PyYAML-3.09.tar.gz
$ cd PyYAML-3.09
$ sudo python setup.py install

the above should work.
Logged

hoffi

  • Newbie
  • Posts: 18
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #16 on: December 29, 2009, 01:54:36 pm »

ok now i can import yaml without any error
but if i run fife i get this error:
Code: [Select]
  [...]
Extension tests
  24) tests.extension_tests.extension_test_utils
  25) tests.extension_tests.loaders_tests
  26) tests.extension_tests.modelview_tests
  27) all
Analyzers
  28) tests.analyzers.dep_analyzer
Other
  29) Run all tests
  30) Cancel and quit
-> : 24
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
(Python version: 2.6.4)
« Last Edit: December 29, 2009, 01:58:39 pm by hoffi »
Logged
Hackintosh - (Intel i7 - 2600k, ATI Radeon HD6870 1GB VRAM, 8 GB RAM, 128 GB OCZ Vertex4 SSD)
Mac OS X 10.8

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #17 on: December 29, 2009, 02:20:35 pm »

Hmm that tells me you may have compiled fife using a different version of Python....  try re-compiling FIFE:

Code: [Select]
$ cd <FIFE>/trunk
$ scons -c && scons

if you continue to get the same error you will have to look at your <FIFE>/build/darwin-config-dist.py file and make sure you have the correct paths to python in there.
Logged

hoffi

  • Newbie
  • Posts: 18
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #18 on: December 30, 2009, 04:18:13 am »

oh i see  :P
compiled with 2.6.1 ^^

it works now :D

thanks
« Last Edit: December 30, 2009, 04:21:16 am by hoffi »
Logged
Hackintosh - (Intel i7 - 2600k, ATI Radeon HD6870 1GB VRAM, 8 GB RAM, 128 GB OCZ Vertex4 SSD)
Mac OS X 10.8

hoffi

  • Newbie
  • Posts: 18
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #19 on: December 30, 2009, 05:54:21 am »

-.-
after the 3rd start i got an error:
Code: [Select]
dlopen(/Users/stefan/fife/engine/swigwrappers/python/_fife.so, 2): no suitable image found.  Did find:
/Users/stefan/fife/engine/swigwrappers/python/_fife.so: mach-o, but wrong architecture

dont know why...
Logged
Hackintosh - (Intel i7 - 2600k, ATI Radeon HD6870 1GB VRAM, 8 GB RAM, 128 GB OCZ Vertex4 SSD)
Mac OS X 10.8

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #20 on: December 30, 2009, 08:21:36 am »

That's very odd...   try running lipo on the library like so:

Code: [Select]
$ lipo -info /Users/stefan/fife/engine/swigwrappers/python/_fife.so

You should get output like so:

Code: [Select]
$ lipo -info ./engine/swigwrappers/python/_fife.so
Non-fat file: ./engine/swigwrappers/python/_fife.so is architecture: x86_64
Logged

hoffi

  • Newbie
  • Posts: 18
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #21 on: December 30, 2009, 12:45:36 pm »

yes
Code: [Select]
lipo -info _fife.so
Non-fat file: _fife.so is architecture: x86_64
Logged
Hackintosh - (Intel i7 - 2600k, ATI Radeon HD6870 1GB VRAM, 8 GB RAM, 128 GB OCZ Vertex4 SSD)
Mac OS X 10.8

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #22 on: December 30, 2009, 04:00:35 pm »

Hmmmm   what if you did something like this:

Code: [Select]
$ lipo -info `which python`
Non-fat file: /opt/local/bin/python is architecture: x86_64

Do you get the same output as me? 

(I'm just grasping at straws here.  I'm not sure why it would work then start reporting that the binary is the wrong architecture)
Logged

hoffi

  • Newbie
  • Posts: 18
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #23 on: December 31, 2009, 03:28:40 am »

Code: [Select]
$ lipo -info python
Non-fat file: python is architecture: x86_64
Logged
Hackintosh - (Intel i7 - 2600k, ATI Radeon HD6870 1GB VRAM, 8 GB RAM, 128 GB OCZ Vertex4 SSD)
Mac OS X 10.8

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #24 on: December 31, 2009, 04:12:36 pm »

dunno man...  maybe re-compile everything again.
Logged

zenbitz

  • Newbie
  • Posts: 10
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #25 on: December 15, 2010, 05:44:01 pm »

Just posting here because I got FIFE to run on my mac.
Running 10.6.5 on an Intel macbook pro and with a CLEAN machine.  
64bit, Xcode version 3.2.5

I just installed everything using mac ports.

This was fife 0.3.2r2 for historical records.  I am attaching my "notes" (really just a list of all versions installed by macports)

Over all it did take a couple hours, mostly boost which took 50min.

Code: [Select]
o MacPorts (dmg) 1.9.2-10.6
oo Ports
oo scons
ooo deps: -->  Dependencies to be installed: python26 bzip2 db46 gdbm gettext expat libiconv gperf ncurses ncursesw openssl zlib readline sqlite3
- port python_select, select python26 as python (note this is 2.6.6 not mac-delivered 2.6.1)
oo  port install libsdl libsdl_ttf libsdl_image
--->  Computing dependencies for libsdl
--->  Dependencies to be installed: xorg-libXext pkgconfig xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXrandr xorg-randrproto xrender xorg-renderproto
oo Installing libsdl @1.2.14_8
--->  Computing dependencies for libsdl_ttf
--->  Dependencies to be installed: freetype
oo --->  Installing libsdl_ttf @2.0.9_1
--->  Computing dependencies for libsdl_image
--->  Dependencies to be installed: jpeg libpng tiff
ooo --->  Installing jpeg @8b_0
ooo --->  Installing libpng @1.2.44_0
ooo --->  Installing tiff @3.9.4_0
oo --->  Installing libsdl_image @1.2.10_2
oo --->  Installing boost @1.45.0_1
oo --->  Installing libogg @1.2.1_1
oo --->  Installing libvorbis @1.3.2_0
oo --->  Installing boost-jam @3.1.18_0
--->  Computing dependencies for swig
--->  Dependencies to be installed: bison m4 gsed pcre
oo --->  Installing swig @2.0.1_0
oo --->  Installing swig-python @2.0.1_0
--->  Computing dependencies for libguichan
--->  Dependencies to be installed: mesa glut makedepend xorg-dri2proto xorg-glproto xorg-libXfixes xorg-fixesproto xorg-libXi xorg-libXmu xorg-libXt xorg-libsm xorg-libice
--->  Installing libguichan @0.8.2_0
« Last Edit: December 15, 2010, 05:47:10 pm by zenbitz »
Logged

dsrogers

  • Newbie
  • Posts: 5
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #26 on: April 05, 2011, 10:22:56 pm »

I managed to get the build working on snow leopord.  The problems are many fold.  First, scons from macports depends on python 2.6, which fink insists on compiling for itself..  Also, the fink dependencies for the python packages (like yaml), are installed for macports python 2.6, NOT the system 2.6.

Furthermore, the fink python 2.6 builds as a framework, but it's broken.  Consequently, when you build fife, it builds against the system python.  Furthermore, the system python is installed as "python" but the macports python 2.6 is installed as "python2.6"

So to fix the problem you have do one of:

1)
Fix the python2.6 framework so that fife can link against it.  Then fix all references to "python" in the tops of scripts to be "python2.6" (or symlink python2.6 as python, probably in ~/bin or something).

OR

2)
Install the extra python modules somewhere and add that to your PYTHONLIBDIR environment variable, and use the system python to link.  A complication here is that the mac build of fife explictly tries to use the headers from macports python 2.6, so you'll have to fix the darwin build of fife if you go down this route.

I opted for (1).

After installing the macport dependencies:

$ cd /opt/local/Library/Frameworks/Python.framework
$ cd Versions
$ ln -s 2.6 Current
$ cd ..
$ ln -s Versions/Current/Python Python
$ ln -s Versions/Current/Headers Headers
$ ln -s Versions/Current/Resources Resources

Then clean and rebuild fife.  If you've done this correctly, you should be able to use otool to see if it's linking against macports python.

$ otool -L <fife-dir>/build/release/_fife.so

Examine the output and make sure it's linking against the macports python and NOT the system python.  If it is, you should be able to go to your unknown-horizons directory and type:

$ python2.6 run_uh.py

You must explictly call python2.6 otherwise the #! in run_uh.py wlll call into "python" which is the system python and doesn't have the modules installed.

*an annoyance with this whole process is that macports will install both python 2.6 and python 2.7.  This means that the python framework in /opt/local will contain both a python 2.6 and python 2.7 dir.  However several of the dependencies available in fink are /only/ available as python  2.6 builds, so I made "2.6" the "Current" version in the framework to ensure that everything links against the version that appears to have better support.
Logged

prock

  • Developer
  • Full Member
  • *
  • Posts: 236
    • View Profile
Re: OS X Snow Leopard - build issues
« Reply #27 on: April 06, 2011, 08:54:55 am »

Dsrogers,

Just a quick note...  To switch python versions you can use the python_select macport..

Install python_select:
Code: [Select]
sudo port install python_select
Check which python distributions are available on your system:
Code: [Select]
python_select -l
Select a new version:
Code: [Select]
python_select -s pythonver

Here is a link to the macport: https://trac.macports.org/browser/trunk/dports/sysutils/python_select/Portfile


Hope this helps...

prock
Logged
Pages: 1 [2]