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

Build issues

Developers
2009-05-08
2013-05-15
1 2 > >> (Page 1 of 2)
  • Hello everybody!

    First, I want to say that my background is mainly from the Linux side -- I am new to OS X and I just discovered macports 2 days ago, so apologies if the following is obvious for you...

    It all started with a plugin I wanted to have in Gimp. Since I have installed the 'GIMP on OS X' version from Lisanet, I understand that I need the same environment to compile my plugin, so I started by re-compiling the GIMP using the resources from this project.

    I have a freshly installed iMac intel with latest OS X Leopard, and just downloaded the latest XCode bundle from apple. I don't have fancy things installed, and definitely no MacPort or Fink.

    I have downloaded the 'Gimp on OS X'  from here (SVN 51), and started the build.

    I ran into a couple of issues:

    1) Message: Failed to parse file x11/gtk2/Portfile: invalid command name "port:gtk-doc"
    It seems to be an easy one, there is a missing '\' on line 63 in  'x11/gtk2/Portfile':
       63 depends_build   port:pkgconfig
       64         port:gtk-doc

    2) xrender fail to build with the following error message:
            checking for X... configure: error: Package requirements (x11) were not met:
            No package 'x11' found
    I am not sure how to handle this one. I have checked my installed binaries dowloaded from Lisanet, and they are linked with the OS-X X11 libraries, not the MacPorts ones, so we do not need the x11 MacPort.
    I fudged the 'x11/xrender/Portfile':
       56     if {${os.major} < 9 && ![file exists ${prefix}/lib/pkgconfig/x11.pc]} {
    changed to:
       56     if {${os.major} <= 9 && ![file exists ${prefix}/lib/pkgconfig/x11.pc]} {
    to get rid of the dependency.
    It now compiles properly, but I doubt this was the right thing to do...

    3) Having done that, the build came eventually to an end, and I have a running GIMP :)
    ... Except that I produced a GIMP 2.6.5 binary, and Lisanet ships 2.6.6 :(
    I probably need to update the  'graphics/gimp2/Portfile' to get 2.6.6, but before going there and re-inventing the wheel, maybe one can upload the right file on SF...

    Any help appreciated
    - To properly solve the x11 issue
    - To build a 2.6.6 binary just as the one available on Lisanet

    Thank you in advance

     
    • ok, I never had the time to write a HOWTO for comiling GIMP on OS X. So I'll try to give some basic hints about it.

      Here's an old page I once wrote. It's a bit outdated, but the main building process is still the same.
      http://gimp.lisanet.de/Website/Developers.html

      So to build 'GI'MP on OS X you should do:

      create: ~/src/macports
      (that's really need. The scripts rely on it)
      cd ~/src/macports

      checkout SVN. You should get two directories: "GimpPorts" and "scripts"
      Go to "scripts" and copy the three scripts to ~/scr/macports. (they need to be there. Yes, I know, this is not a good coding style, but nverteheless...)

      Move away any other MacPorts installation ! Check you PATH to _not_ point to any old MacPorts bin directory! The port command should _not_ be found!

      Then do

      cd ~/scr/macports

      (prepare the GimpPorts repository)

      sudo ./gp-prep
      (you'll get a new directory "Gimp-app". This is your new MacPorts tree for GIMP on OS X

      sudo ./gp-makeports
      (this should download MacPorts, do a selfupdate and integrate the GimpPorts repository)

      follow the instructions on the screen: export the MACPORTS variable, add your PATH like shown on the screen.

      sudo port gimp +universal

      Wait.... wait...
      It maybe necessary to activate some perl or python prot by "sudo port -f activate <portname>"

      wait...

      then finally do

      ./gp-app

      (this should build the freshly compiled GIMP on OS X application bundle)

      BTW, 2.6.6 isn't in SVN. Currently I'm trying to do some updating on libraires (gtk, glib2, cpang, cairo, but still get some very strange behaviour...)

      And, finally, _please_ you need to have some basic knowledge in MacPorts, compiling sources, and doing things wiht bash scripts. I will not give any support to new users how want to try a build on their own, without know aynthing about MacPorts. Please download the precompiled bundles instead.

      If you are a developer... great. Do you want to join the project? Wow. Drop me a line.

      -skl

       
      • Tnx, and btw, I already read all that before posting -- as i said, I managed to get a running 2.6.5 ;)

        I wanted to point out that the current SVN does NOT build as such due to the issues 1 & 2 reported above

        ... And I was just a bit frustrated not to get a 2.6.6 at the end of the journey.

        The reason I wanted to compile it by myself is to have the environment to compile an additional plugin compatible with your latest version and be able to re-distribute it without having to make yet-another-gimp package.

        I'll start to build against 2.6.5 and will update when 2.6.6 will be in the SVN.

         
    • BTW, why do you want to build and compile GIMP on OS X on your own?

       
    • oops, of course, if you checkout SVN you'll get the "Gimp-app-template" directory too. This is needed by "gp-app" to create the applcation bundle.

       
    • ... and 2.6.6 is now in SVN.

      (I hope I didn't miss anything...)

       
    • Ooops, missed some of your replies...

      I'll check out the latest revisions and will try to rebuild

      I'll keep your posted.

       
    • Okay, with SVN-54, I was able to build a fully functional 2.6.6

      (Still had to hack the xrender portfile though)

      Tnx for your help.

       
  • Karsten
    Karsten
    2009-12-17

    I try to follow the recipe of lisanet but stick during 'port install gimp +universal' with message:


    -->  Staging gimp2 into destroot

    -->  Staging gimp2 into destroot for architecture x86_64

    -->  Staging gimp2 into destroot for architecture i386

    Error: Target org.macports.destroot returned: /tmp/skl/Gimp.app/Contents/Resources/lib/gimp/2.0/python/gimpenums.pyc differs in /tmp/skl/Gimp.app/Contents/Resources/var/macports/build/_Users_kr1_src_macports_GimpPorts_ports_graphics_gimp2/work/destroot-i386 and /tmp/skl/Gimp.app/Contents/Resources/var/macports/build/_Users_kr1_src_macports_GimpPorts_ports_graphics_gimp2/work/destroot-x86_64 and cannot be merged

    Error: The following dependencies failed to build: gimp-focusblur gimp2 gimp-jp2 gimp-launcher gimp-lqr-plugin liblqr gimp-noise-generator gimp-normalmap glew gtkglext gimp-resynthesizer gimp-wavelet-decompose gimp-wavelet-sharpen greycstoration gtk2-clearlooks gutenprint macfile-gimp ufraw exiv2 gtkimageview

    Error: Status 1 encountered during processing.

    I am on Snow Leopard. Any hint is appreciated

    Karsten

     
  • yep, you're right.

    In order to build GIMP on SL you need to patch MacPorts. This patch is not included in SVN for various reasons:

    - I don't know how to modify the build scripts to ensure, that this patch get's applied only on SL using MacPorts 1.8.1
    - I have no idea to ensure that MacPorts will be automatically re-patched after a self-update
    - you can donwload a ready-to-use app bundle and do not need to build it on your own
    - I just had forgotten to upload it to SVN … ;-)

    -skl

     
  • Karsten
    Karsten
    2009-12-18

    Thank you,

    in fact I would prefer to use a ready-to-use app bundle. But up to now I have not found one which allows me to build plugins not loaded with references to MacPorts (in /opt…) and elsewhere. I liked to build a universal plugin which relys only on a Gimp installation, unluckily the app bundle does not contain the necessary files (headers, gimptool-2.6 etc.).

    Can you give me some more information about that mentioned patch? I tried to install MacPorts 1.8.1 directly but that idea was a bit blue-eyed and failed early.

    Thanks in advance
    Karsten

     
  • As I mentioned before, up to now, the patch may work in most situations. If you're somehow familiar with Terminal.app and compiling soureces, well, here's some more information.

    I've just updated SVN. There are two ways to get it to work.

    First: clean install (IMO, that's not what you're looking for because you already have installed MacPorts and have compiled many sources, but nevertheless, maybe somebody else reads this…)

    - prepare your system (see above, checkout SVN, copy scripts…)
    - create '~/src/mcports', and cd to it
    - 'sudo ./gp-prep'
    - 'sudo ./gp-makeports' (this should install the patch)
    - 'sudo port install gimp' (the +universal isn't needed any longer)
    - './gp-app'
    -

    Second: already have installed MacPorts 1.8.1 and all the necessary scripts, dirs and have tried to build GIMP and got the error… (that's waht you should do)

    - update your SVN
    - copy the file 'GimpPorts/macports/muniversal-1.0.tcl' to '~/src/macports/Gimp-app/Contents/Resources/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group' overwriting the existing one
    - now start again to compile GIMP by first 'sudo ./gp-prep'
    - as there's an error on compiling gimp2: 'sudo port clean gimp2'
    - now: 'sudo port install gimp'
    - that should do it and everything should compile well ….

    Finally, be aware, after sefupdating MacPorts you have to re-install the patch. And maybe if MacPorts will change the way they handle universal builds, the patch won't work… So you'll be warned :-)

    -skl

     
  • Karsten
    Karsten
    2009-12-19

    Thank you again, skl, it worked like a charm. It is still not finished but…

    I think I will now try to make a portfile for the plugin I'd like to build. It is/will be in some future a replacement and extension of greycstoration plugin, which is AFAIK not maintained anymore. It is gmic_gimp in gmic.sourceforge.net

    By the way could that ~/src/macports environment not become some sort of development package stuffed in a dmg?

    Thanks again

    Karsten

     
  • Karsten
    Karsten
    2010-01-20

    After preparing the environment to build universal Gimp plugins linked against GimponOSX under SnowLeopard I would like to do the same for Leopard (arch ppc) following the directions of skl. Unluckily I have there again some problems during 'port install gimp'.

    First: I could not build ports with ppc and i386 architecture (on my PowerPC). During gs installation a binary of i386 arch was executed. Deleting i386 let continue the installation. But than the next problem occurred

    Second:
    sudo port install gimp
    Password:
    -->  Computing dependencies for gimp
    -->  Building gtk2
    -->  Building gtk2 for architecture ppc
    Error: Target org.macports.build returned: shell command " cd "/tmp/skl/Gimp.app/Contents/Resources/var/macports/build/_Users_karo_src_macports_GimpPorts_ports_x11_gtk2/work/gtk+-2.16.6-ppc" && /usr/bin/make -j2 all " returned error 2
    Command output: /usr/bin/make  all-recursive
    Making all in po
    make: Nothing to be done for `all'.
    Making all in po-properties
    make: Nothing to be done for `all'.
    Making all in gdk-pixbuf
    /usr/bin/make  all-recursive
    Making all in pixops
    make: Nothing to be done for `all'.
    Making all in gdk
    /usr/bin/make  all-recursive
    Making all in x11
    make: Nothing to be done for `all'.
    Making all in .
    Making all in tests
    make: Nothing to be done for `all'.
    Making all in gtk
    /usr/bin/make  gtk-update-icon-cache
    make: `gtk-update-icon-cache' is up to date.
    GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ./gtk-update-icon-cache -force -ignore-theme-index \
       -source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&        \
    mv gtkbuiltincache.h.tmp gtkbuiltincache.h
    gtk-update-icon-cache: The generated cache was invalid.
    make: ***  Error 1
    make: ***  Error 1
    make: ***  Error 2

    After trying around than with standard MacPorts gimp installation (unluckily version 2.6.7) and replacing /opt/local by /tmp/skl/Gimp.app/Contents/Resources , I found that GimponOSX 2.6.8 for Leopard provides an older libgtk-x11 library:

    dyld: Library not loaded: /tmp/skl/Gimp.app/Contents/Resources/lib/libgtk-x11-2.0.0.dylib
      Referenced from: /Users/karo/Library/Application Support/Gimp/plug-ins/gmic_gimp
      Reason: Incompatible library version: gmic_gimp requires version 1801.0.0 or later, but libgtk-x11-2.0.0.dylib provides version 1601.0.0

    I would appreciate any hints to overcome (some of) these things.

    I think one possibility to allow relatively easy the built of Gimp plugins without MacPort installation in /opt/local would be to provide a let's say fat version of Gimp.app with include/lib/bin directory content necessary for the build (header files, gimptool-2.0, libs).

    Thanks in advance
    Karsten

     
  • No, the easiest way for plugin development for GIMP on OS X is to use the GIMP on OS X tree of Portfiles.

    You can _not_ mix MacPorts with the GIMP on OS X repository.

    I've choosen to use the GIMP on OS X repository mainly to overcome some limitations and other issues with MacPorts. These were mainly:
    - MacPorts is bleeding edge. If you build somerthing today, it's very likely that tomorrow you need to install additional ports. That will lead to different bundles for Tiger / Leopard / SnowLeopard and that would make my life much more complicated (There's only suv and me, who provide support for GIMP on OS X)
    - GIMP on OS X is more stable, if I use my own repository
    - GIMP on OS X builds as universal i386/ppc and x86_64/i386. MacPorts doesn't.
    - GIMP on OS X has significant fewer dependancies. This will lead to lesser bugs. GIMP will be more stable
    - I can add plugins very easy
    - I can overcome MacPorts decision to striclty use own libraries even if they exist on the system (just see the bloated X11 deps in MacPorts…)
    - bug fixing is easier
    - the development cylce: clean - patch - build - test will be much faster on all three supported platforms

    But as with every SVN, the SVN of GIMP on OS X is meant to be for developers and not a ready to use "package" for advanced users to build GIMP. The scripts are IMO very well documented and should be self describing their usage if one is familiar with bash scripts, compiling sources and using MacPorts (which is indeed the basis of any plugin development)

    About a fat binary:

    Sorry, but I have no time to do that too. I'm providing GIMP on Tiger, Leopard and Snow Leopard. I provide four packages for manuals in different languages, I try fixing bugs in MacPorts to make the GIMP on OS X builds far more stable than the MacPorts ones, I even now hack on the sources of GIMP and GTK+/GLIB to integrate it better into OS X (take a look at the dotfiles. MacPorts just doesn't care about them, although they are not very OS X alike.) I add plugins, that are IMO usefull and very professional, which MacPorts doesn't know. And there'S only ~suv-sh, who is willing to help by offering a very good support in the forums. So, sorry, I don't want to build "fat" packages for three platfroms too.

    And, again sorry, I really appreciate any help I could get, but I don't have the time to give support in deveolping plugins too. If you want to join the project, .. that would be great, but, please try to get your GimpPorts tree up and running. This will give you really many useful information and hints about how to implement your plugins and what are IMO the advatages of _not_ using the MacProts repository.

    GTK:
    yep, it's still and older version, but this might change in one of the next release. But updating GTK will need an update to pango / cairo too. And this might cause problems (AFAIK in pangos font handling ?) as someone has reported on the MacPorts lists…

    You see, there's a lot to do….

    -skl

     
  • Karsten
    Karsten
    2010-01-21

    Thank you skl for your comprising reply.

    I understand and accept your point.

    I appreciate your work and I am very happy with GimponOSX. That is in fact a large progress compared to Gimp under MacPorts. If I had some more software development skills I would propose my help.

    Yes, I am happy with your GimpPorts tree, although I could up to now not prepare the tree for Leopard. And again I appreciate your help in using your environment.

    My idea with the "fat binary" results of course from your script gp-app. Maybe I will try to prepare a gp-app-dev script generating Gimp-dev.app allowing beside Gimp usage the build of plugins with the inbuilt libraries.

    Concerning useful plugins added into your tree, have a look into https://sourceforge.net/projects/gmic/files/gmic_gimp_macosx.zip/download (up to now only for SL), which is a complex extension of greycstoration plugin. There is only (?) to prepare the port and the makefile adapted. Unluckily I have still to learn a bit about ports.

     
  • The GimpPorts tree builds fine on Leopard too.

    But you need to boot your Mac into Leopard. You may run into trouble, if you boot your machine on SL and try to set teh arch to i386/ppc. AFAIK, this will fail.

    So if you boot into Leopard 10.5.6 and set up a fresh GimpPorts (mkdir src/macports; sudo gp-prep, sudo gp-makeports; sudo port install gimp; gp-app) everything should run fine and you will ensure, that you use the correct libs for your plugin. (the ones in /tmp/skl/Gimp.app/….)

    BTW, I know about GMIC, but IMO it's very overloaded and IMO it's very confusing that GMIC uses it's own scripting language. So there will be just another scripting language be added to GIMP. And IMO it's more like a separate program to image manipulation with some other workflow concept, which doesn't fit will it GIMP.

    GREYCstoration (the plugin I've included in GIMP) OTOH is a powerful noise reduction plugin and this fits very well into GIMP's basic consecpts of plugins.

    Nevertheless, if you build GMIC as a plugin for GIMP… great, so users have the choice if the want to use it with GIMP or as a separate binary.

    Just two more things: build your plugin as universal binary x86_86/i386 for SL and i386/ppc for Leopard and Tiger and please state clearly which one is for which GIMP version.

    -skl

     
  • … oops, sorry, I meant "Leopard 10.5.8".

     
  • Karsten
    Karsten
    2010-01-21

    The GimpPorts tree builds fine on Leopard too

    I will try it again on my MacPRO with Leopard. The problems occurred on the PowerPC! I am a bit hesitating to reboot my macPRO, it is used heavily.

    BTW, I know about GMIC, but IMO it's very overloaded and IMO it's very confusing that GMIC uses it's own scripting language

    Extended functionality aka overload is the case for many parts of Gimp. The scripting language of gmic plugin is hidden. Maybe for continuity concerns the plugin should open by default in the noise reduction (greycstoration) part!

    Just two more things

    In fact there is up to now only one universal binary for SL, but not sufficient described. Tiger I do not have anymore!

    Thanks for your help
    Regards

    Karsten

     
  • Karsten
    Karsten
    2010-03-25

    I have to rebuild Gimp on SL!
    Using the hints above there is a problem with Gimp plugin fix-ca. Seemingly the port is called gimp-fix-ca, so the fix-ca from Gimponosx is not used. Any hints are appreciated:

    $ sudo port install gimp
    -->  Computing dependencies for gimp
    -->  Fetching gimp-fix-ca
    -->  Attempting to fetch fix-ca-3.0.2.tar.gz from http://lil.fr.distfiles.macports.org/gimp-fix-ca
    -->  Attempting to fetch fix-ca-3.0.2.tar.gz from http://kcd.sourceforge.net/fix-ca.php
    -->  Verifying checksum(s) for gimp-fix-ca
    Error: Checksum (md5) mismatch for fix-ca-3.0.2.tar.gz
    Error: Checksum (sha1) mismatch for fix-ca-3.0.2.tar.gz
    Error: Checksum (rmd160) mismatch for fix-ca-3.0.2.tar.gz
    Error: Target org.macports.checksum returned: Unable to verify file checksums

    Karsten

     
  • yep, I've just mixed up the directory names. Sorry. 

    As there's so much to do, I've had no time to update SVN. Sorry again. I'll try to fix this as fast as possible. But, first, I'm trying to get the new build run smoothly (teh separate+ plugin crashes on SL).

    So please be patient. (or just disable the building on gimp-fix-ca)

    BTW, you need to put the gimp-fix-ca (if it's available in SVN) into manually into MacPorts distfiles directory (HOME/src/macports/Gimp-app/Contents/Resources/var/macports/distfiles) . I don't know how to do this automatically….

    -skl

     
  • And, I just want to mention, that SVN may not always build properly…. because, well, it's a development snapshot of the current work in progress…

    -skl

     
  • Karsten
    Karsten
    2010-03-26

    Thank you skl

    I have disabled the gimp-fix-ca port. Gimp was than built.

    No problem with 'work in progress'. I prefer it compared to stasis.
    Karsten

     
  • … SVN has been updated (remember: copy distfiles manually)

     
  • Karsten
    Karsten
    2010-08-01

    I have tried to rebuild my environment according your description, unluckily now I have an error concerning liblqr

    sudo port install gimp
    -->  Computing dependencies for gimp
    Error: Cannot install liblqr for the arch(s) 'i386 x86_64' because
    Error: its dependency pkgconfig does not build for the required arch(s) by default
    Error: and does not have a universal variant.
    Error: Unable to execute port: architecture mismatch

    Any hint how to proceed?
    Regards
    Karsten

     
1 2 > >> (Page 1 of 2)