MAC cannot compile
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required is at least version "3.0") INFO Python libraries or swig not found, skipping swig builds -- Configuring done -- Generating done -- Build files have been written to: /Users/yantao/Desktop/kujiale/code/build-openvpn3/test/unittests/googletest-download [ 11%] Performing update step for 'googletest' [ 22%] No patch step for 'googletest' [ 33%] No configure step for 'googletest' [ 44%] No build step for 'googletest' [ 55%] No install step for 'googletest' [ 66%] No test step for 'googletest' [ 77%] Completed 'googletest' [100%] Built target googletest lzo not found, skipping lzo compression tests CMake Error at /opt/homebrew/Cellar/cmake/3.23.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.23.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.23.1/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) cmake/findcoredeps.cmake:144 (find_package) test/ovpncli/CMakeLists.txt:62 (add_json_library)
❯ cat CMakeFiles/CMakeError.log Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc Build flags: Id flags:
The output was: 1 ld: library not found for -lSystem clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ Build flags: Id flags:
The output was: 1 ld: library not found for -lc++ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Do you have the pkg-config build tool installed and available?
There are multiple errors reported in the cmake output like missing pkgconfig and also broken xcode compiler. That libc++ is missing sound like you need to fix your xcode/xcode command line tool installation first.