Project

General

Profile

Feature #11380

Update build instructions for macOS

Added by Caleb Gregory 6 months ago. Updated 3 months ago.

Status:
Incomplete
Priority:
Low
Assignee:
-
Category:
Buildsystem
Target version:
-
Start date:
12/22/2016
Due date:
% Done:

20%

Affected Version:
git stable branch
System:
Mac OS X
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I've tried on and off for the last few years to try to get Darktable to build on my Mac, and although I feel like I've probably gotten fairly close a couple of times, I've never succeeded in actually getting it to survive the build process. Could someone update the build instructions, both in the source and here: https://redmine.darktable.org/projects/darktable/wiki/Darktable_on_OS_X?

I'd perfer if it could be a full, start-from-scratch tutorial. Thanks a lot!

History

#1 Updated by Roman Lebedev 6 months ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete

https://github.com/darktable-org/darktable/blob/master/packaging/macosx/BUILD.txt is the genuine version of build instructions for macOS. And it is up-to-date.
You could also use homebrew to get the deps (using Brewfile)

#2 Updated by Caleb Gregory 3 months ago

I just followed the build instructions now and it's not building for me :(

Most of the tests are failing when I run

CC=gcc-mp-5 cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DBINARY_PACKAGE_BUILD=ON

Then

make
will fail as well. Any ideas?

#3 Updated by Roman Lebedev 3 months ago

Caleb Gregory wrote:

Any ideas?

Actually showing the log is always a good idea

#4 Updated by Caleb Gregory 3 months ago

Oops, sorry about that!

Here's what I get when I run

CC=gcc-mp-5 cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DBINARY_PACKAGE_BUILD=ON

-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc-mp-5
-- Check for working C compiler: /opt/local/bin/gcc-mp-5 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test _MSSE2
-- Performing Test _MSSE2 - Success
-- Building SSE2-optimized codepaths: ON
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found little endian system. Good.
-- Performing Test IS_SUPPORTED_PLATFORM
-- Performing Test IS_SUPPORTED_PLATFORM - Success
-- Is the target platform supported: 1
-- Mac OS X build detected, setting default features
WARNING: CMAKE_BUILD_TYPE is not defined!
         Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.
-- Looking for external programs
-- Found perl
-- Found intltool-merge
-- Found desktop-file-validate
-- Missing appstream-util, problems in darktable.appdata.xml might go unnoticed
-- Missing jsonschema, problems in noiseprofiles.json might go unnoticed
-- Found xsltproc
-- Found xmllint
-- All external programs found
-- Found Gettext 
-- Found msgfmt to convert language file. Translation enabled
-- Performing Test COMPILER_SUPPORTS_C99
-- Performing Test COMPILER_SUPPORTS_C99 - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing:  OpenMP_CXX_FLAGS) 
-- Found Glib 2.50.3
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.22.10
-- Found GTK3: /opt/local/include/gtk-3.0;/opt/local/include/gio-unix-2.0/;/opt/local/include/cairo;/opt/local/include;/opt/local/include/pango-1.0;/opt/local/include/harfbuzz;/opt/local/include;/opt/local/include/pango-1.0;/opt/local/include/atk-1.0;/opt/local/include/cairo;/opt/local/include/pixman-1;/opt/local/include;/opt/local/include/freetype2;/opt/local/include;/opt/local/include/libpng16;/opt/local/include;/opt/local/include/freetype2;/opt/local/include;/opt/local/include/libpng16;/opt/local/include/gdk-pixbuf-2.0;/opt/local/include/libpng16;/opt/local/include/glib-2.0;/opt/local/lib/glib-2.0/include;/opt/local/include (Required is at least version "3.14") 
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found suitable version "2.9.4", minimum required is "2.6") 
-- Checking for one of the modules 'libsoup-2.4;libsoup2'
-- Checking for one of the modules 'libsoup-2.2;libsoup2'
-- Found GPHOTO2: /opt/local/lib/libgphoto2.dylib  
-- Found OPENEXR: /opt/local/lib/libIlmImf.dylib;/opt/local/lib/libImath.dylib;/opt/local/lib/libIex.dylib;/opt/local/lib/libIlmThread.dylib  
-- Found WEBP: /opt/local/lib/libwebp.dylib (Required is at least version "0.3.0") 
-- Found LENSFUN: /opt/local/lib/liblensfun.dylib  
-- Found GIO 
-- Found GThread: /opt/local/lib/libgthread-2.0.dylib  
-- Found GModule: /opt/local/lib/libgmodule-2.0.dylib  
-- Found PANGOCAIRO: /opt/local/lib/libpangocairo-1.0.dylib  
-- Found PThread: /usr/lib/libpthread.dylib  
-- Found RSVG2: /opt/local/lib/librsvg-2.dylib  
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.9.4") 
-- Found SQLITE3: /opt/local/lib/libsqlite3.dylib  
-- Found CURL: /opt/local/lib/libcurl.dylib (found version "7.53.1") 
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.11") 
-- Found PNG: /opt/local/lib/libpng.dylib (found version "1.6.28") 
-- Found JPEG: /opt/local/lib/libjpeg.dylib  
-- Found TIFF: /opt/local/lib/libtiff.dylib (found version "4.0.7") 
-- Found LCMS2: /opt/local/lib/liblcms2.dylib  
-- Found JsonGlib 
-- Found EXIV2: /opt/local/lib/libexiv2.dylib  
-- Internationalization: Enabled
-- Found FLICKCURL: /opt/local/lib/libflickcurl.dylib  
-- Found OpenJPEG 
-- Found LIBSECRET: /opt/local/include/libsecret-1;/opt/local/include/glib-2.0;/opt/local/lib/glib-2.0/include;/opt/local/include  
-- Found MACINTEGRATION: /opt/local/lib/libgtkmacintegration-gtk3.dylib  
-- Found GraphicsMagick 
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS - Success
-- Does the compiler support __builtin_cpu_supports(): 1
-- Performing Test HAVE_TLS
-- Performing Test HAVE_TLS - Success
-- Checking for one of the modules 'lua52;lua5.2;lua-5.2;lua'
-- Lua support: Enabled
-- Found Pugixml: /opt/local/lib/libpugixml.dylib (Required is at least version "1.2") 
-- Map mode: enabled
-- No libcolord found, this build will lack the ability to get the screen profile from colord
-- Found CUPS: /usr/lib/libcups.dylib  
-- Print mode: enabled
-- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib
-- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /opt/local/lib/libX11.dylib
-- no colord support for darktable-cmstest. not cool.
-- 
-- Found Java: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java (found version "1.8.0.60") 
-- No saxon XSLT processor and/or no docbook saxon extension library found.
Xslt processor saxon not found. HTML usermanual will be built with xsltproc;
expect usermanual with inconsistent screenshot and image dimensions.
Missing xml2po. No localized usermanuals are build
Missing xml2po
Can NOT update usermanual translations
Missing po4a-translate. Can NOT create translated manpages
Missing po4a-updatepo. Can NOT update manpage translations
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Caleb/darktable/build

As you might've noticed, many tests are failing here, but the build files are written. It isn't until I run

make
that it officially fails. Here's what I get there:

Scanning dependencies of target create_version_gen
[  0%] Updating version string (git checkout)
Version string: 2.1.0+1680~ge336032ba-dirty
[  0%] Built target create_version_gen
Scanning dependencies of target generate_version
[  0%] Built target generate_version
Scanning dependencies of target locale_uk
[  1%] Building uk locale
1838 translated messages, 3 fuzzy translations.
[  1%] Built target locale_uk
Scanning dependencies of target locale_th
[  1%] Building th locale
530 translated messages, 2 fuzzy translations, 1098 untranslated messages.
[  1%] Built target locale_th
Scanning dependencies of target locale_sv
[  1%] Building sv locale
2132 translated messages, 7 untranslated messages.
[  1%] Built target locale_sv
Scanning dependencies of target locale_sl
[  1%] Building sl locale
2048 translated messages.
[  1%] Built target locale_sl
Scanning dependencies of target locale_ja
[  1%] Building ja locale
2036 translated messages.
[  1%] Built target locale_ja
Scanning dependencies of target locale_ro
[  1%] Building ro locale
713 translated messages, 490 fuzzy translations, 415 untranslated messages.
[  1%] Built target locale_ro
Scanning dependencies of target locale_pt_BR
[  3%] Building pt_BR locale
1752 translated messages.
[  3%] Built target locale_pt_BR
Scanning dependencies of target locale_pt_PT
[  3%] Building pt_PT locale
1739 translated messages, 1 fuzzy translation, 4 untranslated messages.
[  3%] Built target locale_pt_PT
Scanning dependencies of target locale_nl
[  3%] Building nl locale
2191 translated messages.
[  3%] Built target locale_nl
Scanning dependencies of target locale_it
[  3%] Building it locale
2034 translated messages.
[  3%] Built target locale_it
Scanning dependencies of target locale_hu
[  3%] Building hu locale
2161 translated messages.
[  3%] Built target locale_hu
Scanning dependencies of target locale_es
[  3%] Building es locale
2140 translated messages.
[  3%] Built target locale_es
Scanning dependencies of target locale_gl
[  3%] Building gl locale
398 translated messages, 591 fuzzy translations, 629 untranslated messages.
[  3%] Built target locale_gl
Scanning dependencies of target locale_he
[  3%] Building he locale
2151 translated messages.
[  3%] Built target locale_he
Scanning dependencies of target locale_pl
[  3%] Building pl locale
1744 translated messages.
[  3%] Built target locale_pl
Scanning dependencies of target locale_fi
[  4%] Building fi locale
613 translated messages, 551 fuzzy translations, 454 untranslated messages.
[  4%] Built target locale_fi
Scanning dependencies of target locale_de
[  4%] Building de locale
2196 translated messages, 6 fuzzy translations.
[  4%] Built target locale_de
Scanning dependencies of target locale_el
[  4%] Building el locale
2006 translated messages, 1 fuzzy translation, 29 untranslated messages.
[  4%] Built target locale_el
Scanning dependencies of target locale_sk
[  4%] Building sk locale
2093 translated messages, 7 fuzzy translations, 11 untranslated messages.
[  4%] Built target locale_sk
Scanning dependencies of target locale_cs
[  4%] Building cs locale
2136 translated messages.
[  4%] Built target locale_cs
Scanning dependencies of target locale_ru
[  4%] Building ru locale
1934 translated messages, 130 fuzzy translations, 128 untranslated messages.
[  4%] Built target locale_ru
Scanning dependencies of target locale_zh_CN
[  4%] Building zh_CN locale
1518 translated messages, 74 fuzzy translations, 26 untranslated messages.
[  4%] Built target locale_zh_CN
Scanning dependencies of target locale_fr
[  4%] Building fr locale
2187 translated messages, 1 untranslated message.
[  4%] Built target locale_fr
Scanning dependencies of target locale_da
[  4%] Building da locale
2140 translated messages.
[  4%] Built target locale_da
Scanning dependencies of target locale_ca
[  4%] Building ca locale
2187 translated messages.
[  4%] Built target locale_ca
Scanning dependencies of target locale_sq
[  4%] Building sq locale
1824 translated messages, 7 fuzzy translations, 10 untranslated messages.
[  4%] Built target locale_sq
Scanning dependencies of target locale_af
[  4%] Building af locale
166 translated messages, 2093 untranslated messages.
[  4%] Built target locale_af
Scanning dependencies of target validate_darktableconfig_xml
[  4%] Checking validity of data/darktableconfig.xml
[  4%] Built target validate_darktableconfig_xml
Scanning dependencies of target generate_preferences
[  4%] Generating preferences
[  4%] Built target generate_preferences
Scanning dependencies of target lautoc
[  4%] Building C object src/external/LuaAutoC/CMakeFiles/lautoc.dir/lautoc.c.o
[  4%] Linking C static library liblautoc.a
[  4%] Built target lautoc
Scanning dependencies of target generate_metadata
[  4%] Generating metadata .c/.h
[  4%] Built target generate_metadata
Scanning dependencies of target validate_cameras_xml
[  4%] Checking validity of external/rawspeed/data/cameras.xml
[  4%] Built target validate_cameras_xml
Scanning dependencies of target rawspeed
[  4%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/AriDecoder.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/ArwDecoder.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BitPumpJPEG.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BitPumpMSB.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BitPumpMSB16.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BitPumpMSB32.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BitPumpPlain.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/BlackArea.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/ByteStream.cpp.o
[  6%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/ByteStreamSwap.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/Camera.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CameraMetaData.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CameraMetadataException.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CameraSensorInfo.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CiffEntry.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CiffIFD.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CiffParser.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CiffParserException.cpp.o
[  7%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/ColorFilterArray.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/Common.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/Cr2Decoder.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/CrwDecoder.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/DcrDecoder.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/DcsDecoder.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/DngDecoder.cpp.o
[  9%] Building CXX object src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/DngDecoderSlices.cpp.o
/Users/Caleb/darktable/src/external/rawspeed/RawSpeed/DngDecoderSlices.cpp:180:31: error: 
      no matching function for call to 'jpeg_read_header'
        if (JPEG_HEADER_OK != jpeg_read_header(&dinfo, TRUE))
                              ^~~~~~~~~~~~~~~~
/opt/local/include/jpeglib.h:1039:13: note: candidate function not viable: no
      known conversion from 'int' to 'boolean' for 2nd argument
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
            ^
1 error generated.
make[2]: *** [src/external/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/DngDecoderSlices.cpp.o] Error 1
make[1]: *** [src/external/rawspeed/CMakeFiles/rawspeed.dir/all] Error 2
make: *** [all] Error 2

For kicks, I'm running macOS Sierra 10.12.3 on a mid-2011 mac mini.
MacPorts version 2.4.1

Also available in: Atom PDF