dyld Errors Out on Doxygen When Generating Xcode Project Files for a Development Copy of LLVM
Lately, I've been seeing the following error after running cmake -G "Xcode" ../
inside $PATH_TO_LOCAL_LLVM_REPO_CLONE/build
:
⋮
-- Doxygen enabled.
dyld: Library not loaded: @rpath/libc++abi.1.dylib
Referenced from: /usr/local/opt/llvm/lib/libc++.1.dylib
Reason: image not found
⋮
As you can see, this occurs right after the first referenced line occurs. I've checked to make sure that /usr/local/opt/llvm/lib/libc++.1.dylib
exists, and it does. The version of LLVM that I'm generating Xcode project files for is HEAD@021822787921bb3f6a53f0fcee34a5a7ca30b37f
with the following submodules set up:
- Compiler-RT (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/projects/compiler-rt/
,HEAD@1308eb2c519fca2cfbb9d574ad9e4056401cd65c
) - Clang (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/tools/clang/
,HEAD@beb0b9e443138a0fba0019739db0847aaaec0f93
) - Clang Extra Tools (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/tools/clang/tools/extra/
,HEAD@f7f8d19ff45a890371b23e548c63bad122bc0f5f
) - libcxx (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/projects/libcxx/
,HEAD@546498cb4817d6a0e78d79c6d244495961ba1c73
) - libcxxabi (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/projects/libcxxabi/
,HEAD@6092bfa6c153ad712e2fc90c7b9e536420bf3c57
) - test-suite (in
$PATH_TO_LOCAL_LLVM_REPO_CLONE/projects/test-suite/
,HEAD@6ee8a1b05c2a32c9af47efaa2ca4ff340019747f
)
Furthermore, I have set these repositories up inside a case-sensitive, journaled HFS+ sparse disk image. The version of CMake I have installed is v3.6.1, and the version of Doxygen I have installed is v1.8.11. Both were installed using Homebrew. This issue persists even after I run brew reinstall -vd --build-from-source doxygen --with-graphviz --with-llvm --with-qt5
, which should resolve the issues I'm seeing with dynamic linkage. Note that, when Homebrew installs Doxygen, it ignores my development copy of LLVM as a dependency, instead opting to use the copy of LLVM v3.8.1 that I recently installed via Homebrew with the package manager's LLVM formula's --with-all-targets
, --with-graphviz
, --with-libcxxabi
, --with-python
, --with-test
, and --with-toolchain
options. I filed this bug here in CMake's GitLab issue tracker because it appears to me that this might be an issue with CMake not noticing my updated copy of Doxygen. If this bug can be fixed by clearing a variable in my CMakeCache.txt
file, then please tell me which one it is; I did, however, look through to see what file path that same file cached for Doxygen only to find out that it was /usr/local/bin/doxygen
, which is what I expected given Homebrew's packaging and symbolic-linking conventions. Hopefully this bug won't result in any upstream/downstream ones for Doxygen and/or Homebrew (or, may the powers that be have mercy, LLVM.)