resynthesizer
resynthesizer copied to clipboard
Mac instructions
Was hoping to find all instructions with a Mac category
Instructions for building? I haven't built on OSX. You would need all the GNU build tools and the GIMP lib to build it, since that is what the current build system uses.
If you just want to install it, I think you could find it pre-built for OSX. That is, something you would just drag into your GIMP plugins directory.
If you have built GIMP on OSX, then the same build tools should work for Resynthesizer. If you just installed GIMP, then I suggest you also just install a prebuilt Resynthesizer plugin.
There are many different mac builds for resynthesizer, which are possible different versions and or projects. It might be nice for this project to link to a recommended build.
Installing most of the build dependencies with homebrew wasn't too hard, but I'm not sure how to install the "GIMP development libraries". Do you have to build gimp itself in order to have those installed?
I have not built GIMP or Resynthesizer on Mac. My best guess is: yes, you need to build GIMP.
On Linux, you acquire the package 'libgimp2.0-dev', which contains the include files/headers (.h) and library (libgimp.so or similar). Resynthesizes includes the former and links to the latter. You might can get the equivalents for the Mac without building.
Looks like homebrew doesn't have libgimp2.0-dev
because gimp is installed pre-built. So I'll probably need to build gimp locally in order to build gimp plugins.
@karlkfi Did you actually succeed in building osx binaries?
Its distributed in this version, but its not the multi-threaded version. http://partha.com/
It probably is not important that you use v2 compiled multithreaded. There should be no functional difference between v1 and v2, and the performance from multithreading is usually not huge because of the nature of the algorithm. v2 was created to test multithreading and the result was not great (say a speedup of say 1.5 or less, certainly not proportional to the number of cores.) v2 was also created for architectural reasons, to have a reentrant inner library (no global variables) and that shouldn't matter for most users. I could be wrong, I haven't tested on the Mac, and certainly your experience could be different.
On Linux, you acquire the package 'libgimp2.0-dev', which contains the include files/headers (.h) and library (libgimp.so or similar). Resynthesizes includes the former and links to the latter. You might can get the equivalents for the Mac without building.
Can't it be used on macOS too?
The linux build does not work on MacOSX. You must build it yourself for MacOSX, or acquire it from someone else who has built it for MacOSX. As in the link above to Partha.
I was referring to the libgimp2.0-dev
package, not the whole plugin.
Sorry. Building resynthesizer requires libgimp2.0-dev, a package that include headers for linking to Gimp libraries. Which usually means you must first build Gimp on the platform (MacOSX in this case), since libgimp2.0-dev is not usually distributed in packages of Gimp for users (as opposed to developers.)
I'm using a Mac right now. I just don't develop on it, much. I wish it were easier to cross between platforms.
I took a shot at this. Got it compiled and running on macOS 10.12.6 with GIMP 2.10.10. My best effort at documenting the steps is here (https://gist.github.com/ryan-robeson/5841f712ff23c910bbbfac793c16bfad).
I didn't start with a fresh Homebrew install or take a lot of notes, so there are probably some things missing (primarily dependencies).
Hope this helps.
Thanks. I will try to replicate it, and document it in the repository. No promises.
I used macports, and was able to do
sudo port install gimp
git clone https://github.com/bootchk/resynthesizer
cd resynthesizer
./autogen.sh
./configure
make
sudo make install
Though, I think I had to copy the files from /opt/local/lib/gimp/2.0/plug-ins/ to ~/Library/Application\ Support/gimp/2.10/plug-ins/. It was rather painless, but I also didn't start fresh and am rather used to these things.
Update: After writing the first version of the guide referenced above, I decided to create a Tap for libgimp2.0 (2.10.10).
I just added Resynthesizer as well. So, assuming an existing Homebrew installation, the following should be all it takes to install Resynthesizer (v2.0.3):
# Add `--HEAD` to compile from `master`
brew install ryan-robeson/gimp/resynthesizer
Then in GIMP (initial install only):
- Go to
Preferences > Folders > Plug-ins
- Add
$(brew --prefix)/share/gimp-plugins/resynthesizer
to the list- The exact path is listed under Caveats after running
brew install...
- The exact path is listed under Caveats after running
- Restart GIMP
P.S. Bottles are provided so the install should be fast (using --HEAD
disables bottles, so YMMV). I've only tested on Sierra, but I believe more recent versions should work just as well. Feedback is welcome.
Ryan, I just wanted to chime in and say thank you so much for putting this together.
I did run into a hickup, looks like something to do with the libgimp2.0 library version:
Crash Report
Process: resynthesizer [61768] Path: /usr/local/Cellar/resynthesizer/2.0.3/share/gimp-plugins/resynthesizer/resynthesizer Identifier: resynthesizer Version: 0 Code Type: X86-64 (Native) Parent Process: GIMP-bin [61749] Responsible: resynthesizer [61768] User ID: 501Date/Time: 2019-06-25 16:39:12.736 -0700 OS Version: Mac OS X 10.14.5 (18F132) Report Version: 12
Time Awake Since Boot: 710000 seconds Time Since Wake: 11000 seconds
System Integrity Protection: disabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x3] Wrong version
Application Specific Information: dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/Applications/GIMP.app/Contents/Resources/lib
Dyld Error Message: Library not loaded: /usr/local/opt/libgimp2.0/lib/libgimpui-2.0.0.dylib Referenced from: /usr/local/share/gimp-plugins/resynthesizer/resynthesizer Reason: Incompatible library version: resynthesizer requires version 1001.0.0 or later, but libgimpui-2.0.0.dylib provides version 801.0.0
Binary Images: 0x102704000 - 0x10270fff7 +resynthesizer (0) <45E5E4B0-0AC9-3992-8264-08BE603AEBFD> /usr/local/share/gimp-plugins/resynthesizer/resynthesizer 0x1113b3000 - 0x11141d6ef dyld (655.1.1) <CE635DB2-D47E-3C05-A0A3-6BD982E7E750> /usr/lib/dyld
Model: MacBookPro11,3, BootROM 153.0.0.0.0, 4 processors, Intel Core i7, 2.3 GHz, 16 GB, SMC 2.19f12 Graphics: kHW_IntelIrisProItem, Intel Iris Pro, spdisplays_builtin Graphics: kHW_NVidiaGeForceGTX750MItem, NVIDIA GeForce GT 750M, spdisplays_pcie_device, 2 GB Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.77.61.2 AirPortDriverBrcmNIC-1305.8) Bluetooth: Version 6.0.12f1, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0512F, 500.28 GB USB Device: USB 3.0 Bus USB Device: Apple Internal Keyboard / Trackpad USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1
Thanks for the feedback @dandroid88. Looks like your crash is related to my Homebrew package. I'm not sure what the etiquette is for moving an issue, but I created ryan-robeson/homebrew-gimp#1 so we can discuss this in its own thread.
Also, if you wouldn't mind editing your comment here and wrapping the crash log in <details>
tags, it'll keep this thread a little more readable. Example:
<details>
<summary>Crash Report</summary>
Process....
</details>
Thanks!
New twist for 2020: 🎉
python@2 was deleted from homebrew/core in commit 028f11f:
python@2: delete (https://github.com/Homebrew/homebrew-core/issues/49796)
EOL 1 January 2020.
We gave it 1 month more to live so that people had time to migrate.
All in all, developers had 11 years to do their migration.
You can use the `brew extract` command and maintain python@2 in your own
tap if necessary:
I recently updated my tap to support GIMP 2.10.18. I also added the python@2 formula. Thanks for the heads up.
Thanks so much for putting this together! I had problems when I tried to use it with GIMP 2.10.12 though, haha.
Also - a few broken links you probably know about, if it helps.
curl: (22) The requested URL returned error: 404 Not Found Error: Failed to download resource "python@2" Download failed: https://homebrew.bintray.com/bottles-gimp/python%402-2.7.17_1.mojave.bottle.tar.gz
curl: (22) The requested URL returned error: 404 Not Found Error: Failed to download resource "pygobject" Download failed: https://homebrew.bintray.com/bottles-gimp/pygobject-2.28.7_2.mojave.bottle.tar.gz
curl: (22) The requested URL returned error: 404 Not Found Error: Failed to download resource "pygtk" Download failed: https://homebrew.bintray.com/bottles-gimp/pygtk-2.24.0_3.mojave.bottle.2.tar.gz
Hi @finhj, I created an issue over on the repo of my Tap where we can discuss the problems you're having.
Thanks for the heads up on the links. Looks like I may need to provide bottles for those as well.
brew install ryan-robeson/gimp/resynthesizer
Thank you for your effort with resynthesizer.
I am on MacOS Catalina and tried
brew install ryan-robeson/gimp/resynthesizer
as well as
brew install --build-from-source libgimp2.0
as well as
brew install libgimp2.0
And I get with all 3 commands:
==> Downloading https://ghcr.io/v2/homebrew/core/python/2/manifests/2.7.17_1
##O#- #
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "python@2_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/python/2/manifests/2.7.17_1
Thanks for any help.
I think that homebrew has stopped supporting Python2. Thats what the message means. According to what I read on the net.
I think that a GIMP from homebrew is not built, just a .dmg that the gimp.org has built. I don't know whether that includes Python 2 and the library libgimp2.0 suitable for building Resynthesizer.
I have used MacPorts to build GIMP and Resynthesizer recently. Seems to work.
GIMP version 2 uses Python2 until Gimp version 3 is released.
Its a dumpster fire of a mess.