Randalix
(Johannes)
June 5, 2022, 3:47pm
1
Hello, I’m trying to compile darktable. And getting fatal error: ‘unicode/ucol.h’ file not found.
But it is located under: /opt/homebrew/Cellar/icu4c/70.1/include/unicode/ucol.h
How do I point the compiler to that path?
What I have tried:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/Cellar/icu4c/70.1/lib/
or
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/Cellar/icu4c/70.1/include/
or
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/
or
export LDFLAGS=-L/opt/homebrew/Cellar/icu4c/70.1/lib/
export CPPFLAGS=-I/opt/homebrew/Cellar/icu4c/70.1/include/
afre
(Alan)
June 5, 2022, 5:34pm
2
What would help is letting us know what version/source you are trying to build, how you are building it and showing us the latter part of the console output.
1 Like
Randalix
(Johannes)
June 5, 2022, 5:55pm
3
Oh, sure. I was expecting this to be just something like linking/adding to the correct path of the lib.
I’m on MacOs 12.3.1. on a M1 macbook.
What I did:
git clone --recurse-submodules --depth 1 https://github.com/darktable-org/darktable.git
cd darktable
git submodule update --init
./build.sh --prefix /opt/darktable-test --build-type Release --install --sudo
That’s the error.
/Users/joe/repos/darktable/src/common/sqliteicu.c:39:10: fatal error: 'unicode/ucol.h' file not found
#include <unicode/ucol.h>
^~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [bin/CMakeFiles/lib_darktable.dir/common/sqliteicu.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [bin/CMakeFiles/lib_darktable.dir/all] Error 2
make: *** [all] Error 2
Randalix
(Johannes)
June 5, 2022, 8:51pm
6
Thanks a bunch!
I got it working with the help of this script:
opened 10:09PM - 07 Dec 21 UTC
scope: usermanual
This is primarily a request for help to find an easy and working way for newbies… to build a full grown darktable from sources on macOS by providing dependencies via homebrew. If this is not considered off-topic at this place, I would propose to close it as soon as everything has been clarified.
For reasons of simplicity, I would like to limit this at the beginning to Intel-based (i386) Macs in contrast to M1-based (arm) Macs. Note that there is a dedicated issue to make this work for M1: https://github.com/darktable-org/darktable/issues/7564
In my case I am doing this on macOS 12.0.1 (Monterey).
When building for this platform you are basically left with two options:
- Using macports as described within this file: https://github.com/darktable-org/darktable/blob/master/packaging/macosx/BUILD.txt
- Using homebrew as described here: https://github.com/darktable-org/darktable/issues/7564#issuecomment-752679349
The macOS community of darktable has put a tremendous effort in making it built and providing a very well-working DMG image based on macports. Thanks a lot, really highly appreciated!
Still, as newbie I am slightly overwhelmed by the number of steps to take and all the diffs that must be applied. In addition if you are used to a different package manager than macports, you normally do not want to switch (back).
I recently discovered that there is also the opportunity to build on basis of homebrew which I want to detail out subsequently.
1. Assuming that you have homebrew up and running, you first want to doublecheck if you have the latest packages installed:
```
brew update && brew upgrade
```
2. You then need to install all the dependencies of darktable:
```
brew install adwaita-icon-theme cmake desktop-file-utils exiv2 gettext git glib gmic gphoto2 graphicsmagick gtk+3 gtk-mac-integration icu4c intltool iso-codes json-glib lensfun libavif libheif librsvg libsecret libsoup@2 little-cms2 lua libomp ninja openexr openjpeg osm-gps-map portmidi pugixml sdl2 cmocka curl perl jpeg llvm po4a
```
3. You then go to the root of the cloned darktable repository and build it. In my case I decided to put the binaries into ~/bin/darktable-dev:
```
./build.sh --install --build-type RelWithDebInfo --prefix ~/bin/darktable-dev
```
4. If the built completed without any issue - like in my case - the final step is to run it. As I do not want to mess with my stable/productive darktable environment, I am passing dedicated/separate config and cache directories which are residing within the same directory:
```
~/bin/darktable-dev/bin/darktable --configdir ~/bin/darktable-dev/.config/darktable/ --cachedir ~/bin/darktable-dev/.cache/darktable/
```
Great! That was easy. I just did some basic tests and it seems to work.
Still I discovered some things where I am not sure how to take them or what they mean in the end = do I need them for the perfect darktable experience?
When reviewing the build log, I see the following messages:
```
-- The following OPTIONAL packages have not been found:
* LLVM (required version >= 3.9)
* LibSoup2
* ICU
* OSMGpsMap
* Colord
```
That is strange. Beside Colord, homebrew includes these packages. Why have they not been found? I suspect that I need to somehow pass the correct library location to the build procedure. How do I do that?
When running `darktable --version` I also realize the following:
```
ImageMagick support disabled
```
Again, strange. Homebrew also offers imagemagick. Same question as above.