Compiling Issue unicode/ucol.h MacOs

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/

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

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

have a look at documentation: Building darktable on macOS using homebrew · Issue #10583 · darktable-org/darktable · GitHub and maybe the content in Provide instructions and helper scripts to generate dmg of homebrew-based build for macOS by apfelkraut · Pull Request #11579 · darktable-org/darktable · GitHub

Thanks a bunch!
I got it working with the help of this script: