Compilation errors on macOS #55
Closed
csparker247
announced in
Announcements
Replies: 1 comment
-
Homebrew's VTK has updated to use Qt6, so users can use Homebrew dependencies from now on. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been getting some reports of compilation errors on macOS related to C/C++ includes like
stddef.h
. I've just experienced this myself so I wanted to report what I did to fix it.In my case, I always do the following:
cmake clang-format doxygen git git-lfs ninja python3 qt
. Everything else must be brew unlinked when you first run CMake forvc-deps
andvolume-cartographer
. Otherwise, CMake picks up Homebrew libraries when it shouldn't. After both have successfully built, you can brew install to your heart's content.vc-deps
to a common directory on the system so multiple projects could share the built libraries:~/source/custom_prefix
Using this approach, I have had a working
build
directory for some time. However, when I attempted to a new build directory for debugging new code, I started getting compiler errors like the following:Obviously, quite a weird error to have happen, especially since my origin
build
directory would compile without issue. On macOS, this sort of thing is always, always, always a dependency issue. There's either a Homebrew dependency linked that shouldn't be, or something weird has changed in the toolchain. My clue was that I recently upgraded to macOS 14 (Ventura). Having done this too many times, I know that when the system updates, so too do the SDKs and toolchains.First, I erased my common
vc-deps
install and attempted to rebuilt it from scratch. This failed with an error while trying to build boost. Notably, it was also an error related to a standard library function. After first clearing myvc-deps
build and install directories again, I installed/linked Boost with Homebrew, and reconfiguredvc-deps
with the CMake flag-DVCDEPS_BUILD_BOOST=OFF
. This installed the dependencies successfully. After that, my VC builds started working again with no issues.Beta Was this translation helpful? Give feedback.
All reactions