Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Help compiling gnofract 4d on OS X Lion

Help
pleckmage
2011-11-16
2013-05-12
1 2 > >> (Page 1 of 2)
  • pleckmage
    pleckmage
    2011-11-16

    I can't seem to get this program to compile, tried the instructions and downloaded the developer software XCode 4.2 and the packages and software required. It seemed to work when I did "sudo port install py-gtk2" but I could not get the setup.py build to work.

    When I tried to use ./setup.py build I got the following error messages.

    192-168-1-2:gnofract4d username$ ./setup.py build
    NO JPEG HEADERS FOUND
    running build
    running build_py
    running my_build_ext
    compiling with None
    running build_scripts
    Traceback (most recent call last):
      File "./setup.py", line 286, in <module>
        shutil.copy("fract4d/fract4d_stdlib.pyd", "fract4d_stdlib.pyd")
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 116, in copy
        copyfile(src, dst)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
        with open(src, 'rb') as fsrc:
    IOError:  No such file or directory: 'fract4d/fract4d_stdlib.pyd'

    This is the error at the X11 interface:

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

    Any clues would be helpful.
    Just trying to run this on a 27" iMac, and decent Fractal software is very hard to find for this platform.

     
  • Rachel Mant
    Rachel Mant
    2011-11-16

    Hi there pleckmage,
    I'm afraid that until you tell us what version of Gnofract you're trying to compile, we can be of no help at all. If you're using 3.13, this is known-broken on Mac due to "win" being a substring of both "darwin" and "win32"/"win64". 3.14 fixes that, among other things. Also, we give no instructions for use of XCode 4.2, so I'm assuming you found that from a Mac related site such as MacPorts.

    I will help how I can, but I must know key information such as version numbers of our software and what version of GCC you're using. Also, it appears you did not install libJPEG's headers so you will only be able to save fractals out as .png files. While this is not a problem, it is something to think about.

    Kind regards,
    ~DX-MON.

     
  • pleckmage
    pleckmage
    2011-11-17

    DX-MON,

    I looked at Gnofract4d PKG-INFO and the text indicates version 3.14. GCC is version 4.2.1. I do not know how to install the libJPEG  files or what package it comes with, I just downloaded the files from MacPorts 2.0.3 and went through the instructions listed on
    "https://sourceforge.net/apps/mediawiki/gnofract4d/index.php?title=RunningOnMacOSX"

    Regards

    Pleckmage  

     
  • Rachel Mant
    Rachel Mant
    2011-11-17

    Pleckmage,
        Ok, thanks for that. It was an honest mistake in 3.14's setup.py, I just found and fixed the line that was acting up on you so please make a clone of the latest version of the code from our Git repository. As there have now been a significant number of bugs fixed since 3.14, I'm thinking of releasing a revision to the version, but such a revision version will just be what you'll get via a Git clone at the moment.

        libJPEG's dev files can be installed in the same way as you installed py-gtk2 as far as I know. You'll be wanting to find a pakage of name similar if not the same as "libjpeg-dev"

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-11-19

    DX-MON,

    can you direct me to the link of the Git clone repository?

    Do you think that I re-installing py-gtk2 is the way to obtain the missing libJPEG files?

    Regards,

    Pleckmage

     
  • Rachel Mant
    Rachel Mant
    2011-11-19

    Hi Pleckmage,

    To clone our repository, use "git clone git://gnofract4d.git.sourceforge.net/gitroot/gnofract4d/gnofract4d" (without the quotes).
    You can browse it at http://gnofract4d.git.sourceforge.net/git/gitweb-index.cgi
    You can find how to do this by clicking on "Git" under the "Code" menu on our project page here at sf.net

    By referencing your py-gtk2 command, I was actually meaning that I think running something similar to it like "sudo port install libjpeg-dev" or "sudo port install libjpeg" will install the library's headers.

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-11-19

    DX-MON,

    I followed the instructions, uses the git clone command at the terminal, and this worked. However, I still get the same errors when I try /setup.py build command.

    It seems that for the libjpeg file installed via mac ports, you need '/opt/local' rather than '/opt/local/lib'. I am not sure how to edit the file gnofract4d file in the root of the extracted gnofract4d directory. It seems that I cannot get to this stage until I get the ./setup.py build to work.

    Regards

    Pleckmage

     
  • Rachel Mant
    Rachel Mant
    2011-11-20

    Hi Pleckmage,

    Please "git pull" and run "rm -r build" followed by "./setup.py build"

    the setup.py run should produce quite a lot of output, especially when the following two lines are output, and if that doesn't fix the problem then I'm going to need to get me a Mac OS VM so I can explore building Gnofract4d on a mac..
    running my_build_ext
    compiling with None

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-11-20

    Hi DX-MON,

    I cannot get git pull to work, running on the terminal at the gonfract4d directory. Here is the error message:

    192-168-1-2:gnofract4d username$ git pull
    fatal: Not a git repository (or any of the parent directories): .git

    Do I have to create a repository? I know there are some compilation problems for Apple OS X mentioned at "http://macosx.forked.net/comp.html"

    Regards,

    Pleckmage

     
  • Rachel Mant
    Rachel Mant
    2011-11-20

    Hi Pleckmage,

    What this tells me is you did not cd (change directory) into the folder created by git clone. You do not need to create a repository nor worry about complications for the moment but rather that you are in the wrong Gnofract4d directory. I do not know where you ran the git clone command, but try to "cd gnofract4d" and then run my previous batch of commands.

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-11-20

    Hi DX-MON,

    I have run"git pull" and run "rm -r build" followed by "./setup.py build", I had the directory wrong, I had gnofract4d in the Applications directory, and saw another version in the user directory, so I did cd gnofract4d and was able to run the scripts.

    When I followed step 6, and used text edit to modify the first line, then used ./gnofract4d - I had the following error:

    bash-3.2$ ./gnofract4d
    bash: ./gnofract4d: /opt/local/bin/python: bad interpreter: No such file or directory

    There is a directory in the location, and it contains python2.4 & python2.7.
    Also, when I tried sudo port install libjpeg-dev" or "sudo port install libjpeg" I got the following error:

    192-168-1-2:gnofract4d username$ sudo port install libjpeg
    Password:
    Error: Port libjpeg not found
    To report a bug, see <http://guide.macports.org/#project.tickets>
    192-168-1-2:gnofract4d username$ sudo port install libjpeg-dev
    Error: Port libjpeg-dev not found
    To report a bug, see <http://guide.macports.org/#project.tickets>

    Regards

    Pleckmage

     
  • Rachel Mant
    Rachel Mant
    2011-11-20

    Hi Pleckmage,

    what you need to do to make /opt/local/bin/python work is to run "ln -sv /opt/local/bin/python python2.7" so the file exists and links to the more resent version of Python. Glad to hear the build completed successfully this time as that's a nice bit of progress to hear.

    I will poke around MacPorts and see if I can find libJPEG's headers but for the moment I wouldn't worry about that one as you still have PNG support and it only affects output formats

    Regards,
    DX-MON

     
  • pleckmage
    pleckmage
    2011-11-23

    Hi DX-MON,

    I have run "ln -sv /opt/local/bin/python python2.7" and there is no directory /opt/local/bin/python python2.7 the directory folders are directory /opt/local/bin/ then an alias of python2.7 exists here.

    When I ran the program at X11 I had the following message:

    bash-3.2$ ./gnofract4d
    bash: ./gnofract4d: /opt/local/bin/python: bad interpreter: No such file or directory

    Regards

    Pleckmage

     
  • Rachel Mant
    Rachel Mant
    2011-11-23

    Hi Pleckmage,

    the ln will fail as I found only last night that I keep getting ln's source and destination parameters backwards, the corrected command is: "ln -sv python2.7 /opt/local/bin/python"
    That will fix the "Bad interpreter" error this time.

     
  • pleckmage
    pleckmage
    2011-11-26

    Hi DX-MON,

    I have run "ln -sv python2.7 /opt/local/bin/python"

    192-168-1-2:gnofract4d username$ ln -sv python2.7 /opt/local/bin/python
    ln: /opt/local/bin/python: Permission denied

    I then edited script & removed the space between '/opt' - no longer got permission denied.

    192-168-1-2:gnofract4d username$ ln -sv python2.7/opt/local/bin/python
    ./python -> python2.7/opt/local/bin/python

    When I ran at X11 I got the error:

    bash: ./gnofract4d: /opt/local/bin/python: bad interpreter: No such file or directory

    Regards

    Pleckmon

     
  • Rachel Mant
    Rachel Mant
    2011-11-26

    Hi Pleckmon,

    Your computer was telling you something very specific: you ran the command with the wrong privileges, not that the command was wrong. Your modified command is wrong and will not have worked as intended, so to clean up run "rm ./python", then run the ln command I gave as root (sudo should do the trick) and that will then fix the problem.

    The full command, including privilege correction is as written only: sudo ln -sv python2.7 /opt/local/bin/python
    that space between "python2.7" and "/opt" is extremely important

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-11-26

    Hi DX-MON,

    the full command worked, but I got the following error message when I ran at X11:

    bash-3.2$ ./gnofract4d

    (process:27163): 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 './setup.py build'
        Error was: 'No module named win32api'

    Regards

    Pleckmon

     
  • Catenary
    Catenary
    2011-12-03

    Pleckmage,

    One of the reasons you've had so much trouble is that no-one contributing to Gnofract 4D actually owned a Mac… until now! I have finally added a MacBook to the other random computers lying around the house and got Gnofract4D compiling just now.

    It's also difficult because the Mac isn't the primary platform where Gnofract 4D was developed, and compiling things from source is always more difficult than installing binaries. So thanks for hanging in there.

    The steps I took were as follows:

    1) A couple of steps in the instructions in "RunningOnMacOSX" needed tweaking for me to use Python 2.7 rather than 2.4. I have updated them, but seems like you got further, not sure why there was a difference - what version of OS X are you using?

    2) There were several more places in the code where the check for windows was wrong and caused us to try and run a windows code path on the Mac. I have checked in a change to resolve all the ones I found. If you cd to the directory where you put the code and "git pull" you'll get all the changes.

    Then I was able to run successfully.

    There are a few other problems I hit
    - we depend quite a lot on the right mouse button, need an alternate way of zooming out for the mac
    - got a crash at one point, not sure what the problem was.

    But mostly things work.
    After this I will try and fix up the Mac port properly and ship binaries with a future release so other folks needn't have this problem. But that won't likely be until next year.

    Also haven't looked at the libjpeg issue yet, not sure how that works.

     
  • Rachel Mant
    Rachel Mant
    2011-12-04

    Thanks catenary for stepping in,
    I will however say that I will go fix the import issue by scanning the 3.x code base and applying the 4.x fix I used to get setup.py working for you as that is not helping here. As I do not have a mac, though, I hand the rest of the issue to you as you'll be able to figure out what's happening with far better precision and ease than I can so I truely thank you for this.

    Regards,
    ~DX-MON

     
  • pleckmage
    pleckmage
    2011-12-05

    Hi catenary,

    I have OS X 10.7.2, I ran "git pull" from the gnofract4d directory and got the following message:

    192-168-1-2:gnofract4d username$ git pull
    remote: Counting objects: 171, done.
    remote: Compressing objects: 100% (95/95), done.
    remote: Total 95 (delta 80), reused 0 (delta 0)
    Unpacking objects: 100% (95/95), done.
    From git://gnofract4d.git.sourceforge.net/gitroot/gnofract4d/gnofract4d
       f4be88f..90d512c  4.x        -> origin/4.x
       5467f56..5ca4d7d  master     -> origin/master
    Updating 5467f56..5ca4d7d
    error: Your local changes to the following files would be overwritten by merge:
    gnofract4d
    Please, commit your changes or stash them before you can merge.
    Aborting

    Regards

    Pleckmage

     
  • Catenary
    Catenary
    2011-12-05

    That means you have manually edited the file locally, and git pull wants to retrieve the changes I made, which would overwrite it.

    You can do

    git reset -hard HEAD

    to revert the changes you made locally - pull will then work.

     
  • pleckmage
    pleckmage
    2011-12-06

    Catenary,

    thanks, it works!

    However, I do get an repeating error in the X11 window:
    Dec  6 17:47:43 192-168-1-2.tpgi.com.au Python <Error>: clip: empty path.

    It crashed when I selected full screen F11 mode. I cannot reside the application.

    I think the next thing to work on is the libjpeg files.

    I also edited the gnofract4d file with "!/opt/local/bin/python2.7"

    Regards

    Pleckmage

     
  • lordhowe
    lordhowe
    2012-06-13

    Hi people :D

    I have been having this exact problem, pretty much to the dot. I have worked my way through the steps described to Pleckmage and was successful in running ./setup.py build. but it gives me errors on the png libs as well as the jpg ones. ..

    My issue is though I cannot run ./setup.py install because i get "changing mode of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fractutils/get.py to 755
    running install_scripts
    changing mode of /Library/Frameworks/Python.framework/Versions/2.7/bin/gnofract4d to 755
    running install_data
    creating /Library/Frameworks/Python.framework/Versions/2.7/share/doc/gnofract4d
    error: could not create '/Library/Frameworks/Python.framework/Versions/2.7/share/doc/gnofract4d': Permission denied
    "

    why is it so hard!?  its like some ub3rsexyl33th4xah fractylgenerator or something

     
  • Catenary
    Catenary
    2012-06-14

    Well, it's hard because OS X is not the primary platform for Gnofract 4D - it's primarily a Unix program. OS X is enough like Unix that it can be compiled there with some effort, but hasn't historically been the focus. It would be terrific if some dedicated Mac user could work out how to build a binary package we could distribute - hint hint- but so far that hasn't happened.

    In your case I think the solution is either:
    1) don't run setup.py install - just run ./gnofract4d, it can run directly out of the dir where you built it.
    2) sudo setup.py install - you don't have permission to write to /Library unless you're an admin

     
1 2 > >> (Page 1 of 2)