gnofract4d on MAC OS-X Tiger

  • osiris300

    osiris300 - 2007-02-06

    I have a Intel i-MAC with OS-X 10.4 Tiger and I want to install the gnofract4d. But I am not a UNIX expert. And I have never compiled any programs. I'm only a User.

    Question: Has anyone of you a Final Compiled Version of gnofract4d for OS-X 10.4 Tiger? If yes, could you send me
    the directory with the excutables to my e-mail: ??

    Thank you very much

    • Edwin Young

      Edwin Young - 2007-02-07


      I'm afraid I'm not aware of any way to do this simply, and I don't have a Mac to experiment with. If anyone else has any information on this I'd be interested to hear about it.

    • cfr

      cfr - 2007-03-26

      I tried to compile for Tiger on a PPC. I do have experience compiling software, but not much experience with Python and not much experience of successfully solving issues.

      An email exchange with the developer resulted in the following conclusions: it will not currently compile under Mac OS X and it is not likely to do anytime soon.

      I doubt this is a PPC issue.

      I've wondered whether it has to do with the very Mac-specific implementation of Python recommended as standard on I don't know this, though. It's just a hunch along the lines of "maybe". But I seriously doubt my ability to address that kind of obstacle, so I'm just looking at this with longing.

      For a OS traditionally known for graphics, it seems ironic that Windows users have a slew of fractal programmes, many freeware or open-source, other unices have _this_ and Mac OS X (especially OS X) has remarkably little that I've found.

      Keep staring in the bakery window...

      If anybody does solve this one, I would dearly like to know.

      - cfr

    • J.B.

      J.B. - 2007-05-22

      It is possible, and not too difficult to compile gnofract4d for Mac OS X.  Here are the instructions:

      1) Install XCode. 

      An installer for XCode is included on the Operating System DVD that ships with every Mac, and the latest version is also available for download from  I am using XCode 2.4.1.

      2) Install Apple X11.

      An installer for X11 is included on the Operating System DVD that ships with every Mac.  Run the Installer, select the X11 option, and follow the instructions.

      3) Install MacPorts. 

      You can download an installer for the latest verison from  I am using MacPorts 1.4.0.  After you select the version, you will see two dmg files--one for 10.3 and one for 10.4.  Download the one appropriate for your OS version.

      4) Build py-gtk2.

      This is the library that gnofract4d uses for its GUI. To build and install  py-gtk2 using MacPorts, run the following command from a Terminal:

      sudo port install py-gtk2

      Sudo will prompt you for your username and password and you must be an administrator on your computer in order to use sudo.  After you enter your password, MacPorts will automatically download and compile py-gtk2 and all its many dependencies.  This will take a very long time, so do something else for an hour or so while the software compiles in the background.

      5) Build gnofract4d

      Download the latest gnofract4d source file from and extract the file. Open a Terminal and go to the extracted directory.  Type the following command to build:

      ./ build

      6) Make necessary changes

      Edit the file gnofract4d file in the root of the extracted gnofract4d directory.  Change the first line from:

      #!/usr/bin/env python



      This forces gnofract4d to use the version of python that MacPorts installed, which is already configured to work correctly with py-gtk2.  Next, edit the file fract4d/  Find the line that looks like this:

                    "options" : "-fPIC -DPIC -D_REENTRANT -O2 -shared -ffast-math",

      and change it to:

                    "options" : "-fPIC -DPIC -D_REENTRANT -O2 -dynamiclib -ffast-math",

      This changes the options that gnofract4d passes to gcc and is necessary because Mac OS X's linker is a bit non-standard.

      7) Run and enjoy

      Start, and in the xterm that appears, change to the extracted gnofract4d directory.  Run gnofract4d using the command:


      gnofract4d should come up and you should be able to use it just as you would on Linux.  I have tested this with gnofract4d 3.4 on Mac OS X Tiger on a MacBook Pro (Intel).  I am using MacPorts 1.4.0 with Xcode 2.4.1.  I also got it working some time ago on a PowerMac G5 using similar steps.  However, I've since sold the PowerMac and cannot verify that it works with the latest version.

      You would probably be able to accomplish the same thing using Fink to install py-gtk2 instead of MacPorts, but I don't use Fink so I haven't tested it and can't provide exact instructions.

      The only problem I know of is that fractals that use gradient color maps don't work correctly.  I think this is again a problem with Mac OS X's non-standard linker.  I have figured a way around it, but it's a really ugly hack.  I'll post instructions for that in a separate post, but first I want to figure out a better way to do it.

      If you have any problems or questions please reply to the thread and I'll help you if I can.

      I hereby give the authors of gnofract4d permission to incorporate these instructions into the gnofract4d documentation if they so desire.

      • J.B.

        J.B. - 2007-06-01

        I figured out how to get fractals with gradient color maps to successfully compile. You need to change the compiler flags to:

        -fPIC -DPIC -D_REENTRANT -O2 -dynamiclib -flat_namespace -undefined suppress -ffast-math

        The options "-flat_namespace -undefined suppress" forces the Mac OS X linker to ignore undefined symbols in the fractal shared library.  This is ok, because the library that loads in the fractal's shared library already contains these symbols.

        You can either do this via the Edit->Preferences dialog, or change it in the source code by editing the file fract4d/ Find the line that looks like this:

        "options" : "-fPIC -DPIC -D_REENTRANT -O2 -shared -ffast-math",

        and change it to:

        "options" : "-fPIC -DPIC -D_REENTRANT -O2 -dynamiclib -flat_namespace -undefined suppress -ffast-math",

      • philodygmn

        philodygmn - 2014-05-25

        I am running Snow Leopard 10.6.8 on a 32-bit Intel iMac and just launched Gnofract4D successfully after editing fract4d/ according to J.B.'s instructions, so thank you, J.B.!

        My installation involved the following: :

        OS X's own Software Update:

        I don't know if it's necessary, but in case it's partly responsible for my success I will mention I installed PyGTK before finding this thread:

        I post this in case a UNIX neophyte like me would benefit, so apologize if this post is in effect a repetition of what should be obvious (it wasn't obvious to me). I had already followed the instructions at:

        but they're missing that critical additional edit of

        Thanks again, J.B.!

        Last edit: philodygmn 2014-05-25
  • esther

    esther - 2010-02-01

    hello :)
    I have been following above instructions, and it's all working well up to the point of actually installing gnofract;
    I had X11, I installed Xcode, updated to SnowLeopard
    I built py-gtk2, has been running for an hour, but when I go to the gnofract directory and ./ build it says it cannot find py-gtk2 and I need to install it first,
    when I open the terminal file gnofract4d in the gnofract directory it says the same, so I cannot get to  :

    Edit the file gnofract4d file in the root of the extracted gnofract4d directory. Change the first line from:

    #!/usr/bin/env python



    which, in my understanding, makes sure that gnofract is rightly connected to the python install.
    Is it possible that py-gtk is in the wrong place? How do I point to it?
    I have never before used the terminal window and the sudo commands, so be gentle in your reply :) if it says somewhere 'change directory in terminal' I actually have to google this to see how it is done, so…very newbie to the unix control :D
    I thought I kicked ass until gnofract didn't install at 5 this morning :)

    I will keep looking, but it would be great if someone here knows how to let gnofract find py-gtk2
    Thank you!!!

  • esther

    esther - 2010-02-01

    little add to this, it seems to have built at least something, but this doesn't get me any further either,

    it copies a lot of files from gnofract, this looks good, but then gives a lot of warnings like these:

    fract4d/c/fract4dmodule.cpp:294: warning: deprecated conversion from string constant to ‘char*’

    it ends like following, I noticed there is a new map 'build' in the gnofract folder, I don't think it was there before, there is a gnofract4d terminal file in this folder as well, but it says the same; install py-gtk2 first…

    running build_scripts
    creating build/scripts-2.6
    copying and adjusting gnofract4d -> build/scripts-2.6
    changing mode of build/scripts-2.6/gnofract4d from 644 to 755

    I suppose I can't figure it out due to lack of experience in this, I hope it's something silly I just can't think of
    Thank you!!!!

  • paul

    paul - 2010-02-01

    you'll want to add the results of `pkg-config pygtk-2.0 -variable pyexecdir` to the environment variable PYTHONPATH
    here's mine for example:
    % printenv PYTHONPATH

  • Paolo

    Paolo - 2012-05-08

    Hi, I'm trying to compile Gnofract4D 3.14 on a Mac OSX 10.5 Leopard. Thank you jblang for providing those steps, however I'm not able to link Python with Gnofract4D.

    At this point I've tried changing the path 3 different versions of python, each with different result.

    Edit the file gnofract4d file in the root of the extracted gnofract4d directory.  Change the first line from:

    #!/usr/bin/env python

    This path gives this result: bash: ./gnofract4d: /opt/local/bin/python: bad interpreter: No such file or directory

    So I change the path to python2.5 and it gives this output:

    bash-3.2$ ./gnofract4d
    /Users/paolocastro/Documents/gno/fract4d/ RuntimeWarning: Python C API version mismatch for module fract4dc: This Python has API version 1012, module fract4dc has version 1013.
      import fract4dc

    Can't import a required module.
    If you haven't set up Gnofract 4D yet, run './ build'
    Error was: 'No module named hashlib'

    And I try to direct it to the latest Python version I have, 2.7 and the output is:

    bash-3.2$ ./gnofract4d
    Can't find PyGTK. You need to install it before you can run Gnofract 4D.

    And lastly, I tried directing it to this path:
    with this result:

    bash-3.2$ ./gnofract4d

    (process:91534): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.

        Can't import a required module.
        If you haven't set up Gnofract 4D yet, run './ build'
        Error was: 'No module named win32api

    I am not sure where to go from here and would appreciate some help. Thanks


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks