I am brand new to the macOS. (basic familiarity with it, first time user).
I do sort of daily builds on Windows and Linux so I do understand the process.
The very first line states 64 bit Intel only and the M1 is arm based.
Next is the installation of MacPorts, there is one for macOS Big Sur v11 , I assume I pick that one up.
Then there are some 10.7 references, not sure if those remain the same or change.
The reason I am asking these questions is, I don’t want get myself attempting to install something that won’t work and I will in all likelihood have a tough time undoing thing as I am not fully aware of thing on the macOS.
I am more than willing to experiment with some guidance.
Of course you can ditch the „macosx_deployment_target 10.7“ and „ DCMAKE_OSX_DEPLOYMENT_TARGET=10.7“ statements - these are just needed if you intend to build for the older platforms too.
It might be more challenging to get a proper macports environment with current XCode…
gnutls should be there if macports 2.6.4 is installed. I reinstalled macports a few days ago from scratch - and this was ok.
I’m not sure which path variable you set. There’s no path variable to set according to BUILD.txt
I went ahead and installed the pre packaged macports for BigSur.
The macports installed the gnutls ports and I could move forward.
This line in DT build instructions gave me an error , patch could not be applied.
I proceeded further.
At line which installs the dependencies
It errored out after some building
—> Attempting to fetch libunistring-0.9.10.tar.gz from ftp://ftp.lip6.fr/pub/gnu/libunistring
—> Verifying checksums for libunistring
—> Extracting libunistring
—> Configuring libunistring
—> Building libunistring
Error: Failed to build libunistring: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/main.log for details.
Error: Follow MacPorts Guide to report a bug.
Error: Processing of port git failed
Any pointers to get around this would be greatly appreciated.
Thank you @paperdigits and @MStraeten for assisting.
Error: Failed to build libunistring: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/main.log for details.
A dev on macport went ahead and made some changes to the official darktable port for macports. Doesn’t help me, but it may help people building DT on non M1 macs without using the build instructions provided by DT. I have not tested this and I don’t why separate instructions are provided for DT.
Just doing a sudo port -v install darktable on a mac should work.
The following is quoted from a reply on the macports bug tracker:
I had a go at building darktable on Catalina.
First thing I can tell you is that it is set up to only build properly in the +quartz variant.
I fixed it to the point where the x11 variant would build (this is the default for MacPorts) and run, but there are no visible menus – otherwise it works. I’ll check that out and consider pushing it if that x11 fix is correct.
He then went ahead to install the pre built image and came to the conclusion that they (gui) were identical.
the separate build instructions in darktable/BUILD.txt at master · darktable-org/darktable · GitHub focus on building a package, that can be run on multiple osx revisions beginning with 10.7. This is actively maintained.
the macports build just runs on your box - but it’s not maintained sufficiently
I am specifically targetting a build for the M1 mac (building for older OS versions is not my aim), which the current build instructions don’t satisfy or the dt macport port. If I need to work with the master branch I need the ability to build it myself.
I will try it out, currently trying to get the macports version of darktable to work a there are people that can help support that in the macports forums.
As stated in Help Offer: Compiling on M1 Apple computer · Issue #7564 · darktable-org/darktable · GitHub the homebrew instructions were updated, so darktable can also be built with homebrew in general (i tried this successfully in a virtual mojave installation). Just for a local use until somebody adapts the packaging instructions to deal with homebrew build environment.
But that also doesn’t help if the stuff isn’t ported for arm
I finally got it to run on Big Sur 11.1 building with Xcode 12.3 (SDK11.1) and macports. The libgcrypt was missing a #include in one of the files which resulted in build failure, and cairo required patching to prevent a runtime crash of DT.