{"id":23427,"library":"clang-tool-chain","title":"clang-tool-chain","description":"Clang Tool Chain provides utilities for C/C++ compilation toolchain management, including locating Clang, setting compilation flags, and building projects. Current version 1.3.0, updated occasionally.","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/zackees/clang-tool-chain","tags":["clang","compilation","toolchain","c","cpp","build"],"install":[{"cmd":"pip install clang-tool-chain","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used internally for compilation toolchain discovery","package":"setuptools","optional":false}],"imports":[{"note":"Class is directly exported from package __init__","wrong":"from clang_tool_chain.toolchain import ClangToolChain","symbol":"ClangToolChain","correct":"from clang_tool_chain import ClangToolChain"},{"note":"Function is re-exported at top level","wrong":"from clang_tool_chain.utils import find_clang","symbol":"find_clang","correct":"from clang_tool_chain import find_clang"}],"quickstart":{"code":"from clang_tool_chain import ClangToolChain\n\ntc = ClangToolChain()\nprint('Clang found at:', tc.clang_path)\nprint('Compile flags:', tc.get_compile_flags())","lang":"python","description":"Initialize ClangToolChain and retrieve paths/flags."},"warnings":[{"fix":"Upgrade Python to 3.10+ or pin clang-tool-chain <1.3.0.","message":"Version 1.3.0 drops Python 3.9 support. Requires Python >=3.10.","severity":"breaking","affected_versions":"<1.3.0"},{"fix":"Install Clang from your system package manager (e.g., 'apt install clang', 'brew install llvm').","message":"The package does not bundle Clang binaries. It expects Clang to be installed on the system and accessible via PATH.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'ClangToolChain' class instead.","message":"The function 'get_toolchain' is deprecated in favor of 'ClangToolChain'.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install Clang (e.g., 'sudo apt-get install clang' on Ubuntu, 'xcode-select --install' on macOS).","cause":"Clang is not installed or not on PATH.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'clang'"},{"fix":"Use 'import clang_tool_chain' (underscore) not 'clang-tool-chain' (hyphen).","cause":"Import path uses underscores instead of hyphens correctly, but may be confused by package name.","error":"ModuleNotFoundError: No module named 'clang_tool_chain'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}